<?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: Error with calculation field since upgrade to 1.9 in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850109#M23193</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a similar issue with a calculate field which calculates the amount of days between two dates. I have it forced as an&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;esriFieldTypeInteger&lt;/STRONG&gt; &lt;/EM&gt;type and the form returns a code 1000 error which complains about converting NaN to an integer field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had to modify my calculate field so that it returns a value of 0 when there are no user inputs to fix this. I thought this was a somewhat strange behaviour because I thought NaN is a valid input in an integer field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Nov 2016 05:29:39 GMT</pubDate>
    <dc:creator>WengNg</dc:creator>
    <dc:date>2016-11-21T05:29:39Z</dc:date>
    <item>
      <title>Error with calculation field since upgrade to 1.9</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850106#M23190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: medium;"&gt;We have just upgraded to Survey123 v1.9 and re-published a survey. Using the latest version 1.9.24 app also on iPhone/iPad and Android. Previously we used a calculation to total the sum of 8 cost fields:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: medium;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: medium;"&gt;int(${roof_cost})+int(${exterior_cost})+int(${subfloor_cost})+int(${rooms_cost})+int(${doors_cost})+int(${windows_cost})+int(${services_cost})+int(${setting_cost})&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: medium;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: medium;"&gt;This worked perfectly before and has done since version 1.0 of Survey123. Now the calculation does not work, it remains blank in the form when values are entered into the above fields, and if you type a custom value into the total cost field, save draft, close the survey and open again, the custom value does not get saved (which it used to also).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: medium;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: medium;"&gt;Any ideas?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 01:16:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850106#M23190</guid>
      <dc:creator>PhilipWilson-GIS</dc:creator>
      <dc:date>2016-11-21T01:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Error with calculation field since upgrade to 1.9</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850107#M23191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Philip,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is likely a result of the way Survey123 handles empty values in questions starting in 1.9. The handling is described in full here: &lt;A class="link-titled" href="http://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION1_2954BF95CF674951AE9691A656CF157C" title="http://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION1_2954BF95CF674951AE9691A656CF157C"&gt;Formulas—Survey123 for ArcGIS | ArcGIS&lt;/A&gt; But in short, your calculation won't produce a result until there are values present for all fields being used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The easiest way to fix this would be to give each field a default value of 0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 02:18:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850107#M23191</guid>
      <dc:creator>MitchellProctor</dc:creator>
      <dc:date>2016-11-21T02:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error with calculation field since upgrade to 1.9</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850108#M23192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Mitchell,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That did the trick. Have given all the fields a default value of 0 and working fine. Good to know for future and other Survery123 forms we use, as it wasn't a requirement previously many of them will have nulls where a value will be expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 04:56:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850108#M23192</guid>
      <dc:creator>PhilipWilson-GIS</dc:creator>
      <dc:date>2016-11-21T04:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Error with calculation field since upgrade to 1.9</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850109#M23193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a similar issue with a calculate field which calculates the amount of days between two dates. I have it forced as an&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;esriFieldTypeInteger&lt;/STRONG&gt; &lt;/EM&gt;type and the form returns a code 1000 error which complains about converting NaN to an integer field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had to modify my calculate field so that it returns a value of 0 when there are no user inputs to fix this. I thought this was a somewhat strange behaviour because I thought NaN is a valid input in an integer field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 05:29:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850109#M23193</guid>
      <dc:creator>WengNg</dc:creator>
      <dc:date>2016-11-21T05:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error with calculation field since upgrade to 1.9</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850110#M23194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Weng,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think what you're thinking of in terms of integers field input is &lt;STRONG&gt;null&lt;/STRONG&gt;, which is a valid input value; NaN isn't. &amp;nbsp;There's a &lt;A href="http://stackoverflow.com/questions/115548/why-is-isnannull-false-in-js"&gt;slight difference between NaN and null programmatically&lt;/A&gt;; while they represent the same concept, they are not equivalent.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 17:31:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850110#M23194</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2016-11-21T17:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Error with calculation field since upgrade to 1.9</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850111#M23195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;HI James,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;In &lt;A href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fdoc.arcgis.com%2Fen%2Fsurvey123%2Fdesktop%2Fcreate-surveys%2Fxlsformformulas.htm%23ESRI_SECTION1_2954BF95CF674951AE9691A656CF157C" rel="nofollow" style="color: #287433; background-color: #ffffff; border: 0px; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;Formulas—Survey123 for ArcGIS | ArcGIS&lt;/A&gt;, the document specifies that empty values are handled like this :&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="color: #4d4d4d; background-color: #fefefe; font-size: 0.875em; margin-bottom: 1.5em; padding: 0px 0px 0px 2em;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 15px;"&gt;NaN (not a number) for integer and decimal questions. This is a special value that represents the absence of a valid value.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 15px;"&gt;'' (an empty string) for text questions. The default data type for select_one, select_mulitple, and hidden questions is also text. When these question types are empty they will contain an empty string.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;If I follow this correctly, an&amp;nbsp;integer question will default to NaN when it is empty. Wouldn't that break the form since an integer field cannot accept NaN values? I thought it would make more sense for it to default to a null value instead of a NaN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 08:21:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850111#M23195</guid>
      <dc:creator>WengNg</dc:creator>
      <dc:date>2016-11-22T08:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Error with calculation field since upgrade to 1.9</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850112#M23196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Weng,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, you're right about the discrepancy in values in the client application and what the feature service endpoint can accept. &amp;nbsp;In response to your question and my response, I entered an issue into our development team to fix this behavior- we'll have it updated to submit null (but still use NaN in the app) in the next version.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 20:37:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850112#M23196</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2016-11-22T20:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error with calculation field since upgrade to 1.9</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850113#M23197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3263"&gt;James Tedrick&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can you offer some guidance on how I set up a relevant on an integer field? I've tried all of the below and get no success:&lt;/P&gt;&lt;P&gt;${ESRIGNSS_NUMSATS}=''&lt;/P&gt;&lt;P&gt;${ESRIGNSS_NUMSATS}=null&lt;/P&gt;&lt;P&gt;${ESRIGNSS_NUMSATS}=NaN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2018 18:11:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850113#M23197</guid>
      <dc:creator>AndrewHargreaves2</dc:creator>
      <dc:date>2018-08-29T18:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Error with calculation field since upgrade to 1.9</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850114#M23198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per&amp;nbsp;&lt;A class="link-titled" href="http://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION1_2954BF95CF674951AE9691A656CF157C" title="http://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION1_2954BF95CF674951AE9691A656CF157C"&gt;Formulas—Survey123 for ArcGIS | ArcGIS&lt;/A&gt;, the string-length() function will return 0 for all questions if the question is empty; it can be used for testing whether a question is empty or not (including non-text questions).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2018 19:58:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/error-with-calculation-field-since-upgrade-to-1-9/m-p/850114#M23198</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2018-08-29T19:58:55Z</dc:date>
    </item>
  </channel>
</rss>

