<?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: Code Help for IF Then using Drop Down List in Survey123 in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/code-help-for-if-then-using-drop-down-list-in/m-p/1183536#M43283</link>
    <description>&lt;P&gt;I recommend taking a look at &lt;A href="https://community.esri.com/t5/arcgis-survey123-questions/nested-if-statements-in-survey123/td-p/870601" target="_blank" rel="noopener"&gt;this&lt;/A&gt; post of mine from a few years back - I still reference it when I need to double check my nested if statement syntax!&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is me taking a stab at the syntax you'd need - it should be really close at least!&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(selected(${field_one}, "E"), "bird xyz", if(selected(${field_one}, "C"), "Dog xyz", if(selected(${field_one}, "B"), "cat xyz", "monkey xyz")))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jun 2022 14:23:04 GMT</pubDate>
    <dc:creator>Katie_Clark</dc:creator>
    <dc:date>2022-06-16T14:23:04Z</dc:date>
    <item>
      <title>Code Help for IF Then using Drop Down List in Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/code-help-for-if-then-using-drop-down-list-in/m-p/1183531#M43282</link>
      <description>&lt;P&gt;Does anyone know the proper formatting for doing if then statements with a drop down list in survey 123.&lt;/P&gt;&lt;P&gt;First question is a drop down list with choices: A, B, C, D, E, F, G, ... (total options is close to 100, so i didn't want to do a single choice/select one format)&lt;/P&gt;&lt;P&gt;The second question is a single text line that I'd like to populate from the drop down answer in the first question:&amp;nbsp;&lt;/P&gt;&lt;P&gt;what I'd like to Do:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;If question one is "E"&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;then question two equals "bird xyz"&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Else if question one is "C"&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;then question two equals "dog xyz"&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;so on and so forth....&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Else (if other is selected and filled in)&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;then question two is "other"&lt;/P&gt;&lt;P&gt;The current code I have:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;if((${field_one}, "E"), "bird xyz"), elif((${field_one}, "C"), "Dog xyz"), elif((${field_one}, "B"), "cat xyz"), else("monkey xyz")&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 14:16:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/code-help-for-if-then-using-drop-down-list-in/m-p/1183531#M43282</guid>
      <dc:creator>AustinGootee</dc:creator>
      <dc:date>2022-06-16T14:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Code Help for IF Then using Drop Down List in Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/code-help-for-if-then-using-drop-down-list-in/m-p/1183536#M43283</link>
      <description>&lt;P&gt;I recommend taking a look at &lt;A href="https://community.esri.com/t5/arcgis-survey123-questions/nested-if-statements-in-survey123/td-p/870601" target="_blank" rel="noopener"&gt;this&lt;/A&gt; post of mine from a few years back - I still reference it when I need to double check my nested if statement syntax!&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is me taking a stab at the syntax you'd need - it should be really close at least!&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(selected(${field_one}, "E"), "bird xyz", if(selected(${field_one}, "C"), "Dog xyz", if(selected(${field_one}, "B"), "cat xyz", "monkey xyz")))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 14:23:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/code-help-for-if-then-using-drop-down-list-in/m-p/1183536#M43283</guid>
      <dc:creator>Katie_Clark</dc:creator>
      <dc:date>2022-06-16T14:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Code Help for IF Then using Drop Down List in Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/code-help-for-if-then-using-drop-down-list-in/m-p/1183557#M43284</link>
      <description>&lt;P&gt;Thank you, that seems like in general the right way to go, but i'm still getting an invalid syntax error (figured i'd try it on a few options before i add the code for all of the drop down items). Any ideas?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AustinGootee_0-1655390463879.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/43624i39650EE622419985/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AustinGootee_0-1655390463879.png" alt="AustinGootee_0-1655390463879.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 14:42:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/code-help-for-if-then-using-drop-down-list-in/m-p/1183557#M43284</guid>
      <dc:creator>AustinGootee</dc:creator>
      <dc:date>2022-06-16T14:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: Code Help for IF Then using Drop Down List in Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/code-help-for-if-then-using-drop-down-list-in/m-p/1183563#M43285</link>
      <description>&lt;P&gt;Hmmm, well in this specific case I think you need an additional parentheses at the end to close the loops. I often write my expressions in a text editor with syntax highlighting so I can better see which parentheses are paired with which.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Katherine_Clark_0-1655390911431.png" style="width: 720px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/43626i85377AE7469AEF18/image-dimensions/720x36?v=v2" width="720" height="36" role="button" title="Katherine_Clark_0-1655390911431.png" alt="Katherine_Clark_0-1655390911431.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, now that I see what you're doing (having the user choose the common name and populate the scientific name automatically), this really sounds like the ideal situation for pulling data from external CSV's. I make all my surveys in Survey123 Connect, and that's the method I use since I work in the environmental industry and the common/scientific name translation is a requirement for almost every survey!&lt;/P&gt;&lt;P&gt;Here's a great &lt;A href="https://community.esri.com/t5/arcgis-survey123-blog/use-existing-data-in-your-survey-the-pulldata/ba-p/896889" target="_blank" rel="noopener"&gt;post&lt;/A&gt; from James Tedrick that can give you more info on that functionality.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 14:51:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/code-help-for-if-then-using-drop-down-list-in/m-p/1183563#M43285</guid>
      <dc:creator>Katie_Clark</dc:creator>
      <dc:date>2022-06-16T14:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Code Help for IF Then using Drop Down List in Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/code-help-for-if-then-using-drop-down-list-in/m-p/1183975#M43303</link>
      <description>&lt;P&gt;Thank you Survey123 Connect was definitely the way to go, I tried updating the code online with the extra parathesis and it still wasn't working. Now i just need to do some technical work to get the surveys to save onto our server and not the local machine, so anyone can access their designs, but that's a task for another day.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;As for the survey 123 connect and the csv tables, I was able to add the table and utilize it to fill in the scientific name based on a drop down list of common names (previously created online). Is there a way for me to use the common name field in the csv file that I added to create a drop down list, instead of having to fill in the choices sheet in the survey's excel file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AustinGootee_0-1655484999133.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/43717i9F7421153A1EAB86/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AustinGootee_0-1655484999133.png" alt="AustinGootee_0-1655484999133.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AustinGootee_1-1655485723952.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/43725iF29A5E81935D06C5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AustinGootee_1-1655485723952.png" alt="AustinGootee_1-1655485723952.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 17:09:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/code-help-for-if-then-using-drop-down-list-in/m-p/1183975#M43303</guid>
      <dc:creator>AustinGootee</dc:creator>
      <dc:date>2022-06-17T17:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Code Help for IF Then using Drop Down List in Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/code-help-for-if-then-using-drop-down-list-in/m-p/1183998#M43308</link>
      <description>&lt;P&gt;Yup! I recommend reading this post about &lt;A href="https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-external-choice/ba-p/1055534" target="_blank" rel="noopener"&gt;external choice lists&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 18:35:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/code-help-for-if-then-using-drop-down-list-in/m-p/1183998#M43308</guid>
      <dc:creator>Katie_Clark</dc:creator>
      <dc:date>2022-06-17T18:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: Code Help for IF Then using Drop Down List in Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/code-help-for-if-then-using-drop-down-list-in/m-p/1184006#M43310</link>
      <description>&lt;P&gt;Thank you so much&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/232739"&gt;@Katie_Clark&lt;/a&gt;!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 18:46:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/code-help-for-if-then-using-drop-down-list-in/m-p/1184006#M43310</guid>
      <dc:creator>AustinGootee</dc:creator>
      <dc:date>2022-06-17T18:46:54Z</dc:date>
    </item>
  </channel>
</rss>

