<?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: Cascading updates with two Select One Lists in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/cascading-updates-with-two-select-one-lists/m-p/868116#M27495</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of having the two questions try to populate eachother, make them both null and have them both populate a separate pair of read-only fields. I've attached a sample form that expands on an earlier example I provided on this exact workflow &lt;A _jive_internal="true" href="https://community.esri.com/thread/216724-two-way-choice-filter"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The gist of it is that you have your two select_one questions (${SciName} and ${ComName}) and then two read-only text fields with the following calculations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scientific Name: &lt;STRONG&gt;coalesce(${SciName},pulldata('SpeciesNames', 'SciNam', 'ComNam', ${ComName}))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Common Name: &lt;STRONG&gt;coalesce(${ComName},pulldata('SpeciesNames', 'ComNam', 'SciNam', ${SciName}))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does present the possibility of a user selecting both a scientific name and a common name and populating these fields with a mismatch. For that case, we add a constraint to either one of the text fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if((${SciName}!='' and ${ComName}!=''), (${SciName}=pulldata('SpeciesNames', 'SciNam', 'ComNam', ${ComName}) and ${ComName}=pulldata('SpeciesNames', 'ComNam', 'SciNam', ${SciName})),1=1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This checks to see if both of your select_one questions are answered, and if yes, it makes sure everything matches correctly (the selected scientific name equals the pulldata from the common name, and vice versa). The else case, 1=1 (i.e. no real constraint), is triggered only if one, the other, or neither select_one is answered. The attached form also includes a note question with a similar calculation in the &lt;SPAN style="text-decoration: underline;"&gt;relevant&lt;/SPAN&gt; column, which warns that there's a name mismatch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Sep 2018 22:14:32 GMT</pubDate>
    <dc:creator>NickDierks1</dc:creator>
    <dc:date>2018-09-27T22:14:32Z</dc:date>
    <item>
      <title>Cascading updates with two Select One Lists</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/cascading-updates-with-two-select-one-lists/m-p/868113#M27492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&amp;nbsp; I've worked with Survey 123 a bit, and have experience updating a text field based on a change in a Select one Drop down list. This works great!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have another requirement now for a 2-way update between two select_one drop down lists, and pulldata doesn't seem to work in this instance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two Select Lists, with species scientific name, and then common name.&amp;nbsp; What we want is, if either of the two lists are updated, the "other" name for the sighting will be updated. It could work both ways.&amp;nbsp; A user could enter either the common name or the Latin name, and have the other one update.&amp;nbsp; Using the same pulldata approach didn't do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought I read somewhere that this was not supported until v3.&amp;nbsp; I upgraded and can't get it to work.&amp;nbsp; Any thoughts? Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2018 17:33:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/cascading-updates-with-two-select-one-lists/m-p/868113#M27492</guid>
      <dc:creator>GregConiglio</dc:creator>
      <dc:date>2018-09-21T17:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Cascading updates with two Select One Lists</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/cascading-updates-with-two-select-one-lists/m-p/868114#M27493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Greg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you are describing can't be implemented in Survey123 - cyclical calculations (if a is set, set b; if b is set, set a) aren't allowed in a form (while they might be able to work in this case, if involved with a mathematical calculation this could lead to an endless loop of calculations).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2018 17:59:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/cascading-updates-with-two-select-one-lists/m-p/868114#M27493</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2018-09-21T17:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: Cascading updates with two Select One Lists</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/cascading-updates-with-two-select-one-lists/m-p/868115#M27494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks James!&amp;nbsp; &amp;nbsp;Do you have any suggestions for a workaround for a scenario like this?&amp;nbsp; They would like the ability to update the species record with either the common or Latin Name..... Cant' think of a way to do this without drop down lists! Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2018 18:16:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/cascading-updates-with-two-select-one-lists/m-p/868115#M27494</guid>
      <dc:creator>GregConiglio</dc:creator>
      <dc:date>2018-09-24T18:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: Cascading updates with two Select One Lists</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/cascading-updates-with-two-select-one-lists/m-p/868116#M27495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of having the two questions try to populate eachother, make them both null and have them both populate a separate pair of read-only fields. I've attached a sample form that expands on an earlier example I provided on this exact workflow &lt;A _jive_internal="true" href="https://community.esri.com/thread/216724-two-way-choice-filter"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The gist of it is that you have your two select_one questions (${SciName} and ${ComName}) and then two read-only text fields with the following calculations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scientific Name: &lt;STRONG&gt;coalesce(${SciName},pulldata('SpeciesNames', 'SciNam', 'ComNam', ${ComName}))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Common Name: &lt;STRONG&gt;coalesce(${ComName},pulldata('SpeciesNames', 'ComNam', 'SciNam', ${SciName}))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does present the possibility of a user selecting both a scientific name and a common name and populating these fields with a mismatch. For that case, we add a constraint to either one of the text fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if((${SciName}!='' and ${ComName}!=''), (${SciName}=pulldata('SpeciesNames', 'SciNam', 'ComNam', ${ComName}) and ${ComName}=pulldata('SpeciesNames', 'ComNam', 'SciNam', ${SciName})),1=1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This checks to see if both of your select_one questions are answered, and if yes, it makes sure everything matches correctly (the selected scientific name equals the pulldata from the common name, and vice versa). The else case, 1=1 (i.e. no real constraint), is triggered only if one, the other, or neither select_one is answered. The attached form also includes a note question with a similar calculation in the &lt;SPAN style="text-decoration: underline;"&gt;relevant&lt;/SPAN&gt; column, which warns that there's a name mismatch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 22:14:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/cascading-updates-with-two-select-one-lists/m-p/868116#M27495</guid>
      <dc:creator>NickDierks1</dc:creator>
      <dc:date>2018-09-27T22:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cascading updates with two Select One Lists</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/cascading-updates-with-two-select-one-lists/m-p/868117#M27496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Greg,&lt;/P&gt;&lt;P&gt;A couple of options:&lt;/P&gt;&lt;P&gt;1) You can include both the common name and scientific name in the same label; an autocomplete appearance will let the user type in either&lt;/P&gt;&lt;P&gt;2)&amp;nbsp;You could have a survey with 3&amp;nbsp;dropdowns:&lt;/P&gt;&lt;P&gt;- q1: Search by Common or Scientific name?&lt;/P&gt;&lt;P&gt;- q2: Common Name search (relevant when q1:common is selected)&lt;/P&gt;&lt;P&gt;- q3: Scientific Name search (relevant when q1:scientific is selected)&lt;/P&gt;&lt;P&gt;and a 4th question of type calculate to store the answer using coalesce() function to get the value from either questions:&lt;/P&gt;&lt;P&gt;coalesce(${q2}, ${q3})&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The coalesce function returns the first non-null value in the presented from the two options.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2018 18:51:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/cascading-updates-with-two-select-one-lists/m-p/868117#M27496</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2018-10-03T18:51:02Z</dc:date>
    </item>
  </channel>
</rss>

