<?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: Calculated Value in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/calculated-value/m-p/1274901#M51243</link>
    <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;Using the updated line of code (below)... I get the following error message;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DonSjoboen_0-1680547802130.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67121iE5E925AF5A744A33/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DonSjoboen_0-1680547802130.png" alt="DonSjoboen_0-1680547802130.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DonSjoboen_1-1680547833123.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67122i705F5E4B31E8F6B7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DonSjoboen_1-1680547833123.png" alt="DonSjoboen_1-1680547833123.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;OtherCB&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$map&lt;/SPAN&gt;&lt;SPAN&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/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;null&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The idea is to write the facility id of an existing catch basin to the new inspection on that catch basin (i.e., hosted feature layer) using a calculated expr in a form in the web map.&amp;nbsp; I'm wondering if I need to (somehow) add the GlobalID of the hosted feature layer in my expression?&amp;nbsp; Or if there's something else at play here?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hoping someone has experience with adding an attribute value from one feature to another when adding a new point in a web map/app.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 03 Apr 2023 19:00:45 GMT</pubDate>
    <dc:creator>DonSjoboen</dc:creator>
    <dc:date>2023-04-03T19:00:45Z</dc:date>
    <item>
      <title>Calculated Value</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/calculated-value/m-p/1274311#M51198</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to add an attribute [FACILITYID] from another feature in my web map form.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DonSjoboen_0-1680299306707.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/66992i2B0D4AEAD0D41023/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DonSjoboen_0-1680299306707.png" alt="DonSjoboen_0-1680299306707.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have added a form field for this (see above) and have created a calculated arcade expression that seems to work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DonSjoboen_1-1680299389121.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/66993i41D567115ADAE7CD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DonSjoboen_1-1680299389121.png" alt="DonSjoboen_1-1680299389121.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, when I test this expression by creating a new point (hosted feature layer), the field just shows [object Object] and not the desired value from the other feature layer.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DonSjoboen_2-1680299483695.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/66994iFEBF177A80AA4B8E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DonSjoboen_2-1680299483695.png" alt="DonSjoboen_2-1680299483695.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hoping someone can help with this?&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 22:00:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/calculated-value/m-p/1274311#M51198</guid>
      <dc:creator>DonSjoboen</dc:creator>
      <dc:date>2023-03-31T22:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Value</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/calculated-value/m-p/1274314#M51199</link>
      <description>&lt;P&gt;that's because you are returning an entire feature (i.e row) not a specific value in that row.&lt;/P&gt;&lt;P&gt;try changing:&lt;/P&gt;&lt;P&gt;return InspectCB to&lt;/P&gt;&lt;P&gt;return InspectCB['FACILITYID']&lt;/P&gt;&lt;P&gt;For the sake of learning - I would add: console(InspectCB) to line 4&lt;/P&gt;&lt;P&gt;then you can view the results in the console tab and see what it is doing&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 22:22:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/calculated-value/m-p/1274314#M51199</guid>
      <dc:creator>ClayDonaldsonSWCA</dc:creator>
      <dc:date>2023-03-31T22:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Value</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/calculated-value/m-p/1274318#M51200</link>
      <description>&lt;P&gt;Thanks, but I have tried that and I get this error...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DonSjoboen_0-1680301638035.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/66997iFA2A25339F48BA1E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DonSjoboen_0-1680301638035.png" alt="DonSjoboen_0-1680301638035.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also used Console() and it too gave me nothing in the console menu.&amp;nbsp; Just Null in the output.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I'm using a blank hosted feature layer to add new inspections on existing catch basins feature layer.&amp;nbsp; I have editing disabled for that field I want to populate too.&amp;nbsp; Wonder if there isn't something else going on.&lt;/P&gt;&lt;P&gt;I'm using the first example from this blog as a starting point...&lt;BR /&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/field-maps/field-mobility/common-calculated-expressions-for-arcgis-field-maps/" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/field-maps/field-mobility/common-calculated-expressions-for-arcgis-field-maps/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 22:37:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/calculated-value/m-p/1274318#M51200</guid>
      <dc:creator>DonSjoboen</dc:creator>
      <dc:date>2023-03-31T22:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Value</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/calculated-value/m-p/1274546#M51219</link>
      <description>&lt;P&gt;From the example you have provided you are missing an ! in the if statement.&lt;/P&gt;&lt;P&gt;This means that it will equate to 'if empty is true, return the empty value'.&lt;/P&gt;&lt;P&gt;By adding the '!' it equated to if this is NOT empty, return true (and then the value)&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;if&lt;/SPAN&gt; (&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;!&lt;/STRONG&gt;&lt;/FONT&gt;IsEmpty(region)) {
    &lt;SPAN&gt;return&lt;/SPAN&gt; region[&lt;SPAN&gt;'name'&lt;/SPAN&gt;]
} &lt;SPAN&gt;else&lt;/SPAN&gt; {
    &lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;null&lt;/SPAN&gt;
}&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Apr 2023 07:31:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/calculated-value/m-p/1274546#M51219</guid>
      <dc:creator>ChristopherCounsell</dc:creator>
      <dc:date>2023-04-03T07:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Value</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/calculated-value/m-p/1274677#M51227</link>
      <description>&lt;P&gt;When I add the !, I don't get [object Object], but I do get an error stating the calculation failed.&lt;/P&gt;&lt;P&gt;So, there is something else going on that is causing this to fail.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 14:08:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/calculated-value/m-p/1274677#M51227</guid>
      <dc:creator>DonSjoboen</dc:creator>
      <dc:date>2023-04-03T14:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Value</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/calculated-value/m-p/1274901#M51243</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;Using the updated line of code (below)... I get the following error message;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DonSjoboen_0-1680547802130.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67121iE5E925AF5A744A33/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DonSjoboen_0-1680547802130.png" alt="DonSjoboen_0-1680547802130.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DonSjoboen_1-1680547833123.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67122i705F5E4B31E8F6B7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DonSjoboen_1-1680547833123.png" alt="DonSjoboen_1-1680547833123.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;OtherCB&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$map&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Other Govt and City Owned Catch Basins"&lt;/SPAN&gt;&lt;SPAN&gt;, [&lt;/SPAN&gt;&lt;SPAN&gt;'FACILITYID'&lt;/SPAN&gt;&lt;SPAN&gt;], &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&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AN&gt;null&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The idea is to write the facility id of an existing catch basin to the new inspection on that catch basin (i.e., hosted feature layer) using a calculated expr in a form in the web map.&amp;nbsp; I'm wondering if I need to (somehow) add the GlobalID of the hosted feature layer in my expression?&amp;nbsp; Or if there's something else at play here?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hoping someone has experience with adding an attribute value from one feature to another when adding a new point in a web map/app.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 03 Apr 2023 19:00:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/calculated-value/m-p/1274901#M51243</guid>
      <dc:creator>DonSjoboen</dc:creator>
      <dc:date>2023-04-03T19:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Value</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/calculated-value/m-p/1274915#M51247</link>
      <description>&lt;P&gt;I ended up solving the issue I was having.&amp;nbsp; When creating the AGO hosted feature layer, I ended up setting the Facility ID field to be not editable.&amp;nbsp; Even though I could control the editing permissions of the form itself, because I still had the field in the table set to not edit, that prevented the form calculation from happening.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 19:16:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/calculated-value/m-p/1274915#M51247</guid>
      <dc:creator>DonSjoboen</dc:creator>
      <dc:date>2023-04-03T19:16:25Z</dc:date>
    </item>
  </channel>
</rss>

