<?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: Constraint on Calculated Data in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-on-calculated-data/m-p/755781#M1679</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Found the examples of the form expressions for required fields and that works great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;--gary&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Feb 2020 16:36:08 GMT</pubDate>
    <dc:creator>GaryBowles1</dc:creator>
    <dc:date>2020-02-18T16:36:08Z</dc:date>
    <item>
      <title>Constraint on Calculated Data</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-on-calculated-data/m-p/755780#M1678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a select_one question with 5 potential responses. I have a corresponding integer question that is filled in based upon the results from the select_one. I have a calculation on the integer question that either returns a 0 or nothing depending on the select_one. If the calculation is 0, worker moves on, if the field is blank from the calculation, then the worker is required to add a value greater than 0. Can i add a constraint to the integer field only when the calculation returns 'blank'?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;--gary&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2020 15:25:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-on-calculated-data/m-p/755780#M1678</guid>
      <dc:creator>GaryBowles1</dc:creator>
      <dc:date>2020-02-18T15:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint on Calculated Data</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-on-calculated-data/m-p/755781#M1679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Found the examples of the form expressions for required fields and that works great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;--gary&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2020 16:36:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-on-calculated-data/m-p/755781#M1679</guid>
      <dc:creator>GaryBowles1</dc:creator>
      <dc:date>2020-02-18T16:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint on Calculated Data</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-on-calculated-data/m-p/755782#M1680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jumped the gun a little. i got the field to be required using the form expressions but not the constraint yet. Still looking at this and in need of some assistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--gary&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2020 16:42:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-on-calculated-data/m-p/755782#M1680</guid>
      <dc:creator>GaryBowles1</dc:creator>
      <dc:date>2020-02-18T16:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint on Calculated Data</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-on-calculated-data/m-p/755783#M1681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following formula in the constraint field:&lt;/P&gt;&lt;P&gt;if (selected(${mia_9x5}='NRM',.&amp;gt;0,''))&lt;/P&gt;&lt;P&gt;This is enforcing all values to be greater than zero, even when the the selected value is not 'NRM'.&lt;/P&gt;&lt;P&gt;Help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;--gary&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2020 17:08:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-on-calculated-data/m-p/755783#M1681</guid>
      <dc:creator>GaryBowles1</dc:creator>
      <dc:date>2020-02-18T17:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint on Calculated Data</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-on-calculated-data/m-p/755784#M1682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gary,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you share the select_one and subsequent calculation? &amp;nbsp;The calculation you supplied above appears to have misplaced parenthesis; the if parameters appear to be in the selected() question. &amp;nbsp;This should be:&lt;/P&gt;&lt;P&gt;if(selected(${mia_9x5), .&amp;gt;0, '')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is used in a constraint, there is an issue with the if_false value - constraints expect either true or false value. &amp;nbsp;If you want a 'pass' if mia_9x5 has no selection, have the value true() in place of '' to allow any value:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(selected(${mia_9x5), .&amp;gt;0, true())&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you want it empty, I would instead make the question non-relevant or read-only to prevent input.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2020 21:42:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-on-calculated-data/m-p/755784#M1682</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2020-02-18T21:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint on Calculated Data</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-on-calculated-data/m-p/755785#M1683</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;Thanks for the assistance. The following calculation in the constraint field works as required:&lt;/P&gt;&lt;P&gt;if(selected(${mia_9x5})='NRM',.&amp;gt;0,true())&lt;/P&gt;&lt;P&gt;When 'NRM' is selected the integer value entered must be greater than zero, if any of the four other choices in the select_one are chosen, the default value of 0 passes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;--gary&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2020 14:45:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-on-calculated-data/m-p/755785#M1683</guid>
      <dc:creator>GaryBowles1</dc:creator>
      <dc:date>2020-02-19T14:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint on Calculated Data</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-on-calculated-data/m-p/755786#M1684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;James,&lt;/P&gt;&lt;P&gt;I did some further testing and the constrain does not work properly. If NRM is selected any value passes through the constraint (negative numbers, 0 positive numbers).&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do you need to see?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;--gary&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2020 15:34:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-on-calculated-data/m-p/755786#M1684</guid>
      <dc:creator>GaryBowles1</dc:creator>
      <dc:date>2020-02-19T15:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint on Calculated Data</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-on-calculated-data/m-p/755787#M1685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gary,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dumb syntax error based in the selected function - it takes the argument you want to check for equality with in the function:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;selected(${mia_9x5},'NRM')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;not&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;selected(${mia_9x5})='NRM'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2020 22:23:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-on-calculated-data/m-p/755787#M1685</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2020-02-19T22:23:55Z</dc:date>
    </item>
  </channel>
</rss>

