<?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: Correlate calculation to subsequent answer (auto-populate?) in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/correlate-calculation-to-subsequent-answer-auto/m-p/791478#M8334</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That error suggests that one of the three elements of an "if" statement is missing (test condition, return if true, return if false). With how complicated nested ifs can get, it could just be an issue of a missing comma somewhere in the statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Dec 2018 00:30:33 GMT</pubDate>
    <dc:creator>StephenM</dc:creator>
    <dc:date>2018-12-04T00:30:33Z</dc:date>
    <item>
      <title>Correlate calculation to subsequent answer (auto-populate?)</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/correlate-calculation-to-subsequent-answer-auto/m-p/791475#M8331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got a survey where I'm trying to calculate a numerical risk score and correlate that score to a risk level, e.g. low, moderate &amp;amp; high based on varying scores. Currently I'm able to calculate the score and use relevance to display the risk level on the survey, but I need to use the risk level (low, moderate, high)&amp;nbsp;in reporting and Operations Dashboard.&amp;nbsp; Is there a way to automatically select an answer to&amp;nbsp;a select one risk level question based on a calculation?&amp;nbsp; Or any other ways of&amp;nbsp;accomplishing&amp;nbsp;this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2018 16:31:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/correlate-calculation-to-subsequent-answer-auto/m-p/791475#M8331</guid>
      <dc:creator>DaveSarver1</dc:creator>
      <dc:date>2018-12-03T16:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate calculation to subsequent answer (auto-populate?)</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/correlate-calculation-to-subsequent-answer-auto/m-p/791476#M8332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could create a text field and use nested "if" statements to calculate the value based on the score.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;if(${riskScore} &amp;lt; 100, "Low", if(${riskScore} &amp;lt; 300, "Moderate", if(${riskScore} &amp;gt;= 300, "High", "None")))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This calculation would set the text value to be "Low" if riskScore is &amp;lt;100, "Moderate" if riskScore is &amp;gt;= 100 and &amp;lt; 300, "High" if riskScore is &amp;gt;= 300, and "None" otherwise (if riskScore is blank, for example).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This thread has more discussion about nested "if" statements:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/214429"&gt;How to use "if" and "then" on survey 123?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2018 20:48:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/correlate-calculation-to-subsequent-answer-auto/m-p/791476#M8332</guid>
      <dc:creator>StephenM</dc:creator>
      <dc:date>2018-12-03T20:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate calculation to subsequent answer (auto-populate?)</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/correlate-calculation-to-subsequent-answer-auto/m-p/791477#M8333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Thanks Stephen!&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I had tried that and tried it again after your recommendation.&amp;nbsp; The error I keep getting says "...XPath evaluation: cannot handle function 'if' requires 3 arguments. Only 2 provided.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2018 23:18:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/correlate-calculation-to-subsequent-answer-auto/m-p/791477#M8333</guid>
      <dc:creator>DaveSarver1</dc:creator>
      <dc:date>2018-12-03T23:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate calculation to subsequent answer (auto-populate?)</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/correlate-calculation-to-subsequent-answer-auto/m-p/791478#M8334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That error suggests that one of the three elements of an "if" statement is missing (test condition, return if true, return if false). With how complicated nested ifs can get, it could just be an issue of a missing comma somewhere in the statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2018 00:30:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/correlate-calculation-to-subsequent-answer-auto/m-p/791478#M8334</guid>
      <dc:creator>StephenM</dc:creator>
      <dc:date>2018-12-04T00:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Correlate calculation to subsequent answer (auto-populate?)</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/correlate-calculation-to-subsequent-answer-auto/m-p/791479#M8335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I finally figured it out!&amp;nbsp; Here's what I ended up with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE width="610"&gt;&lt;TBODY&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: none; background: #E6B8B7;" width="610"&gt;if((${total}&amp;gt;0 and ${total}&amp;lt;=12),"Unlikely",if((${total}&amp;gt;=13 and ${total}&amp;lt;=35),"Low",if((${total}&amp;gt;=36 and ${total}&amp;lt;=45),"Moderate",if(${total}&amp;gt;=46,"High",null))))&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your help Stephen!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2018 15:40:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/correlate-calculation-to-subsequent-answer-auto/m-p/791479#M8335</guid>
      <dc:creator>DaveSarver1</dc:creator>
      <dc:date>2018-12-04T15:40:23Z</dc:date>
    </item>
  </channel>
</rss>

