<?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: FeatureSetBy Arcade Functions Supported in Field Maps App? in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130896#M2246</link>
    <description>&lt;P&gt;Here's the solution, &lt;STRONG&gt;scrap the Arcade Filter() function&lt;/STRONG&gt;, it simply does not work with globalid while offline.&lt;/P&gt;&lt;P&gt;This expression works fine both online/offline. Upper/Lower case globalid wasn't the issue, both FM and map viewer BETA in Enterprise 10.9 were displaying Upper case. But, just for safety I used Lower.&lt;/P&gt;&lt;P&gt;var relate_guid = $feature["rel_guid_pcs"];&lt;BR /&gt;var featSet = FeatureSetByName($map,"Point Count Stations", ['pcs_id','globalid'], false);&lt;BR /&gt;for(var feat in featSet){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Lower(feat.globalid)==Lower(relate_guid)){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return feat.pcs_id;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jan 2022 17:49:14 GMT</pubDate>
    <dc:creator>danbecker</dc:creator>
    <dc:date>2022-01-05T17:49:14Z</dc:date>
    <item>
      <title>FeatureSetBy Arcade Functions Supported in Field Maps App?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130571#M2231</link>
      <description>&lt;P&gt;Enterprise 10.9, Map Viewer BETA. Created a popup expression using the FeatureSetByRelationshipName function. I can successfully retrieve the parent feature attribute in the popup, no issues.&lt;/P&gt;&lt;P&gt;But, when the webmap is accessed with the Field Maps app (Android) the popup shows an &lt;EM&gt;Error Code 6, Illegal State. Invalid relationship name.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Question of the day:&lt;/STRONG&gt;&lt;/U&gt; Are any of the FeatureSetBy.. Arcade functions supported in the latest field maps app? If so, does the map have to be online, ad-hoc created offline, or pre-defined offline?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 20:54:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130571#M2231</guid>
      <dc:creator>danbecker</dc:creator>
      <dc:date>2022-01-04T20:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSetBy Arcade Functions Supported in Field Maps App?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130819#M2239</link>
      <description>&lt;P&gt;Yep it works now I kept bugging for it.&amp;nbsp; Offline works also as long as the parent and child are both in the offline replica.&lt;/P&gt;&lt;P&gt;I had seen some have trouble using relationship class name.&amp;nbsp; I always use the layer name from the map and filter based on my key like this.&amp;nbsp; Works great.&lt;/P&gt;&lt;P&gt;var sql = "PointID = '" + $feature.PointID + "'";&lt;BR /&gt;var tbl = Filter(FeatureSetByName($map,"Points", ['Use * or a list of fields here'], false), sql);&lt;BR /&gt;return First(tbl).DesignLat&lt;/P&gt;&lt;P&gt;My guess on relationship name is it has a longer name somehow like service.rcname or something but not sure.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 15:16:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130819#M2239</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-01-05T15:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSetBy Arcade Functions Supported in Field Maps App?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130841#M2241</link>
      <description>&lt;P&gt;I cannot get it to work offline, see below details.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Environment:&lt;/U&gt; Enterprise 10.9 with PostgreSQL published feature service.&lt;/P&gt;&lt;P&gt;Using map viewer BETA released with 10.9, added both point feature classes, they are related via globalid-guid.&lt;/P&gt;&lt;P&gt;&lt;U&gt;Arcade Expression on child layer:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;var relate_guid = $feature["rel_guid_pcs"];&lt;BR /&gt;var featSet = Filter(FeatureSetByName($map,"Point Count Stations", ['pcs_id','globalid'], false), 'globalid = @relate_guid');&lt;BR /&gt;return First(featSet).pcs_id;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Online result:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;both map viewer BETA and Field Maps app (Android) work great. Select a child point and above expression retrieves parent.pcs_id.&lt;/P&gt;&lt;P&gt;&lt;U&gt;Offline result:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;same webmap, download ad-hoc offline area in Field Maps app (Android). Select a child point and it displays &lt;FONT size="5"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;-- &lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="3" color="#FF0000"&gt;&lt;FONT color="#000000"&gt;which obliviously doesn't work.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;FONT size="5"&gt;&lt;FONT size="3" color="#FF0000"&gt;&lt;FONT color="#000000"&gt;Field Maps app (Android) error:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Expression Name: expr0&lt;/P&gt;&lt;P&gt;Expression Title: Arcade&lt;/P&gt;&lt;P&gt;Error Domain: com.esri.arcgisruntime.ArcGISRuntimeException&lt;/P&gt;&lt;P&gt;Error Code: 15&lt;/P&gt;&lt;P&gt;Error Description: Invalid call.&lt;/P&gt;&lt;P&gt;&lt;FONT size="5"&gt;&lt;FONT size="3" color="#FF0000"&gt;&lt;FONT color="#000000"&gt;Unable to evaluate arcade expression. Evaluation_error_code::unexpected_null_value Line :3&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="5"&gt;&lt;FONT size="3" color="#FF0000"&gt;&lt;FONT color="#000000"&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/16421"&gt;@DougBrowning&lt;/a&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="5"&gt;&lt;FONT size="3" color="#FF0000"&gt;&lt;FONT color="#000000"&gt;1) Are you using AGOL or Enterprise?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="5"&gt;&lt;FONT size="3" color="#FF0000"&gt;&lt;FONT color="#000000"&gt;2) Hosted feature service or published feature service?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 16:21:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130841#M2241</guid>
      <dc:creator>danbecker</dc:creator>
      <dc:date>2022-01-05T16:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSetBy Arcade Functions Supported in Field Maps App?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130852#M2242</link>
      <description>&lt;P&gt;But, this edited Arcade Expression &lt;FONT color="#339966"&gt;&lt;STRONG&gt;does work offline&lt;/STRONG&gt;&lt;/FONT&gt;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var relate_guid = $feature["rel_guid_pcs"];&lt;BR /&gt;var featSet = Filter(FeatureSetByName($map,"Point Count Stations", ['pcs_id','globalid','objectid'], false), '&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;objectid &amp;gt; 0&lt;/STRONG&gt;&lt;/FONT&gt;');&lt;BR /&gt;return First(featSet).pcs_id;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;What changed?&lt;/U&gt;&lt;/P&gt;&lt;P&gt;I'm guessing that the offline replica.geodatabase that gets created either:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Doesn't preserve globalid. So the Filter expression: parent.globalid = child.relate_guid doesn't retrieve anything. (I find this hard to believe). I tried adding a new related child point WHILE OFFLINE and the orig. Arcade expression still doesn't work.&lt;/LI&gt;&lt;LI&gt;the Filter() data fcn doesn't support SQL queries against globalid while offline. (more plausible).&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ESRI -- Any docs on this?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 16:40:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130852#M2242</guid>
      <dc:creator>danbecker</dc:creator>
      <dc:date>2022-01-05T16:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSetBy Arcade Functions Supported in Field Maps App?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130863#M2243</link>
      <description>&lt;P&gt;Well&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;map viewer BETA does not support relationships classes yet.&amp;nbsp; No button for it at all so that is prob not going to work out.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Next I wonder of you are finding the lower vs upper case globalID problem.&amp;nbsp; Field Maps is doing lower while AGOL is upper and it is causing me pains.&amp;nbsp; See here&amp;nbsp;&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-is-creating-lowercase-globalid-but-agol/m-p/1126721" target="_blank"&gt;https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-is-creating-lowercase-globalid-but-agol/m-p/1126721&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Above it looks like you are not using the filter right.&amp;nbsp; You need to filter by global.&amp;nbsp; See my example.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 17:08:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130863#M2243</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-01-05T17:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSetBy Arcade Functions Supported in Field Maps App?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130880#M2244</link>
      <description>&lt;P&gt;Online, both app and Map Viewer BETA both of these filter expressions work, &lt;STRONG&gt;offline in app, neither of them work. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;"globalid = '" + relate_guid +"'"&lt;/P&gt;&lt;P&gt;"globalid = @relate_guid"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Online/Offine, this filter expression works:&lt;/P&gt;&lt;P&gt;'objectid &amp;gt; 0'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/16421"&gt;@DougBrowning&lt;/a&gt;,&amp;nbsp;can you try a filter expression in your environment that uses globalid? It would be great if you could repo this.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 17:21:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130880#M2244</guid>
      <dc:creator>danbecker</dc:creator>
      <dc:date>2022-01-05T17:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSetBy Arcade Functions Supported in Field Maps App?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130895#M2245</link>
      <description>&lt;P&gt;have you tried GlobalID&amp;nbsp; maybe it is a case issue?&amp;nbsp; &amp;nbsp; &amp;nbsp;A filter of&amp;nbsp;&lt;SPAN&gt;objectid &amp;gt; 0 is just going to give you everything in the DB and not do a lookup.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 17:41:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130895#M2245</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-01-05T17:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSetBy Arcade Functions Supported in Field Maps App?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130896#M2246</link>
      <description>&lt;P&gt;Here's the solution, &lt;STRONG&gt;scrap the Arcade Filter() function&lt;/STRONG&gt;, it simply does not work with globalid while offline.&lt;/P&gt;&lt;P&gt;This expression works fine both online/offline. Upper/Lower case globalid wasn't the issue, both FM and map viewer BETA in Enterprise 10.9 were displaying Upper case. But, just for safety I used Lower.&lt;/P&gt;&lt;P&gt;var relate_guid = $feature["rel_guid_pcs"];&lt;BR /&gt;var featSet = FeatureSetByName($map,"Point Count Stations", ['pcs_id','globalid'], false);&lt;BR /&gt;for(var feat in featSet){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Lower(feat.globalid)==Lower(relate_guid)){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return feat.pcs_id;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 17:49:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130896#M2246</guid>
      <dc:creator>danbecker</dc:creator>
      <dc:date>2022-01-05T17:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSetBy Arcade Functions Supported in Field Maps App?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130897#M2247</link>
      <description>&lt;P&gt;also maybe the extra quotes are missing i would try.&amp;nbsp; Not sure on your field names here but&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var sql = "rel_guid_pcs = '" + $feature.GlobalID + "'";&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 17:44:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130897#M2247</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-01-05T17:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSetBy Arcade Functions Supported in Field Maps App?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130898#M2248</link>
      <description>&lt;P&gt;I tried all of those suggestions, see above. Field names in my case are always lower case, since the backend is PostgreSQL.&lt;/P&gt;&lt;P&gt;Realize objectid &amp;gt; 0 would return everything, I was just trying to determine if the problem was Filter() or FeatureSetByName(). See below, problem was Filter().&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 17:46:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featuresetby-arcade-functions-supported-in-field/m-p/1130898#M2248</guid>
      <dc:creator>danbecker</dc:creator>
      <dc:date>2022-01-05T17:46:47Z</dc:date>
    </item>
  </channel>
</rss>

