<?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 Survey123 connect XLS nested if statement problem in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-connect-xls-nested-if-statement-problem/m-p/1481213#M57159</link>
    <description>&lt;P&gt;Would appreciate an assist on syntax issues.&amp;nbsp; Trying to use a nested if statement to get me the value I want.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Region is a field that has a picklist (using selectone with the reference to the choice list).&amp;nbsp; Have it set as default so all the choices are displayed and the user hits the button for their choice.&amp;nbsp; The button is selected in the survey and the value behind that button is VHGMI.&amp;nbsp; The mac_index_score is automatically calculated in the survey.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want:&amp;nbsp; if the button for VHGMI is selected and the mac_index_score is over 13 then I want the value 'gt13' returned.&amp;nbsp; if the VHGMI button is selected and the mac_index_score is under 13, then I want the value returned to be 'lt13'.&amp;nbsp; If none of those conditions is true, then I want 'none of the above returned'.&amp;nbsp; (this is just for illustration purposes)&lt;/P&gt;&lt;P&gt;What I have that isn't working (it is returning 'none of the above despite me clicking the right button and having a value over 13......)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(selected${region} = VHGMI and ${mac_index_score} &amp;gt; 13, 'gt13', if(selected${region} = VHGMI and ${mac_index_score} &amp;lt;= 13, 'lt13', 'none of the above'))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This could be as simple as bad syntax....but I've tried lots of combos to no avail.&amp;nbsp; Maybe I need to use pulldata somewhere?&amp;nbsp; No idea.&amp;nbsp; If someone could point me in the right direction, I would greatly appreciate it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Thu, 30 May 2024 15:21:50 GMT</pubDate>
    <dc:creator>leighlager</dc:creator>
    <dc:date>2024-05-30T15:21:50Z</dc:date>
    <item>
      <title>Survey123 connect XLS nested if statement problem</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-connect-xls-nested-if-statement-problem/m-p/1481213#M57159</link>
      <description>&lt;P&gt;Would appreciate an assist on syntax issues.&amp;nbsp; Trying to use a nested if statement to get me the value I want.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Region is a field that has a picklist (using selectone with the reference to the choice list).&amp;nbsp; Have it set as default so all the choices are displayed and the user hits the button for their choice.&amp;nbsp; The button is selected in the survey and the value behind that button is VHGMI.&amp;nbsp; The mac_index_score is automatically calculated in the survey.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want:&amp;nbsp; if the button for VHGMI is selected and the mac_index_score is over 13 then I want the value 'gt13' returned.&amp;nbsp; if the VHGMI button is selected and the mac_index_score is under 13, then I want the value returned to be 'lt13'.&amp;nbsp; If none of those conditions is true, then I want 'none of the above returned'.&amp;nbsp; (this is just for illustration purposes)&lt;/P&gt;&lt;P&gt;What I have that isn't working (it is returning 'none of the above despite me clicking the right button and having a value over 13......)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(selected${region} = VHGMI and ${mac_index_score} &amp;gt; 13, 'gt13', if(selected${region} = VHGMI and ${mac_index_score} &amp;lt;= 13, 'lt13', 'none of the above'))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This could be as simple as bad syntax....but I've tried lots of combos to no avail.&amp;nbsp; Maybe I need to use pulldata somewhere?&amp;nbsp; No idea.&amp;nbsp; If someone could point me in the right direction, I would greatly appreciate it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 15:21:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-connect-xls-nested-if-statement-problem/m-p/1481213#M57159</guid>
      <dc:creator>leighlager</dc:creator>
      <dc:date>2024-05-30T15:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 connect XLS nested if statement problem</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-connect-xls-nested-if-statement-problem/m-p/1481217#M57160</link>
      <description>&lt;P&gt;You need parentheses on your selected functions, and you need to put your values in quotes.&lt;/P&gt;&lt;P&gt;EDIT: Selected needs to have the compared value as a second parameter. Oops!&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;if(selected(${region}, 'VHGMI') and ${mac_index_score} &amp;gt; 13, 'gt13', if(selected(${region}, 'VHGMI') and ${mac_index_score} &amp;lt;= 13, 'lt13', 'none of the above'))&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 15:29:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-connect-xls-nested-if-statement-problem/m-p/1481217#M57160</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2024-05-30T15:29:17Z</dc:date>
    </item>
  </channel>
</rss>

