<?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: Problem: nesting Selected function inside the If function is not working in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-nesting-selected-function-inside-the-if/m-p/1241280#M46526</link>
    <description>&lt;P&gt;Using double quotes worked! Thank you.&lt;/P&gt;&lt;P&gt;Is there a way to prevent the formula from executing before a number is selected? The IF function is selecting the True item by default.&lt;/P&gt;&lt;P&gt;You mentioned that “something else is going on.” I think you mean it’s maybe a side-effect. I’ve attached the xlsx file as requested. Thanks again.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Dec 2022 18:53:27 GMT</pubDate>
    <dc:creator>vocono1953</dc:creator>
    <dc:date>2022-12-14T18:53:27Z</dc:date>
    <item>
      <title>Problem: nesting Selected function inside the If function is not working</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-nesting-selected-function-inside-the-if/m-p/1238890#M46403</link>
      <description>&lt;P&gt;The &lt;EM&gt;selected&lt;/EM&gt; function returns an integer with is the evaluated by the&lt;EM&gt; If &lt;/EM&gt;function that should return text to display in a text field. It’s not working. No doubt a syntax error but cannot see the error.&lt;/P&gt;&lt;P&gt;if(selectede(${lst_crew_cnt}) &amp;gt; 1, 'Data Entry Staff','Gardener')&lt;/P&gt;&lt;P&gt;It’s placed in the calculate field for the target text field.&lt;/P&gt;&lt;P&gt;Thank you for any help you can give.&lt;/P&gt;&lt;P&gt;--Bob&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 20:21:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-nesting-selected-function-inside-the-if/m-p/1238890#M46403</guid>
      <dc:creator>vocono1953</dc:creator>
      <dc:date>2022-12-07T20:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem: nesting Selected function inside the If function is not working</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-nesting-selected-function-inside-the-if/m-p/1238916#M46404</link>
      <description>&lt;P&gt;First you have a typo with an extra e.&amp;nbsp; You also have the ) in the wrong spot&amp;nbsp;selected(question, value)&lt;/P&gt;&lt;P&gt;if(selected&lt;STRONG&gt;e(&lt;/STRONG&gt;${lst_crew_cnt}) &amp;gt; 1, 'Data Entry Staff','Gardener')&lt;/P&gt;&lt;P&gt;Second selected actually returns True/false and not a number.&amp;nbsp; count-selected does that.&lt;/P&gt;&lt;P&gt;So you want this expect you have no other side of the if so not sure what you want there.&lt;/P&gt;&lt;P&gt;if(selected(${lst_crew_cnt}, 'Data Entry Staff'), 'Gardener', 'else??')&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 16:55:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-nesting-selected-function-inside-the-if/m-p/1238916#M46404</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-12-08T16:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem: nesting Selected function inside the If function is not working</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-nesting-selected-function-inside-the-if/m-p/1240775#M46493</link>
      <description>&lt;P&gt;Thank you for explaining what this selected function does. It was rewritten to use as a boolean expression.&lt;/P&gt;&lt;P&gt;if(selected(${lst_crew_cnt},'1'),'Data Entry Staff','Gardener&lt;SPAN&gt;')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The second parameter ('1') is the name used in the choice sheet for 'One', the label displayed in the list. If 'One' is selected, then&amp;nbsp;'Data Entry Staff' is displayed, else&amp;nbsp;'Gardener&lt;SPAN&gt;'. Each to be displayed in txt_gardener_role.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The problem is an error message saying the second parameter should have quotes. I &lt;/SPAN&gt;added&lt;SPAN&gt;&amp;nbsp;them but the same message appears. Once again, I'm not &lt;/SPAN&gt;understanding&lt;SPAN&gt;&amp;nbsp;why this generates an error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks again for any help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 20:34:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-nesting-selected-function-inside-the-if/m-p/1240775#M46493</guid>
      <dc:creator>vocono1953</dc:creator>
      <dc:date>2022-12-13T20:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem: nesting Selected function inside the If function is not working</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-nesting-selected-function-inside-the-if/m-p/1240786#M46496</link>
      <description>&lt;P&gt;Sorry hard to tell here but your formula looks correct now.&amp;nbsp; Where is this in a calc field?&amp;nbsp; Is it string, number, etc?&amp;nbsp; A screen shot or form would help.&amp;nbsp; Maybe try " double quotes and see if something is off there.&amp;nbsp; Something else is going on.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 20:45:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-nesting-selected-function-inside-the-if/m-p/1240786#M46496</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-12-13T20:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem: nesting Selected function inside the If function is not working</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-nesting-selected-function-inside-the-if/m-p/1241280#M46526</link>
      <description>&lt;P&gt;Using double quotes worked! Thank you.&lt;/P&gt;&lt;P&gt;Is there a way to prevent the formula from executing before a number is selected? The IF function is selecting the True item by default.&lt;/P&gt;&lt;P&gt;You mentioned that “something else is going on.” I think you mean it’s maybe a side-effect. I’ve attached the xlsx file as requested. Thanks again.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 18:53:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-nesting-selected-function-inside-the-if/m-p/1241280#M46526</guid>
      <dc:creator>vocono1953</dc:creator>
      <dc:date>2022-12-14T18:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem: nesting Selected function inside the If function is not working</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-nesting-selected-function-inside-the-if/m-p/1241281#M46527</link>
      <description>&lt;P&gt;The If function is on line 24.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 18:56:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-nesting-selected-function-inside-the-if/m-p/1241281#M46527</guid>
      <dc:creator>vocono1953</dc:creator>
      <dc:date>2022-12-14T18:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem: nesting Selected function inside the If function is not working</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-nesting-selected-function-inside-the-if/m-p/1241297#M46529</link>
      <description>&lt;P&gt;Form seems to work fine for me with the single quotes.&lt;/P&gt;&lt;P&gt;To wait for user input you can do 2 ways.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One is to use relevant of&amp;nbsp; ${lst_crew_cnt} != ''.&amp;nbsp; That way the field is not shown until the crew count is picked.&amp;nbsp; Not sure why you are doing 1 and One.&amp;nbsp; May be a data issue later esp if you want to use it as a number.&lt;/P&gt;&lt;P&gt;The other way if you want to always see the field is to wrap your if in another if, again checking for empty.&lt;/P&gt;&lt;P&gt;if(${lst_crew_cnt} != '',if(selected(${lst_crew_cnt},'1'),'Data Entry Staff','Gardener'),'')&lt;/P&gt;&lt;P&gt;You have a ton of groups in here and it is going to be pretty slow for you staff to fill out this form.&amp;nbsp; Basically they have to open a group for almost every question.&amp;nbsp; I would at least expand all of these but really the form is so short I would remove all the groups.&amp;nbsp; I personally think all that green burns the eyes but that is just an opinion.&amp;nbsp; In my experience all these font tags will become a pain when trying to use the data since it will be burned in there.&amp;nbsp; Take a look at it in a web map and see.&amp;nbsp; Again on such a simple form I do not think all this formatting is really needed.&amp;nbsp; Just an idea.&amp;nbsp; Not sure if this would bother color blind users.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 19:21:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-nesting-selected-function-inside-the-if/m-p/1241297#M46529</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-12-14T19:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem: nesting Selected function inside the If function is not working</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-nesting-selected-function-inside-the-if/m-p/1241578#M46551</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Just used single quotes and it works. &lt;/SPAN&gt;&lt;SPAN&gt;Go figure.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;${lst_crew_cnt&lt;/SPAN&gt;} !=&lt;SPAN&gt;&amp;nbsp;'' worked.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I task your points on the&amp;nbsp;colors and groups. I'll bring them up at our next meeting.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for all your help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 16:08:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-nesting-selected-function-inside-the-if/m-p/1241578#M46551</guid>
      <dc:creator>vocono1953</dc:creator>
      <dc:date>2022-12-15T16:08:36Z</dc:date>
    </item>
  </channel>
</rss>

