<?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: Survey123 regex calculation in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-regex-calculation/m-p/805268#M11816</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for clarifying. &amp;nbsp;The issue is that you want the value of 'Emerging/Critical' question applied to the Status question when 'Emerging/Critical' is relevant, but set to None otherwise, correct? &amp;nbsp;In that case, I would suggest changing your if() statement to look for whether the 'Emerging/Critical' question has a value, and None otherwise. &amp;nbsp;This can be done with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(count-selected(${timing}) &amp;gt; 0, ${timing}, 'None')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This assumes the name value of the status choices match the name values in the emerging/critical list and that the 'None' choice&amp;nbsp;in status has a name with the value of 'None'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Oct 2018 20:27:38 GMT</pubDate>
    <dc:creator>JamesTedrick</dc:creator>
    <dc:date>2018-10-17T20:27:38Z</dc:date>
    <item>
      <title>Survey123 regex calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-regex-calculation/m-p/805264#M11812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a question that I want to&amp;nbsp;use regex calculation to populate. if(regex(${timing},'emerging'),'emerging_issue','critical_issue')&lt;/P&gt;&lt;P&gt;My reason for this&amp;nbsp;post is because the question that the regex refers to has a relevant formula to not display if a certain choice is selected in the survey.&amp;nbsp; Because of the regex formula it defaults to the second choice "critical_issue"when really I want it to default to a "None" answer.&amp;nbsp; I put none in the default column and it works in surveyconnect version 2.9.3 but it does not work in the app version 3.1.68.&amp;nbsp; Do you have any suggestions on how to make this work?&amp;nbsp; Is there a different way other than the regex formula?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2018 14:26:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-regex-calculation/m-p/805264#M11812</guid>
      <dc:creator>EricS</dc:creator>
      <dc:date>2018-10-16T14:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 regex calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-regex-calculation/m-p/805265#M11813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you provide the XLS file or a screenshot of the question's configuration? From your description, it sounds like the formulas is functioning correctly - if the regex is false, then the value 'critical_issue' will be set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2018 18:24:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-regex-calculation/m-p/805265#M11813</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2018-10-16T18:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 regex calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-regex-calculation/m-p/805266#M11814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The XLS file is a little too stripped down to try to replicate. &amp;nbsp;Based on the description in the writeup, is sounds as if you&amp;nbsp;need to change the second value in the if statement to reflect the 'None' choice - that would cause the select_one to be set to that choice when the timing question is not 'emerging'. &amp;nbsp;I would also suggest using the selected() function in this case as opposed to regex() since the timing question is a single choice question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2018 20:59:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-regex-calculation/m-p/805266#M11814</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2018-10-16T20:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 regex calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-regex-calculation/m-p/805267#M11815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;James&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for taking the time to review my issue I am sure you are very&lt;/P&gt;&lt;P&gt;busy.  I have revised my writeup on the situation as I think I was not&lt;/P&gt;&lt;P&gt;explaining myself well.  Please see the attached word doc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 09:37:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-regex-calculation/m-p/805267#M11815</guid>
      <dc:creator>EricS</dc:creator>
      <dc:date>2018-10-17T09:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 regex calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-regex-calculation/m-p/805268#M11816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for clarifying. &amp;nbsp;The issue is that you want the value of 'Emerging/Critical' question applied to the Status question when 'Emerging/Critical' is relevant, but set to None otherwise, correct? &amp;nbsp;In that case, I would suggest changing your if() statement to look for whether the 'Emerging/Critical' question has a value, and None otherwise. &amp;nbsp;This can be done with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(count-selected(${timing}) &amp;gt; 0, ${timing}, 'None')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This assumes the name value of the status choices match the name values in the emerging/critical list and that the 'None' choice&amp;nbsp;in status has a name with the value of 'None'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 20:27:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-regex-calculation/m-p/805268#M11816</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2018-10-17T20:27:38Z</dc:date>
    </item>
  </channel>
</rss>

