<?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 Map Viewer Forms Calculated Field in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/map-viewer-forms-calculated-field/m-p/1266123#M50804</link>
    <description>&lt;P&gt;Hello -&lt;/P&gt;&lt;P&gt;I have a hosted feature layer in ArcGIS online, and I am creating a form in the new Map Viewer that will be pulled into Experience Builder for editing data. I would like to calculate a field, based upon values entered in two previous fields.&amp;nbsp;&lt;/P&gt;&lt;P&gt;TEST_TOT_SCORE_DOUBLE = TEST_SCORE_SHORT + TEST_PAR_DOUBLE&lt;/P&gt;&lt;P&gt;But I cannot get the calculated field to calculate. I am not sure if I have my Arcade expression wrong (I am very new to Arcade) or if its related to one field being short and one being double, and the calculated field double, or something else. Below is my Arcade expression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeilaJackson1_0-1678386264976.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64847i13FD8078409C07A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeilaJackson1_0-1678386264976.png" alt="LeilaJackson1_0-1678386264976.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance,&lt;/P&gt;&lt;P&gt;Leila&lt;/P&gt;</description>
    <pubDate>Thu, 09 Mar 2023 18:27:52 GMT</pubDate>
    <dc:creator>LJackson29</dc:creator>
    <dc:date>2023-03-09T18:27:52Z</dc:date>
    <item>
      <title>Map Viewer Forms Calculated Field</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/map-viewer-forms-calculated-field/m-p/1266123#M50804</link>
      <description>&lt;P&gt;Hello -&lt;/P&gt;&lt;P&gt;I have a hosted feature layer in ArcGIS online, and I am creating a form in the new Map Viewer that will be pulled into Experience Builder for editing data. I would like to calculate a field, based upon values entered in two previous fields.&amp;nbsp;&lt;/P&gt;&lt;P&gt;TEST_TOT_SCORE_DOUBLE = TEST_SCORE_SHORT + TEST_PAR_DOUBLE&lt;/P&gt;&lt;P&gt;But I cannot get the calculated field to calculate. I am not sure if I have my Arcade expression wrong (I am very new to Arcade) or if its related to one field being short and one being double, and the calculated field double, or something else. Below is my Arcade expression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeilaJackson1_0-1678386264976.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64847i13FD8078409C07A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeilaJackson1_0-1678386264976.png" alt="LeilaJackson1_0-1678386264976.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance,&lt;/P&gt;&lt;P&gt;Leila&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 18:27:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/map-viewer-forms-calculated-field/m-p/1266123#M50804</guid>
      <dc:creator>LJackson29</dc:creator>
      <dc:date>2023-03-09T18:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Map Viewer Forms Calculated Field</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/map-viewer-forms-calculated-field/m-p/1266225#M50805</link>
      <description>&lt;P&gt;I think you need a return statement.&amp;nbsp; I'm new to this also.&amp;nbsp; I believe the semicolons are also needed. Here's code I'm testing that seems to work:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;threex&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;$feature&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;HAltWght&lt;/SPAN&gt;&lt;SPAN&gt; * &lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;threex&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 09 Mar 2023 21:46:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/map-viewer-forms-calculated-field/m-p/1266225#M50805</guid>
      <dc:creator>MichaelCharpentier1</dc:creator>
      <dc:date>2023-03-09T21:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Map Viewer Forms Calculated Field</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/map-viewer-forms-calculated-field/m-p/1266292#M50808</link>
      <description>&lt;P&gt;The nature of Arcade allows you to do the simple equations without setting variables. 1+1 will return 2; 1+A will return 1A&lt;/P&gt;&lt;P&gt;Ex. Long+Double = number&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Teresa_Blader_0-1678403276342.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64871iC742DFC38C5C6AF1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Teresa_Blader_0-1678403276342.png" alt="Teresa_Blader_0-1678403276342.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is, what does return when you click "Run" in the Arcade editor? Does it say "null" or "error"? That would help identify what is going on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 23:16:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/map-viewer-forms-calculated-field/m-p/1266292#M50808</guid>
      <dc:creator>Teresa_Blader</dc:creator>
      <dc:date>2023-03-09T23:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Map Viewer Forms Calculated Field</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/map-viewer-forms-calculated-field/m-p/1266397#M50821</link>
      <description>&lt;P&gt;Hi Teresa -&lt;/P&gt;&lt;P&gt;Thanks for your reply. When I hit run it appears to run without error and returns a value - see snapshots below. But when I got to edit, it does not update the Total Score when I update either of the 2 fields, or both.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeilaJackson1_0-1678455419005.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64891i4C893EEE4F17E89A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeilaJackson1_0-1678455419005.png" alt="LeilaJackson1_0-1678455419005.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeilaJackson1_1-1678455438077.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64892iC8F096D0458A26F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeilaJackson1_1-1678455438077.png" alt="LeilaJackson1_1-1678455438077.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeilaJackson1_2-1678455600918.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64893iAE54BA393EE17987/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeilaJackson1_2-1678455600918.png" alt="LeilaJackson1_2-1678455600918.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Leila&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 13:40:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/map-viewer-forms-calculated-field/m-p/1266397#M50821</guid>
      <dc:creator>LJackson29</dc:creator>
      <dc:date>2023-03-10T13:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Map Viewer Forms Calculated Field</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/map-viewer-forms-calculated-field/m-p/1266599#M50829</link>
      <description>&lt;P&gt;If there is no error in the arcade editor and the value equals what it should (look at objectiD 1 in your table), the arcade is correct then... I don't think you have to worry about that. When you build the form, does it show that the field is based on a calculation?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Teresa_Blader_4-1678474775140.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64956i7562D01E73A38955/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Teresa_Blader_4-1678474775140.png" alt="Teresa_Blader_4-1678474775140.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is an example adding short (integer) + double = double.&amp;nbsp; and double +double = integer. Hit Tab to calc. Arcade doesn't seem to care much that it's calculated with multi types.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Teresa_Blader_2-1678474498153.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64954i79AC37A824232160/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Teresa_Blader_2-1678474498153.png" alt="Teresa_Blader_2-1678474498153.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Teresa_Blader_3-1678474654558.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64955iF918D3A9CEFE9D8F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Teresa_Blader_3-1678474654558.png" alt="Teresa_Blader_3-1678474654558.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 19:04:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/map-viewer-forms-calculated-field/m-p/1266599#M50829</guid>
      <dc:creator>Teresa_Blader</dc:creator>
      <dc:date>2023-03-10T19:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Map Viewer Forms Calculated Field</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/map-viewer-forms-calculated-field/m-p/1266616#M50832</link>
      <description>&lt;P&gt;Thanks Teresa -&lt;/P&gt;&lt;P&gt;I did not have the expression checked so it did not show up as a calculated field. Not very intuitive. Thanks for pointing that out. It is working now.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Leila&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 19:22:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/map-viewer-forms-calculated-field/m-p/1266616#M50832</guid>
      <dc:creator>LJackson29</dc:creator>
      <dc:date>2023-03-10T19:22:26Z</dc:date>
    </item>
  </channel>
</rss>

