<?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: Nested IF statement in XLSForm in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/nested-if-statement-in-xlsform/m-p/812797#M13772</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to use the if part each time.&amp;nbsp; You cannot just give more conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So need to do this&lt;BR /&gt;If(condition, yes, if(condition, yes, no))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Oct 2019 19:22:54 GMT</pubDate>
    <dc:creator>DougBrowning</dc:creator>
    <dc:date>2019-10-01T19:22:54Z</dc:date>
    <item>
      <title>Nested IF statement in XLSForm</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/nested-if-statement-in-xlsform/m-p/812796#M13771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am struggling with creating a nested if statement in the XLSForm for Survey123 Connect. I have a select multiple question that I am trying to count the number of times a selection is made. This is done through a hidden question type with a formula. For example, I have options in the select multiple list for Route 1 EB, Route 1 WB, Route 2 EB, Route 2 WB. Then in a dashboard I have a serial chart with counts for Route 1 and Route 2, etc.&amp;nbsp; I am wanting the counts for Route 1 EB, WB, etc to be added in the hidden question total_route_1. In the survey, Route 1 EB could be selected, Route 1 WB could be selected, or both could be selected. This is the formula I have written and I can't seem to get it to work.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;if(selected(${routes},'route_1_EAST') and not(selected(${routes},'route_1_WEST'),1, or (selected(${routes},'route_1_WEST') and not(selected(${routes},'route_1_EAST'),1, or (selected(${routes},'route_1_EAST') and selected(${routes},'route_1_WEST'),2,0))))
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/PRE&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Miguel Fernandez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:34:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/nested-if-statement-in-xlsform/m-p/812796#M13771</guid>
      <dc:creator>Miguel-Fernandez</dc:creator>
      <dc:date>2021-12-12T09:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF statement in XLSForm</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/nested-if-statement-in-xlsform/m-p/812797#M13772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to use the if part each time.&amp;nbsp; You cannot just give more conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So need to do this&lt;BR /&gt;If(condition, yes, if(condition, yes, no))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2019 19:22:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/nested-if-statement-in-xlsform/m-p/812797#M13772</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2019-10-01T19:22:54Z</dc:date>
    </item>
  </channel>
</rss>

