<?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: if statement always returning false parameter in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-always-returning-false-parameter/m-p/1407071#M56072</link>
    <description>&lt;P&gt;It's not working because the question type is a Select Multiple. Which means the data in that field will have multiple comma separated values, so unless someone only selected 1 specific choice, ${field}= will never be true.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you want is to check if a specific option has been selected in a field using&amp;nbsp;&lt;SPAN&gt;selected(${question_one}, 'a').&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also, you need to be using the name field for your options, not the value. Spaces are not allowed in a Select Multiple name so it appears you are using the value.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Your if statement should look something like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if(selected(${tdzn},'Lower_intertidal_zone'), 'LI', if(selected(${tdzn}, 'Mid_intertidal_zone'), 'MI', if(selected(${tdzn}, 'Upper_intertidal_zone'), 'UI', if(selected(${tdzn}, 'Supra_tidal_zone'), 'SU', 'null'))))&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 08 Apr 2024 12:11:39 GMT</pubDate>
    <dc:creator>JenniferAcunto</dc:creator>
    <dc:date>2024-04-08T12:11:39Z</dc:date>
    <item>
      <title>if statement always returning false parameter</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-always-returning-false-parameter/m-p/1406581#M56045</link>
      <description>&lt;P&gt;I have a running if function that keeps returning the false parameter. This is from a select multiple field type, and I am not sure how to proceed. I have tried checking the options. Part of me wonders if its because I need to incorporate a select function and have tried but it always breaks everything. Anyone else have this problem and fixed it?&lt;BR /&gt;&lt;BR /&gt;Here is list of choices and if.&lt;/P&gt;&lt;TABLE width="130px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="129.091px"&gt;Lower intertidal zone&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="129.091px"&gt;Mid intertidal zone&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="129.091px"&gt;Upper intertidal zone&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="129.091px"&gt;Supra tidal zone&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE width="1471"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="1471"&gt;if(${tdzn}='Lower intertidal zone', 'LI', if(${tdzn}='Mid intertidal zone', 'MI', if(${tdzn}='Upper intertidal zone', 'UI', if(${tdzn}='Supra tidal zone', 'SU', 'null'))))&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 05 Apr 2024 19:00:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-always-returning-false-parameter/m-p/1406581#M56045</guid>
      <dc:creator>SteveBrewer</dc:creator>
      <dc:date>2024-04-05T19:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: if statement always returning false parameter</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-always-returning-false-parameter/m-p/1406641#M56054</link>
      <description>&lt;P&gt;The if statement formatting looks good, are you sure you're making your comparisons against the *coded* value of 'tdzn'?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 20:31:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-always-returning-false-parameter/m-p/1406641#M56054</guid>
      <dc:creator>Raul</dc:creator>
      <dc:date>2024-04-05T20:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: if statement always returning false parameter</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-always-returning-false-parameter/m-p/1407071#M56072</link>
      <description>&lt;P&gt;It's not working because the question type is a Select Multiple. Which means the data in that field will have multiple comma separated values, so unless someone only selected 1 specific choice, ${field}= will never be true.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you want is to check if a specific option has been selected in a field using&amp;nbsp;&lt;SPAN&gt;selected(${question_one}, 'a').&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also, you need to be using the name field for your options, not the value. Spaces are not allowed in a Select Multiple name so it appears you are using the value.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Your if statement should look something like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if(selected(${tdzn},'Lower_intertidal_zone'), 'LI', if(selected(${tdzn}, 'Mid_intertidal_zone'), 'MI', if(selected(${tdzn}, 'Upper_intertidal_zone'), 'UI', if(selected(${tdzn}, 'Supra_tidal_zone'), 'SU', 'null'))))&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 08 Apr 2024 12:11:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-always-returning-false-parameter/m-p/1407071#M56072</guid>
      <dc:creator>JenniferAcunto</dc:creator>
      <dc:date>2024-04-08T12:11:39Z</dc:date>
    </item>
  </channel>
</rss>

