<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using a conditional statement in Survey123 to calculate two different equations based on choice of question. in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/using-a-conditional-statement-in-survey123-to/m-p/775902#M4978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We set the value of the hidden question to equal the value of the choice. Remember to use negative integers (each named filed has a minus sign before it except the first one) when adding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the formula we used&amp;nbsp;as the grand total for all the selections. The most is 55 points the least is 0:&lt;/P&gt;&lt;P&gt;(${UTM_yes_no}-(-${MOBG_pts})-(-${Third_Party_BP})-(-${No_Third_Party_BP})-(-${Revenue_pts})-(-${Third_Party_WC})-(-${No_Third_Party_WC})-(-${Third_Party_Taxes})-(-${No_Third_Party_Taxes})-(-${Third_Party_BP_NoMtngs})-(-${No_Third_Party_BP_NoMtngs}))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="402595" alt="" class="image-4 jive-image" src="https://community.esri.com/legacyfs/online/402595_2018-04-20_11h19_40.png" style="width: 841px; height: 76px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="402593" alt="" class="image-3 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/402593_2018-04-20_11h12_55.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Apr 2018 19:21:45 GMT</pubDate>
    <dc:creator>LorenceWilliams</dc:creator>
    <dc:date>2018-04-20T19:21:45Z</dc:date>
    <item>
      <title>Using a conditional statement in Survey123 to calculate two different equations based on choice of question.</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/using-a-conditional-statement-in-survey123-to/m-p/775900#M4976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a large survey whose questions display depending on the user's initial choice of a YES&amp;nbsp;or NO&amp;nbsp;question. If the user chooses YES, then the survey questions display and the total points from those questions the user fills out is added up in a total.&amp;nbsp;If the user chooses NO the form calculates an automatic 55 pts.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Based on the sample statement provided in Survey 123's help:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #4d4d4d; background: #FEFEFE; font-size: 10.0pt;"&gt;if(selected(${question_one}, 'yes') and selected(${question_two}, 'yes'), 'yes', 'no')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I have so far, however I get an error each time I try to refresh the survey:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #4d4d4d; background: #FEFEFE; font-size: 10.0pt;"&gt;if(selected(${Fil_Srvy},’yes’) and selected (${Fil_Srvy}, ‘no’), ‘&lt;/STRONG&gt;&lt;EM style="color: #4d4d4d; background: #FEFEFE; font-size: 8.0pt;"&gt;(${UTM_yes_no}-(-${MOBG_pts})-(-${Third_Party_BP})-(-${No_Third_Party_BP})-(-${Revenue_pts})-(-${Third_Party_WC})-(-${No_Third_Party_WC})-(-${Third_Party_Taxes})-(-${No_Third_Party_Taxes})-(-${Third_Party_BP_NoMtngs})-(-${No_Third_Party_BP_NoMtngs})), ‘55’)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15px;"&gt;So you see, what I am doing is asking it to add the particular fields in the total field if YES and if NO, then just display&amp;nbsp;55 points.&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style=": ; color: #4d4d4d; background: #FEFEFE; font-size: 15px;"&gt;Thank you for all your suggestions and advice in advance.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style=": ; color: #4d4d4d; background: #FEFEFE; font-size: 15px;"&gt;Respectfully,&lt;BR /&gt;&lt;BR /&gt;-Confused&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 23:24:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/using-a-conditional-statement-in-survey123-to/m-p/775900#M4976</guid>
      <dc:creator>LorenceWilliams</dc:creator>
      <dc:date>2016-12-15T23:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using a conditional statement in Survey123 to calculate two different equations based on choice of question.</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/using-a-conditional-statement-in-survey123-to/m-p/775901#M4977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Lawrence, I know this is a bit older of a question, but its very relevant to my current situation. Were you ever able to figure out a good solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shawn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2018 18:55:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/using-a-conditional-statement-in-survey123-to/m-p/775901#M4977</guid>
      <dc:creator>ShawnRoberts1</dc:creator>
      <dc:date>2018-04-20T18:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using a conditional statement in Survey123 to calculate two different equations based on choice of question.</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/using-a-conditional-statement-in-survey123-to/m-p/775902#M4978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We set the value of the hidden question to equal the value of the choice. Remember to use negative integers (each named filed has a minus sign before it except the first one) when adding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the formula we used&amp;nbsp;as the grand total for all the selections. The most is 55 points the least is 0:&lt;/P&gt;&lt;P&gt;(${UTM_yes_no}-(-${MOBG_pts})-(-${Third_Party_BP})-(-${No_Third_Party_BP})-(-${Revenue_pts})-(-${Third_Party_WC})-(-${No_Third_Party_WC})-(-${Third_Party_Taxes})-(-${No_Third_Party_Taxes})-(-${Third_Party_BP_NoMtngs})-(-${No_Third_Party_BP_NoMtngs}))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="402595" alt="" class="image-4 jive-image" src="https://community.esri.com/legacyfs/online/402595_2018-04-20_11h19_40.png" style="width: 841px; height: 76px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="402593" alt="" class="image-3 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/402593_2018-04-20_11h12_55.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2018 19:21:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/using-a-conditional-statement-in-survey123-to/m-p/775902#M4978</guid>
      <dc:creator>LorenceWilliams</dc:creator>
      <dc:date>2018-04-20T19:21:45Z</dc:date>
    </item>
  </channel>
</rss>

