<?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: Compare string values in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/compare-string-values/m-p/853809#M24207</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Finnian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the same approach for both 1) and 2) above (it does not matter if question 1 and 2 point to the same or a different choice list).&lt;/P&gt;&lt;P&gt;You would use a constraint as you described:&lt;/P&gt;&lt;TABLE width="1160"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59; background: #9BBB59;" width="156"&gt;type&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #9BBB59;" width="156"&gt;name&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #9BBB59;" width="260"&gt;label&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #9BBB59;" width="196"&gt;hint&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #9BBB59;" width="196"&gt;constraint&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #9BBB59;" width="196"&gt;constraint_message&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="196"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="196"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;select_one rating&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="156"&gt;choice1&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;Choice1&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="196"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="196"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;select_one rating&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="156"&gt;choice2&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;Choice2&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="196"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;.!=${choice1}&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="196"&gt;Choice1 can't&amp;nbsp; = Choice2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above works - and will result in an error on submission if the the 2 choices are the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Oct 2017 00:18:46 GMT</pubDate>
    <dc:creator>JohnathanHasthorpe</dc:creator>
    <dc:date>2017-10-20T00:18:46Z</dc:date>
    <item>
      <title>Compare string values</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/compare-string-values/m-p/853808#M24206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two similar scenarios that require strings to be compared:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) A form with two select_one questions, each with a separate lookup list. There is some duplication between the lookup lists. When an value is picked for question 1, it should not be allowed as an answer to question 2. Can I compare the strings to raise an error for the user? Or is it possible to exclude the answer of&amp;nbsp;question 1 from appearing in the lookup list for question 2?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Similar to scenario 1, except the two questions use the same lookup list. Again, the value chosen for question 1 should not be allowed as the value for question 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to undertake string comparison in a constraint? so the constraint for question 2 would look like &lt;EM&gt;.!=${question1}&lt;/EM&gt; or perhaps&amp;nbsp;&lt;EM&gt;not(selected(.,${question1}))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Finnian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 14:53:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/compare-string-values/m-p/853808#M24206</guid>
      <dc:creator>FinnianO_Connor</dc:creator>
      <dc:date>2017-10-19T14:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: Compare string values</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/compare-string-values/m-p/853809#M24207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Finnian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the same approach for both 1) and 2) above (it does not matter if question 1 and 2 point to the same or a different choice list).&lt;/P&gt;&lt;P&gt;You would use a constraint as you described:&lt;/P&gt;&lt;TABLE width="1160"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59; background: #9BBB59;" width="156"&gt;type&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #9BBB59;" width="156"&gt;name&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #9BBB59;" width="260"&gt;label&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #9BBB59;" width="196"&gt;hint&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #9BBB59;" width="196"&gt;constraint&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: white; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #9BBB59;" width="196"&gt;constraint_message&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="196"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="196"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;select_one rating&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="156"&gt;choice1&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;Choice1&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="196"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="196"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;select_one rating&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="156"&gt;choice2&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="260"&gt;Choice2&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="196"&gt;&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;.!=${choice1}&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="196"&gt;Choice1 can't&amp;nbsp; = Choice2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above works - and will result in an error on submission if the the 2 choices are the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 00:18:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/compare-string-values/m-p/853809#M24207</guid>
      <dc:creator>JohnathanHasthorpe</dc:creator>
      <dc:date>2017-10-20T00:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Compare string values</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/compare-string-values/m-p/853810#M24208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply John. Is it possible to raise an error before the point of submission? It would be preferable to have the user correct the answer before moving on with the survey. A more elegant solution would be to remove the answer for question 1 from the lookup list of question 2 (see&amp;nbsp;&lt;A href="https://community.esri.com/message/683657-excluding-a-value-in-a-list"&gt;https://community.esri.com/message/683657-excluding-a-value-in-a-list&lt;/A&gt;&amp;nbsp;where i've gone into detail on what i'm trying to do). I haven't been able to get this working, so what you describe here will prevent the error making it to the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Finnian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 13:21:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/compare-string-values/m-p/853810#M24208</guid>
      <dc:creator>FinnianO_Connor</dc:creator>
      <dc:date>2017-10-20T13:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Compare string values</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/compare-string-values/m-p/853811#M24209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Finnian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Survey123 currently doesn't check select against constraints as their values change. &amp;nbsp;We have an enhancement issue open to have a more consistent experience for constraint checking; I've added this example as a use case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 17:37:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/compare-string-values/m-p/853811#M24209</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2017-10-20T17:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Compare string values</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/compare-string-values/m-p/853812#M24210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the additional information James. Definitely with a long survey form, correcting errors at the time of data input would be the preferred choice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 17:42:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/compare-string-values/m-p/853812#M24210</guid>
      <dc:creator>FinnianO_Connor</dc:creator>
      <dc:date>2017-10-20T17:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Compare string values</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/compare-string-values/m-p/853813#M24211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was also reminded that with Survey123 Connect you can place a warning message below the select multiple that has a relevant function the same as the constraint to alert the user while they are filling in the form; this provides some in-context alerting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 18:36:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/compare-string-values/m-p/853813#M24211</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2017-10-20T18:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Compare string values</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/compare-string-values/m-p/853814#M24212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's a nice way to get a warning message to the user. Do you know is there a way to actually exclude the answer provided to question1 from the lookup list of question2. I tried to add logic to the choice_filter however this was unsuccessful (see &lt;A href="https://community.esri.com/thread/194227-excluding-a-value-in-a-list"&gt;https://community.esri.com/thread/194227-excluding-a-value-in-a-list&lt;/A&gt;&amp;nbsp;).&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 18:48:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/compare-string-values/m-p/853814#M24212</guid>
      <dc:creator>FinnianO_Connor</dc:creator>
      <dc:date>2017-10-20T18:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: Compare string values</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/compare-string-values/m-p/853815#M24213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Finnian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is currently supported in the web for forms authored in Survey123 Connect; however, the field app &amp;amp; Connect don't support using/previewing choice list statements aside from equality comparisons.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 21:22:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/compare-string-values/m-p/853815#M24213</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2017-10-20T21:22:16Z</dc:date>
    </item>
  </channel>
</rss>

