Select to view content in your preferred language

Arcade expression not working with offline maps

232
3
07-17-2024 06:28 AM
LouiseHarris1
Regular Contributor

I am using the following expression to auto populate users names in Field Maps. This works fine online but fails in offline maps, why is this?

GetUser($layer).fullname  

 

0 Kudos
3 Replies
Lee_Butler
Occasional Contributor

I don't think .fullname is supported offline.  Try using GetUser($layer).username instead.

ChristopherCounsell
MVP Regular Contributor

This is correct. Only username offline. Other properties like bio, name, makes a live request against the online profile.

jcarlson
MVP Esteemed Contributor

When you're online, what does GetUser($layer) actually do? And is it different from calling the function with no parameters, i.e., GetUser()?

According to the docs, that function takes a Portal object and/or username as its parameters. I don't think $layer does anything meaningful here.

Also, GetUser is a portal function, and probably relies on an internet connection.

- Josh Carlson
Kendall County GIS
0 Kudos