<?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 Using Conditional Calculations to auto-populate fields in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772722#M4237</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each question should be evaluated in their own selected() function and joined. &amp;nbsp;In your case, if you want Q1-5 to be 'Yes', you do not need the second set of evaluations:&lt;/P&gt;&lt;P&gt;if(selected(&lt;SPAN style="background-color: #ffffff;"&gt;${Q1},&amp;nbsp;&lt;SPAN&gt;'Yes'&lt;/SPAN&gt;) and&amp;nbsp;&lt;SPAN&gt;selected(&lt;/SPAN&gt;${Q2},&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;'Yes'&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;) and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;selected(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="border: 0px;"&gt;${Q3}&lt;SPAN style="background-color: #ffffff;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;'Yes'&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;) and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;selected(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="border: 0px;"&gt;${Q4}&lt;SPAN style="background-color: #ffffff;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;'Yes'&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;) and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;selected(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="border: 0px;"&gt;${Q5}&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;,'Yes'), 'Pass', 'Fail')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Feb 2020 22:05:54 GMT</pubDate>
    <dc:creator>JamesTedrick</dc:creator>
    <dc:date>2020-02-19T22:05:54Z</dc:date>
    <item>
      <title>Survey123 Using Conditional Calculations to auto-populate fields</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772714#M4229</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 am working on a utility pole inspection form that will have multiple questions and am trying to figure a way to create a shortcut field (Quick_Pick) that will auto populate these questions when either everything is Okay or they cannot inspect the pole while still allowing them to choose other answers if needed.&amp;nbsp; So far I have the following questions setup.&amp;nbsp; Both fields are select_one type with their corresponding choice lists.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Field Name&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="text-decoration: underline;"&gt;Choices&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Quick_Pick&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"OK" or "No Inspect"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pole_Condition&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;"OK" or null&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ive been hacking around trying to create a calculation on the Pole_Condition field without any success.&amp;nbsp; Below is my latest failed attempt.&amp;nbsp; Is what I'm trying to do even possible and if so what am I doing wrong?&amp;nbsp; Any help would be appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(selected(${Quick_Pick},'OK'),'OK', or selected(${Quick_Pick}, 'No_Inspect'), 'null')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Josh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Feb 2018 15:24:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772714#M4229</guid>
      <dc:creator>JoshHabel</dc:creator>
      <dc:date>2018-02-17T15:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Using Conditional Calculations to auto-populate fields</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772715#M4230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Josh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I understand you correctly - you want to update pole_condition based on the answer in quick_pick. If so then the following should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;if(selected(${Quick_Pick},'ok'),'OK', if(selected(${Quick_Pick},'no_inspect'),'null', ''))&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;- if you select OK in quick_pick then we will select ok in pole_condition&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;- else if you select no_inspect in quick_pick then we will select null in pole_condition&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;- else we return nothing&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;Note that 'null' would be a choice in your list in the above.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I hope this helps&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Thanks&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Feb 2018 12:17:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772715#M4230</guid>
      <dc:creator>JohnathanHasthorpe</dc:creator>
      <dc:date>2018-02-18T12:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Using Conditional Calculations to auto-populate fields</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772716#M4231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately that did not work either.  The only way i can get it to work is to turn the field with the calculate statement into a "text" field which of course defeats my purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Josh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Feb 2018 18:40:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772716#M4231</guid>
      <dc:creator>JoshHabel</dc:creator>
      <dc:date>2018-02-18T18:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Using Conditional Calculations to auto-populate fields</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772717#M4232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Josh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry - I should have mentioned that calculations in select_one questions are not currently supported. The good news is that they will be at 2.7 and you can test the functionality out in the Early Adopter Community now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2018 23:47:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772717#M4232</guid>
      <dc:creator>JohnathanHasthorpe</dc:creator>
      <dc:date>2018-02-19T23:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Using Conditional Calculations to auto-populate fields</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772718#M4233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;I'm working with version 2.7.72 now and i'm unable to get my calculation on a select_one to work.&amp;nbsp; I want my select_one to pick "Not Started" if any of my other questions = "yes".&amp;nbsp; i had this working as a hidden text field no problem, but we'd like to update this status field after the initial survey is collected.&amp;nbsp; I haven't been able to find an example of how to accomplish this, i hope you can help.&lt;BR /&gt;Thanks!&lt;BR /&gt;Sue&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2018 20:05:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772718#M4233</guid>
      <dc:creator>SueJohnston</dc:creator>
      <dc:date>2018-04-20T20:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Using Conditional Calculations to auto-populate fields</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772719#M4234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see attached&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 03:37:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772719#M4234</guid>
      <dc:creator>JohnathanHasthorpe</dc:creator>
      <dc:date>2018-04-24T03:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Using Conditional Calculations to auto-populate fields</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772720#M4235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Johnathan, I was able to get this to work! &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 13:26:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772720#M4235</guid>
      <dc:creator>SueJohnston</dc:creator>
      <dc:date>2018-04-24T13:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Using Conditional Calculations to auto-populate fields</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772721#M4236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to use multiple questions to auto fill a question?&amp;nbsp; I've got a couple of inspection forms where it will say something along the lines of, "A 'No' to any of questions 1-5 results in a Failed inspection."&amp;nbsp; I'm using Survey123 Connect version 2.4.6 (not able to upgrade without admin approval).&amp;nbsp; I've got it set up as a select one and for right now that's fine, but if I can automate out any human error that would be great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would something like this work?&amp;nbsp; I'm not sure how to add multiple conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(selected(${Q1}and${Q2}&lt;SPAN&gt;and${Q3}&lt;/SPAN&gt;&lt;SPAN&gt;and${Q4}&lt;/SPAN&gt;&lt;SPAN&gt;and${Q5}&lt;/SPAN&gt;,'Yes'),'Pass', if(selected(${Q1}or${Q2}&lt;SPAN&gt;or${Q3}&lt;/SPAN&gt;&lt;SPAN&gt;or${Q4}&lt;/SPAN&gt;&lt;SPAN&gt;or${Q5}&lt;/SPAN&gt;,'No'),'Fail', ''))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2020 18:20:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772721#M4236</guid>
      <dc:creator>TimFlynn</dc:creator>
      <dc:date>2020-02-14T18:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Using Conditional Calculations to auto-populate fields</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772722#M4237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each question should be evaluated in their own selected() function and joined. &amp;nbsp;In your case, if you want Q1-5 to be 'Yes', you do not need the second set of evaluations:&lt;/P&gt;&lt;P&gt;if(selected(&lt;SPAN style="background-color: #ffffff;"&gt;${Q1},&amp;nbsp;&lt;SPAN&gt;'Yes'&lt;/SPAN&gt;) and&amp;nbsp;&lt;SPAN&gt;selected(&lt;/SPAN&gt;${Q2},&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;'Yes'&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;) and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;selected(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="border: 0px;"&gt;${Q3}&lt;SPAN style="background-color: #ffffff;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;'Yes'&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;) and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;selected(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="border: 0px;"&gt;${Q4}&lt;SPAN style="background-color: #ffffff;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;'Yes'&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;) and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;selected(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="border: 0px;"&gt;${Q5}&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;,'Yes'), 'Pass', 'Fail')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2020 22:05:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772722#M4237</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2020-02-19T22:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Using Conditional Calculations to auto-populate fields</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772723#M4238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;James this worked perfectly, thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2020 12:06:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772723#M4238</guid>
      <dc:creator>TimFlynn</dc:creator>
      <dc:date>2020-02-20T12:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Using Conditional Calculations to auto-populate fields</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772724#M4239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;James, I'm not sure if this goes here in this thread, but...I am trying to use an if statement for a calculation but I don't know if it will work. I have a calculate field that adds up all the other calculated fields. But not all calc fields will be filled in, these are set up with the relevant field. My calc field will work in my survey if I select everything in my select multiple, then the calcs all run, but how do I get it to run the calc even if fields are not selected, or filled in? So if I select 3 out 4 in my select multiple question, then calculate those values, the last calc field will not run. I need to select all 4. I want the option to run it with everything or anything selected and filled in. And I am not sure how to do that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2020 16:03:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-using-conditional-calculations-to-auto/m-p/772724#M4239</guid>
      <dc:creator>JohnWatson_EBA</dc:creator>
      <dc:date>2020-03-10T16:03:18Z</dc:date>
    </item>
  </channel>
</rss>

