<?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 Select Multiple calculation not working if two things are selected in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/select-multiple-calculation-not-working-if-two/m-p/1507245#M57992</link>
    <description>&lt;P&gt;Hello! I'm currently having an issue where I would like a text field to populate based off of answers in a select multiple question. The issue is that when two choices are selected, it seems to negate the calculation and nothing will then show up in the field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;if((${selectmultiple list} = 'choice'), 'input message in field', ' ') + if((${same select multiple list as befor} = 'different choice'), 'Print different message in the field. but in addition to other message if both are selected', ' ')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example! of one of my calculations&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jul 2024 11:59:09 GMT</pubDate>
    <dc:creator>sophered</dc:creator>
    <dc:date>2024-07-19T11:59:09Z</dc:date>
    <item>
      <title>Select Multiple calculation not working if two things are selected</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/select-multiple-calculation-not-working-if-two/m-p/1507245#M57992</link>
      <description>&lt;P&gt;Hello! I'm currently having an issue where I would like a text field to populate based off of answers in a select multiple question. The issue is that when two choices are selected, it seems to negate the calculation and nothing will then show up in the field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;if((${selectmultiple list} = 'choice'), 'input message in field', ' ') + if((${same select multiple list as befor} = 'different choice'), 'Print different message in the field. but in addition to other message if both are selected', ' ')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example! of one of my calculations&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 11:59:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/select-multiple-calculation-not-working-if-two/m-p/1507245#M57992</guid>
      <dc:creator>sophered</dc:creator>
      <dc:date>2024-07-19T11:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Select Multiple calculation not working if two things are selected</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/select-multiple-calculation-not-working-if-two/m-p/1507246#M57993</link>
      <description>&lt;P&gt;Select multiple questions are stored as a comma separated list (option1,option2,option3) so when you do question = optiona then it is only true when only that option is selected. If you want to check to see if a specific choice was selected you have to use the selected() function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;selected(${question_one}, 'optiona')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if(selected(${question_one}, 'optiona') and selected(${question_one}, 'optionb'), 'Some message that works when both are selected', if(selected(${question_one}, 'optiona'), 'Some message for only 1 option selected', 'Message for neither selected'))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 12:16:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/select-multiple-calculation-not-working-if-two/m-p/1507246#M57993</guid>
      <dc:creator>JenniferAcunto</dc:creator>
      <dc:date>2024-07-19T12:16:08Z</dc:date>
    </item>
  </channel>
</rss>

