title: Very simple if else check in Google App Maker
body: <p>This is likely embarrassingly easy but I'm new and I've been beating my head against the wall on this for a while now. What I am attempting to do is basically a modified version of the "Hello App Maker!" If else test. </p>
  
  <p>The necessary info I have the following widgets attached to the appropriate data sources:</p>
  
  <blockquote>
    <ul>
    <li>Dropdown widget called <code>source_name</code> (string - list)  </li>
    <li>Label widget I've called <code>name</code> (string)  </li>
    <li>Text Box widget called <code>qty_duration</code> (number)  </li>
    <li>Label widget I've called <code>hours</code> (number)</li>
    </ul>
  </blockquote>
  
  <p>I have a dropdown widget called <code>source_name</code> with 5 options. On selection I have the value appear in a label widget I've called <code>name</code>. If the option selected from the drop down widget is ever <code>LABOUR</code> I am trying to then have the value of a Text Box widget called <code>qty_duration</code> appear in a label widget I've called <code>hours</code></p>
  
  <p>On the <code>source_name</code> dropdown event - <code>onValueChange</code> I have the following code:</p>
  
  <pre><code>// Define variables for the input and output widgets
  var nameWidget = app.pages.Apex_job_details.descendants.name;
  var outputWidget = app.pages.Apex_job_details.descendants.hours;
  var techhours = app.pages.Apex_job_details.descendants.qty_duration;
  var nothing = 0;
  
  
  // If a name is LABOUR, add the qty to the output widget Else output 0.
  if (nameWidget == 'LABOUR') {
    outputWidget.text = techhours;
  } else {
    outputWidget = nothing;
  }
  </code></pre>
  
  <p>It's not giving me any errors, but it's also not outputting to the <code>hours</code> label. If I edit the code as follows just to muck with it:</p>
  
  <pre><code>// Define variables for the input and output widgets
  var nameWidget = app.pages.Apex_job_details.descendants.name;
  var outputWidget = app.pages.Apex_job_details.descendants.hours;
  var techhours = app.pages.Apex_job_details.descendants.qty_duration;
  var nothing = 0;
  
  // If a name is LABOUR, add the qty to the output widget Else output 0.
  if (nameWidget == 'LABOUR') {
    outputWidget.text = techhours;
  } else {
    outputWidget.text = nothing;
  }
  </code></pre>
  
  <p>I'm not sure what I'm doing wrong.</p>