Get logged in Username

1108
3
Jump to solution
03-13-2023 08:29 AM
BrianBulla1
Occasional Contributor

Hi,

Just back from the Dev Summit and thought I'd start diving into FieldMaps.  So I'm creating my first form and want to AutoPopulate the "USERNAME" field with that of the logged in user.  I'm assuming I need to use Arcade to do this, but I have no clue what the code would be.

In QuickCapture this was super easy.  Can anyone advise?

Thanks!

0 Kudos
1 Solution

Accepted Solutions
BrianBulla1
Occasional Contributor

OK, I figured this out.

GetUser($layer).fullName

 

View solution in original post

3 Replies
BrianBulla1
Occasional Contributor

OK, I figured this out.

GetUser($layer).fullName

 

DanielMiranda2
Occasional Contributor

Be careful with this if you plan to take Field Maps offline. FullName, FirstName, and LastName do not work while offline. username however, does work.

ADS
by
New Contributor II

Another configuration would be to enable editor tracking in Map Viewer, which I believe adds the fields: [Creator, Creator Date, Editor, Edit Date] to your feature layer where you want to add/edit features. These fields populate from signed in AGOL or Enterprise Portal user credentials.    After you enable editor  tracking, to add the fields,  you can then configure and utilize the fields in Field Maps Designer form view and elsewhere. 

 ADS_0-1678726145151.png

ADS_1-1678726215208.png