title: how to get value by an input in one textbox from another column the same row
body: <p>i've have an html file with two textboxes
  1.orders
  1.amount
  i want that when i type a number in the orders text box
  i will get the value from another column in my Google Sheet in the same row that match to to this order</p>
  <p><strong>this is my Code.gs code its not working</strong></p>
  <pre><code>    function doGet(e) {
    
   return HtmlService.createHtmlOutputFromFile('page');
  }
  
  
  
  
  function getCost(oneCode){
    
    var url = &quot;https://docs.google.com/spreadsheets/d/1333t7lvECnmOcCnTE6gnn_RN1wrPckWpIETiPUjkUnU/edit#gid=0&quot;;
    var ss = SpreadsheetApp.openUrl(url);
    var ws = ss.getSheetByName(&quot;Sheet1&quot;);
    var data = ws.getRange(1,1,ws.getLastRow(),2).getValues();
    
    var ordersList = data.map(function(r){ return r[0]; });
    var amountList = data.map(function(r){ return r[1]; });
    
    
    var position = ordersLis.indexOf(oneCode);
    if(position &gt; -1){
      return amountList[position];
   
    } else {
      return &quot;not found&quot;;
      
    }
    
  }  
  </code></pre>
  <p>========================
  <strong>this the html code</strong></p>
  <pre><code>    &lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;base target=&quot;_top&quot;&gt;
    &lt;/head&gt;
    &lt;script&gt;
    document.getElementById(&quot;one&quot;).addEventlistener(&quot;input&quot;,doThis);
    
    function doThis(){
    
    var oneCode = document.getElementById(&quot;one&quot;).value;
    
    
    
    google.script.run.withSuccessHandler(updateAmount).getCost(oneCode);
    
    }
    
    function updateAmount(cost){
    
    document.getElementById(&quot;two&quot;).value = cost;
    
    }
    
    &lt;/script&gt;
    &lt;body&gt;
    &lt;div&gt;
      &lt;input id=&quot;one&quot; type=&quot;text&quot;&gt;
      &lt;label for=&quot;one&quot;&gt;orders&lt;/label&gt;
      &lt;/div&gt;
      &lt;div&gt;
      &lt;input disabled id=&quot;two&quot; type=&quot;text&quot;&gt;
      &lt;label for=&quot;two&quot;&gt;amount&lt;/label&gt;
      &lt;/div&gt;
      
      
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/vG7r7.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vG7r7.jpg" alt="those are 2 columns i want to find a match from left to right" /></a></p>