<?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: FeatureSet not working offline in Field Maps in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1166249#M3093</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/183695"&gt;@Scott_Sambell&lt;/a&gt;&amp;nbsp; While we investigate a full fix, there's a potential workaround. The issue appears to be related to case sensitive GUID value comparisons. If you cast your foreign key (the GUID) to upper, it should work.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var recordGUID = upper($feature.ASSETGUID);  // &amp;lt;------ ALTERATION HERE
var recordSet = $featureSet;
var subset = filter(recordSet,`ASSETGUID  = '${recordGUID}'`);
var ordered = orderby(subset,'InspDate DESC');
var firstInspec = first(ordered);
if (IsEmpty(firstInspec)) {
    return 0;
} else {
    return firstInspec.PRESSURE;
}&lt;/LI-CODE&gt;&lt;P&gt;I tested this in my own map and it seemed to work.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Apr 2022 17:24:48 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2022-04-20T17:24:48Z</dc:date>
    <item>
      <title>FeatureSet not working offline in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1162899#M2956</link>
      <description>&lt;P&gt;We added calculated expressions to several of our clients' Field Maps after promising that they would have all the functionality now in smart forms that we have been raving about.&amp;nbsp; Everything works perfect using Field Maps online but when we did the final test (download an offline area and sync test) we discovered that the FeatureSet function does not work offline.&amp;nbsp; We tried it on several different Android and iOS devices on several different webmaps. This is an absolute showstopper for us.&amp;nbsp; Is this a bug or a known limitation? We need to know asap so we can explain to the clients why they aren't getting what we promised&lt;/P&gt;&lt;P&gt;Here is an example of how we use FeatureSetByName:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;var tblparent = FeatureSetByName($map, "Trap locations",['OBJECTID','Easting_Northing','GlobalID'],False);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Maybe other FeatureSet functions work but &lt;EM&gt;FeatureSetByName($Map,......&lt;/EM&gt; doesn't?&amp;nbsp; Any explantation i could get would be much appreciated.&lt;/P&gt;&lt;P&gt;Thanks!&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/1138"&gt;@JeffShaner&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Apr 2022 21:00:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1162899#M2956</guid>
      <dc:creator>Scott_Sambell</dc:creator>
      <dc:date>2022-04-10T21:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSet not working offline in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1163320#M2974</link>
      <description>&lt;P&gt;We reproduced this in-house and have opened an issue to investigate further.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 00:58:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1163320#M2974</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-04-12T00:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSet not working offline in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1163334#M2975</link>
      <description>&lt;P&gt;Thanks Aaron!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 02:36:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1163334#M2975</guid>
      <dc:creator>Scott_Sambell</dc:creator>
      <dc:date>2022-04-12T02:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSet not working offline in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1166249#M3093</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/183695"&gt;@Scott_Sambell&lt;/a&gt;&amp;nbsp; While we investigate a full fix, there's a potential workaround. The issue appears to be related to case sensitive GUID value comparisons. If you cast your foreign key (the GUID) to upper, it should work.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var recordGUID = upper($feature.ASSETGUID);  // &amp;lt;------ ALTERATION HERE
var recordSet = $featureSet;
var subset = filter(recordSet,`ASSETGUID  = '${recordGUID}'`);
var ordered = orderby(subset,'InspDate DESC');
var firstInspec = first(ordered);
if (IsEmpty(firstInspec)) {
    return 0;
} else {
    return firstInspec.PRESSURE;
}&lt;/LI-CODE&gt;&lt;P&gt;I tested this in my own map and it seemed to work.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 17:24:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1166249#M3093</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-04-20T17:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSet not working offline in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1166324#M3099</link>
      <description>&lt;P&gt;Thanks Aaron this is going to be amazing if it works.&amp;nbsp; We'll give it a go today and let you know how we go.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks so much!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 18:53:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1166324#M3099</guid>
      <dc:creator>Scott_Sambell</dc:creator>
      <dc:date>2022-04-20T18:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSet not working offline in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1166349#M3100</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/451590"&gt;@WillyG&lt;/a&gt;&amp;nbsp;Try this.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 19:13:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1166349#M3100</guid>
      <dc:creator>Scott_Sambell</dc:creator>
      <dc:date>2022-04-20T19:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSet not working offline in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1166405#M3104</link>
      <description>&lt;P&gt;Looks like you've done it Aaron! Its working offline and syncing.&lt;/P&gt;&lt;P&gt;Thanks so much, you are a legend. Can't wait to get it out there and start using it!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 21:12:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1166405#M3104</guid>
      <dc:creator>Scott_Sambell</dc:creator>
      <dc:date>2022-04-20T21:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSet not working offline in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1168529#M3193</link>
      <description>&lt;P&gt;Hi Aaron,&lt;/P&gt;&lt;P&gt;I also have the issue of my calculated expression not working in offline mode. I updated my expression by casting my GUID as you suggested, but when I tested it I received an error message,&lt;STRONG&gt; Execution Error: Error.&amp;nbsp;&lt;/STRONG&gt;Below is my code (with the casted GUID) that threw the error. Also attached is a screenshot with the error message.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var ref_guid= upper ($feature.GUID)

if(ref_guid == null) {
return null
}

var wells_fs=FeatureSetByName($map,"Wellsites2")
var wells_filter = Filter(wells_fs, "GlobalID = @ref_guid")
var well = First(wells_filter)

if (well == null) {
return null
}
return well.Well_Name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Any suggestions on how best to resolve or work around this issue?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 20:28:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1168529#M3193</guid>
      <dc:creator>KelseySmuczynski</dc:creator>
      <dc:date>2022-04-27T20:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSet not working offline in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1168539#M3195</link>
      <description>&lt;P&gt;Testing == null does not seem to catch null/empty values.&lt;/P&gt;&lt;P&gt;What happens if you replace the two if statements with similar code as below (and in Aarons post above):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;if (variable == null){

with

if (IsEmpty(variable )) {&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, look at your filter statement.&amp;nbsp; It appears as if you are just filtering for "GlobalID =&amp;nbsp;@ref_guid"&amp;nbsp;&amp;nbsp;which would only match if the value of that cell = "@ref_guid" and not substituting the variable value.&lt;/P&gt;&lt;P&gt;Suspect it is looking for something more like the previous examples in this post:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;var subset = filter(wells_fs,`GlobalID = '${ref_guid}'`);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 21:10:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1168539#M3195</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2022-04-27T21:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSet not working offline in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1168594#M3200</link>
      <description>&lt;P&gt;Hey Rhett,&lt;/P&gt;&lt;P&gt;Thanks for the quick reply. I tried your suggestion (code below), but still received the same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var ref_guid= upper ($feature.GUID)

if(ref_guid == null) {
return null
}

var wells_fs=FeatureSetByName($map,"Wellsites2")
var wells_filter = Filter(wells_fs, `GlobalID = '${ref_guid}'`)
var well = First(wells_filter)

if (IsEmpty(well)){
return null
}
return well.Well_Name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, just to clarify, my initial code (below, just in case) was successfully populating fields in my inspection form with info from my related feature class. It stopped working when I created and used an offline map for data collection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//Initial code that was successful in non-offline mode.

var ref_guid= $feature.GUID // &amp;lt;---No upper casting

if(ref_guid == null) {
return null
}

var wells_fs=FeatureSetByName($map,"Wellsites2")
var wells_filter = Filter(wells_fs, "GlobalID = @ref_guid")
var well = First(wells_filter)

if (well == null) {
return null
}
return well.Well_Name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kelsey&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 23:06:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1168594#M3200</guid>
      <dc:creator>KelseySmuczynski</dc:creator>
      <dc:date>2022-04-27T23:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSet not working offline in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1168595#M3201</link>
      <description>&lt;P&gt;Oops, looks like I missed applying the IsEmpty function to the ref_guid in line 3. I updated my code as shown below and it tested without issues. I'll still need to see if the changes applied to my offline maps, but will report back soon.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;UPDATE: IT WORKED!&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/15530"&gt;@RhettZufelt&lt;/a&gt;&amp;nbsp;and&amp;nbsp;@Anonymous User&amp;nbsp;. You guys are rock stars.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var ref_guid= upper ($feature.GUID)

if(IsEmpty(ref_guid)) { //&amp;lt;-- applied IsEmpty()here
return null
}

var wells_fs=FeatureSetByName($map,"Wellsites2")
var wells_filter = Filter(wells_fs, `GlobalID = '${ref_guid}'`)
var well = First(wells_filter)

if (IsEmpty(well)){
return null
}
return well.Well_Name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 00:07:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1168595#M3201</guid>
      <dc:creator>KelseySmuczynski</dc:creator>
      <dc:date>2022-04-28T00:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSet not working offline in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1218200#M4626</link>
      <description>&lt;P&gt;Hi Aaron,&lt;/P&gt;&lt;P&gt;Just wanted to say a big thank you for this suggestion as it has helped me immensely. Last week I was pulling my hair out as I've been trying to pass globalids to the parentglobalid field in another feature using the intersection function so I could create relationships between the two features if they intersect (save the user having to add related records manually). I kept finding that the globalid would calculate sporadically and couldn't work out what the issue was. In my case I found that using the Lower() function on my globalid has solved it so again big thanks for this, it's been a life saver!&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Anthony&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2022 09:09:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1218200#M4626</guid>
      <dc:creator>AnthonyJonesRSK</dc:creator>
      <dc:date>2022-10-03T09:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSet not working offline in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1481732#M8760</link>
      <description>&lt;P&gt;I am experiencing a similar issue with FeatureSetByName not working offline. In this example, I am attempting to use the user property 'username' to lookup a staff ID number in a standalone lookup table within the map. I know that only certain user properties are available offline using GetUser($layer), but username is definitely one of them as I can return that no problem. The issue is when I try to filter the lookup table using that property. Online it executes without a hitch, however offline it is returening 0 records. I have tried returning the staff ID and also just the count of records returned from the filter function. The count consistently returns 0 when offline and 1 when online.&lt;/P&gt;&lt;P&gt;Below is my code snippet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var me = GetUser($layer).username&lt;BR /&gt;var lut = FeatureSetByName($map,"staff_LUT")&lt;BR /&gt;var filtered = Filter(lut, 'label2 = &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/92644"&gt;@me&lt;/a&gt;')&lt;BR /&gt;return First(filtered).name&lt;/PRE&gt;&lt;P&gt;In addition to this, I tried to just reference the table and return the count of records in it (see below), and when online it returned 184 as expected, however offline it returned 0.&lt;/P&gt;&lt;PRE&gt;return count(FeatureSetByName($map,"staff_LUT"))&lt;/PRE&gt;&lt;P&gt;Any advice would be greatly appreciated&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2024 00:52:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1481732#M8760</guid>
      <dc:creator>Samuel_McAuley</dc:creator>
      <dc:date>2024-05-31T00:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSet not working offline in Field Maps</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1482195#M8768</link>
      <description>&lt;P&gt;there are some issues with GetUser() in Field Maps app.&amp;nbsp; Try this to see if it gets the username for you:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var me = GetUser(FeatureSetByName($map,"staff_LUT")).username
var filtered = Filter(lut, `label2 = '${me}'`)&lt;/LI-CODE&gt;&lt;P&gt;Also, remember that if offline, a count (or any other operation) will only work on the features that are currently 'downloaded' into you offline area.&amp;nbsp; Is it possible that the offline are you are testing is outside of the 184 points in the data?&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2024 18:48:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/m-p/1482195#M8768</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2024-05-31T18:48:33Z</dc:date>
    </item>
  </channel>
</rss>

