<?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 with calculation when field is set to hidden or calculate in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/1093663#M36803</link>
    <description>&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;I am having this same with the latest version of Survey123 Connect (3.12) and the Survey123 app. My calculations work fine on the web but are NaN on the app. I have tried the bind field, as well as the solutions listed here&amp;nbsp;&lt;A href="https://support.esri.com/en/technical-article/000022441#:~:text=Survey123%20for%20ArcGIS%20does%20not%20identify%20null%20values,the%20value%20of%20a%20blank%20field%20is%20zero." target="_blank"&gt;Problem: The total value is not calculated if any input field in a Survey123 for ArcGIS survey form is blank (esri.com)&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Any ideas why it works in the web version but not the app? Staff are in remote areas and cannot rely on having service to use the web version. Data collection is beginning now. Any help will be much appreciated.&lt;/P&gt;</description>
    <pubDate>Mon, 30 Aug 2021 16:31:58 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-08-30T16:31:58Z</dc:date>
    <item>
      <title>Problem with calculation when field is set to hidden or calculate</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/799421#M10381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working on a distance calculator that will allow Protected Species Observers (PSO) to enter the compass bearing and distance&amp;nbsp;to an animal they sighted from their monitoring position. &amp;nbsp;They then enter the compass bearing and distance to the noise source from their monitoring position. &amp;nbsp;From each sighting bearing it&amp;nbsp;converts it to Cartesian coordinate angles and those angles are then used to calculate the angle of the triangle at&amp;nbsp;PSO's location between the legs of the Animal sighting distance and Noise source distance. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It then applies the law of Cosines to calculate the distance from the noise to the animal sighting, which enable the PSO to quickly tell if the animal is in a shutdown zone or not. &amp;nbsp;In the spreadsheet I attached, everything works as designed. &amp;nbsp;However, I want to hide the Animal Modulus and Noise Modulus Results fields so the PSOs aren't seeing numbers that they don't need. &amp;nbsp;The problem I'm experiencing is when I turn those Modulus fields types to Calculate or Hidden in Survey123 Connect it breaks the math. &amp;nbsp;I updated Survey123 connect to the current version v2.3.24 today, but I believe I the problem was there in the previous version as well&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if I enter an animal sighting bearing of 17 deg and a Noise bearing of 122 deg, I should get an angle of 105 degrees as my result, and I do when the ModResA and ModResnN fields are set as integers. &amp;nbsp;Turning them to Hidden or Calculate and my resulting calculated angle is 73032 in the bearingangle field. &amp;nbsp;I traced the problem down farther, if I leave on of the ModRes fields set as an integer (say ModResN for this example)&amp;nbsp;and enter the animal sighting bearing of 17 deg and the noise source bearing of 122 deg I get the bad result of 73032 again. &amp;nbsp;However, if I flip the value and enter 122 deg for the animal sighting and 17 deg for the noise source I get the correct angle of 105 degrees. &amp;nbsp;I do have nested if statements in the bearingangle field to choose which math should be used to calculate the angle appropriately. &amp;nbsp;Either I've made an error somewhere or calculate/hidden fields can't handle nested if statements. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any insight for a solution? &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2017 21:27:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/799421#M10381</guid>
      <dc:creator>TylerGraham2</dc:creator>
      <dc:date>2017-07-21T21:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with calculation when field is set to hidden or calculate</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/799422#M10382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tyler,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By default, hidden or calculate questions are of type text. &amp;nbsp;You need to either:&lt;/P&gt;&lt;P&gt;1) explicitly change them to integer in the formulas&lt;/P&gt;&lt;P&gt;2) Create a column in your spreadsheet called bind::type and set the value of the column for the modulus questions to &lt;STRONG&gt;int&lt;/STRONG&gt; (integer). &amp;nbsp;This will tell Survey123 to treat it as an integer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The current answers you are getting are the result of concatenating the numbers as if they were text.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2017 21:35:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/799422#M10382</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2017-07-21T21:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with calculation when field is set to hidden or calculate</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/799423#M10383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;James,&lt;/P&gt;&lt;P&gt;Thanks, the bind::type suggestion worked great. &amp;nbsp;I did try setting the bind on the bind::esri:fieldType column and I was still getting the same error. &amp;nbsp;Am I correct in assuming that Esri field type is not applied until the survey is published?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2017 13:25:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/799423#M10383</guid>
      <dc:creator>TylerGraham2</dc:creator>
      <dc:date>2017-07-24T13:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with calculation when field is set to hidden or calculate</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/799424#M10384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The bind::Esri:fieldType column sets what the value is written out as (by controlling the field type in the database and the type of value submitted by the app). &amp;nbsp;The bind::type column sets how the value behaves within the application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2017 16:01:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/799424#M10384</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2017-07-24T16:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with calculation when field is set to hidden or calculate</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/799425#M10385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Howdy All,&lt;/P&gt;&lt;P&gt;I can figure out how to do addition in a calculate field with integers but have not had any success with decimals.&amp;nbsp; It keeps concatenating the two fields instead of adding them.&amp;nbsp; I've also tried using "decimal" and "dec" in the field and get an error when it gets converted to the xlsforms.&amp;nbsp;&amp;nbsp;${CASH_VALUE} + ${CASH_VALUE_MP} or dec(${CASH_VALUE}) + dec(${CASH_VALUE_MP}).&amp;nbsp; I also tried the bind::type method and put decimal in the field and that didn't work.&amp;nbsp; Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Nov 2017 20:16:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/799425#M10385</guid>
      <dc:creator>MarkRankin1</dc:creator>
      <dc:date>2017-11-09T20:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with calculation when field is set to hidden or calculate</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/799426#M10386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As listed in&amp;nbsp;&lt;A class="link-titled" href="http://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm" title="http://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm"&gt;Formulas—Survey123 for ArcGIS | ArcGIS&lt;/A&gt;&amp;nbsp;, the correct conversion for decimal numbers is &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;number()&lt;/SPAN&gt; .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Nov 2017 21:32:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/799426#M10386</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2017-11-09T21:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with calculation when field is set to hidden or calculate</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/799427#M10387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks James!&amp;nbsp; I looked at the page you referenced but was looking for decimal and not number.&amp;nbsp; Now that I see what I should have been looking for it makes perfect sense.&amp;nbsp; That whole reading thing eludes me at times.&amp;nbsp; Thanks again.&amp;nbsp; It is working like a charm now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2017 18:38:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/799427#M10387</guid>
      <dc:creator>MarkRankin1</dc:creator>
      <dc:date>2017-11-13T18:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with calculation when field is set to hidden or calculate</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/799428#M10388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was also having this same issue. The bind field suggestion for all my values in the formula made it work properly. Thank you &lt;A href="https://community.esri.com/migrated-users/3263"&gt;James Tedrick&lt;/A&gt;!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2018 16:31:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/799428#M10388</guid>
      <dc:creator>deleted-user-jxpbpbjlZInj</dc:creator>
      <dc:date>2018-12-04T16:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with calculation when field is set to hidden or calculate</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/799429#M10389</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;Great&amp;nbsp;information and helped me&amp;nbsp;to resolve my Survey123 Connect XLSForm question. This forum is really helpful!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Colleen&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2018 12:35:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/799429#M10389</guid>
      <dc:creator>deleted-user-sNUdtFrn2yEY</dc:creator>
      <dc:date>2018-12-14T12:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with calculation when field is set to hidden or calculate</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/1093663#M36803</link>
      <description>&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;I am having this same with the latest version of Survey123 Connect (3.12) and the Survey123 app. My calculations work fine on the web but are NaN on the app. I have tried the bind field, as well as the solutions listed here&amp;nbsp;&lt;A href="https://support.esri.com/en/technical-article/000022441#:~:text=Survey123%20for%20ArcGIS%20does%20not%20identify%20null%20values,the%20value%20of%20a%20blank%20field%20is%20zero." target="_blank"&gt;Problem: The total value is not calculated if any input field in a Survey123 for ArcGIS survey form is blank (esri.com)&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Any ideas why it works in the web version but not the app? Staff are in remote areas and cannot rely on having service to use the web version. Data collection is beginning now. Any help will be much appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 16:31:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/1093663#M36803</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-08-30T16:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with calculation when field is set to hidden or calculate</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/1094895#M36916</link>
      <description>&lt;P&gt;IT support found that it was a syntax error. The fields used for calculations (including input fields) cannot have relevant statements. This was my work-around.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JakeFritz_0-1630590232958.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/22290i426B4D1E7BF7CC60/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JakeFritz_0-1630590232958.png" alt="JakeFritz_0-1630590232958.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 13:44:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/1094895#M36916</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-09-02T13:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with calculation when field is set to hidden or calculate</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/1160046#M41808</link>
      <description>&lt;P&gt;@Anonymous User&amp;nbsp;your reply to this post was a life saver. I had the same exact problem regarding relevant conditions and calculations. Thank you so much!&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 20:01:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/problem-with-calculation-when-field-is-set-to/m-p/1160046#M41808</guid>
      <dc:creator>NourSalam</dc:creator>
      <dc:date>2022-03-31T20:01:19Z</dc:date>
    </item>
  </channel>
</rss>

