<?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: GetUser() When Offline and Disconnected in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/getuser-when-offline-and-disconnected/m-p/1619012#M10896</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/6381"&gt;@JeffHaney&lt;/a&gt;&amp;nbsp;, I have the exact situation as you, with a standalone ArcGIS Server feature service in an AGOL field map, returning the wrong credential with disconnected. See link below for my workaround, hope that helps your case.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-field-maps-questions/getuser-issues-with-registered-enterprise-service/m-p/1618968" target="_blank"&gt;Re: getuser() issues with registered enterprise se... - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 May 2025 17:55:55 GMT</pubDate>
    <dc:creator>PaulPetersen1</dc:creator>
    <dc:date>2025-05-28T17:55:55Z</dc:date>
    <item>
      <title>GetUser() When Offline and Disconnected</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/getuser-when-offline-and-disconnected/m-p/1265027#M5506</link>
      <description>&lt;P&gt;I have seen a few discussions about GetUser() not working when using Field Maps in a disconnected environment:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-field-maps-questions/form-calculate-getuser-offline/m-p/1166748" target="_blank"&gt;Form Calculate GetUser() Offline - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Some discussion above was a bit muddled because not everyone was tested in a disconnected environment. Ultimately, no solution worked while offline.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-offline-map-arcade-calculation/m-p/1259436" target="_blank"&gt;Solved: Field Maps, Offline Map, Arcade Calculation Expres... - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDE1NTg4Nw==" target="_blank"&gt;BUG-000155887: Arcade expressions fail to calculate when using offl.. (esri.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The two above links seem to suggest that this is in fact, a bug that may be addressed down the road.&lt;/P&gt;&lt;P&gt;Has anyone come up with a way to get the current user's information in Field Maps when offline? Or do we have to wait until a bug fix/enhancement is released?&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only workaround I could think of was to use editor tracking fields, but these fields are not populated until after a data point is collected. So form calculations needing this information will not have it unless the user re-edits the newly added point. This is not a great solution.&lt;/P&gt;&lt;P&gt;When we use Field Maps, many users like to create IDs in their data that includes their initials. This should be easily automated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 17:22:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/getuser-when-offline-and-disconnected/m-p/1265027#M5506</guid>
      <dc:creator>DanielMiranda2</dc:creator>
      <dc:date>2023-03-07T17:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: GetUser() When Offline and Disconnected</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/getuser-when-offline-and-disconnected/m-p/1265116#M5510</link>
      <description>&lt;P&gt;I have done some more research into this and believe I have found a more viable solution.&lt;/P&gt;&lt;P&gt;What specifically does not work when offline is:&lt;/P&gt;&lt;LI-CODE lang="c"&gt; GetUser($layer).fullName&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Using firstName or lastName also does not work. When I checked the Field Maps mobile app error log, the actual error for the Arcade expression is "field_not_found."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So clearly, a user's full name is not part of the dictionary returned by GetUser. So instead, I tried the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;GetUser($layer).username&lt;/LI-CODE&gt;&lt;P&gt;I figured, the editor tracking fields clearly have access to usernames, so maybe GetUser() does too. This DOES work while offline. When I say offline I mean my device is in airplane mode and I am using either an offline area created on the device, or an offline area created in Field Maps Designer. I tested both.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my specific case, our organization uses first initial and last name as part of their usernames, so I can still get the information I want. I won't mark this as a solution though, as it is not quite as good as retrieving a full name. I also find it frustrating that this is not documented anywhere in the Field Maps references or the Arcade reference.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 19:19:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/getuser-when-offline-and-disconnected/m-p/1265116#M5510</guid>
      <dc:creator>DanielMiranda2</dc:creator>
      <dc:date>2023-03-07T19:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: GetUser() When Offline and Disconnected</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/getuser-when-offline-and-disconnected/m-p/1267240#M5552</link>
      <description>&lt;P&gt;They said at Dev Summit that full name does not work yet since it is not part of the offline info and they are working to find a way to support it.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 18:41:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/getuser-when-offline-and-disconnected/m-p/1267240#M5552</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2023-03-13T18:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: GetUser() When Offline and Disconnected</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/getuser-when-offline-and-disconnected/m-p/1419517#M8567</link>
      <description>&lt;P&gt;I created a bit of a workaround for this if anyone is interested.&amp;nbsp; I would imagine this workaround is not practical or applicable for all use cases, but it is still something.&amp;nbsp; I literally have not tested this offline, but I see no reason why it would not work, since the table in question could be synced and available offline.&amp;nbsp; (I will test that in the coming weeks, but I figured the concept was worth sharing.)&lt;/P&gt;&lt;P&gt;For an unrelated task, I created a table with key (field) names, and lookup values to search for, then "value" field names, and values to return.&amp;nbsp; I initially put last_edited_user to try and populate this, but that only hits the form on submit (so it couldn't actively apply from the lookup table.)&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead, I used the GetUser($layer) [thanks for that formatting by the way], and searched on the table I added to the form.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MitchellGrafstein_0-1715014309805.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/103237iC38A53DE1276AC53/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MitchellGrafstein_0-1715014309805.png" alt="MitchellGrafstein_0-1715014309805.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var result = null // set the result variable to null so this expression will return null if the search field is empty/null

var key_name = 'key_name' // the field that contains the keys which are field names that will be used in the FeatureSet filter
var key_lookup = 'key_lookup' // the field that contains the lookup value from the form

var lookup_field = 'lookup_field' // the field that we will search on which contains field names as values
var lookup_value = 'lookup_value' // the field that contains the desired value

var lookup_fields_of_interest = [key_name,lookup_field,key_lookup,lookup_value] // the list of the fields of interest which are set above

var key_name_search = "last_edited_user" // the lookup value used to filter the FeatureSet --&amp;gt; key_name=@key_name_search
// in a sense, key_name_search is a nested key found in the key_name field
// key_name _search is also the field in the form we're interested in
var lookup_field_search = 'toughpad_user' // the value to look up in the lookup_field --&amp;gt; lookup_field=@lookup_field_search


var username=GetUser($layer).username // only used for searching on the logged-in username
// if(!(IsEmpty($feature[key_name_search]))){ // code to use if searching for a field in the form (which matches the key_name field in the table)
if(!(IsEmpty(username))){ // code to use if searching for the username of the logged-in user

var search_value = username // the field in the form/feature used for the lookup --&amp;gt; key_lookup=@search_value

var lku_fset = FeatureSetById($map, /* LKUs Table Feature Service - treatment lkus tbl */ "18f0b3902e4-layer-30",lookup_fields_of_interest,false)

    // had to explicitly name the field in the filter, using &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/696824"&gt;@Variable80&lt;/a&gt; for the field name was not returning the proper values
    // tested if variable name matching the field name mattered, it did not, could not use &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/696824"&gt;@Variable80&lt;/a&gt; for the field name in the filter
    // MG - 2024-04-23
    result = First(Filter(lku_fset, 'key_name=@key_name_search AND lookup_field=@lookup_field_search AND key_lookup=@search_value'))[lookup_value]

// }
}
return result 
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 06 May 2024 17:03:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/getuser-when-offline-and-disconnected/m-p/1419517#M8567</guid>
      <dc:creator>MitchellGrafstein</dc:creator>
      <dc:date>2024-05-06T17:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: GetUser() When Offline and Disconnected</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/getuser-when-offline-and-disconnected/m-p/1515178#M9223</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/614407"&gt;@DanielMiranda2&lt;/a&gt;&amp;nbsp; &amp;nbsp;Your suggestion works offline for me.&amp;nbsp; However, I am using a feature service coming from a standalone ArcGIS Server tied to our enterprise GIS database.&amp;nbsp; The username that comes through is the user credential I used to set up the Feature Layer in AGOL, not the username of the person logged into Field Maps.&lt;/P&gt;&lt;P&gt;I gave up and turned my field users into a domain driven drop down.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 20:40:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/getuser-when-offline-and-disconnected/m-p/1515178#M9223</guid>
      <dc:creator>JeffHaney</dc:creator>
      <dc:date>2024-08-05T20:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: GetUser() When Offline and Disconnected</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/getuser-when-offline-and-disconnected/m-p/1619012#M10896</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/6381"&gt;@JeffHaney&lt;/a&gt;&amp;nbsp;, I have the exact situation as you, with a standalone ArcGIS Server feature service in an AGOL field map, returning the wrong credential with disconnected. See link below for my workaround, hope that helps your case.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-field-maps-questions/getuser-issues-with-registered-enterprise-service/m-p/1618968" target="_blank"&gt;Re: getuser() issues with registered enterprise se... - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2025 17:55:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/getuser-when-offline-and-disconnected/m-p/1619012#M10896</guid>
      <dc:creator>PaulPetersen1</dc:creator>
      <dc:date>2025-05-28T17:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: GetUser() When Offline and Disconnected</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/getuser-when-offline-and-disconnected/m-p/1635121#M11163</link>
      <description>&lt;P&gt;Does this work in ArcGIS Online through arcade?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 18:53:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/getuser-when-offline-and-disconnected/m-p/1635121#M11163</guid>
      <dc:creator>Krocha</dc:creator>
      <dc:date>2025-07-22T18:53:42Z</dc:date>
    </item>
  </channel>
</rss>

