Hello,
I'm new with configuring Smart Forms, but I am trying to create a calculated expression for an "Inspector Name" field for an asset inspection form I created. I would like to have the inspector's name automatically populate, where it basically pulls from the ArcGIS Account name or their email possiblily.
Luckily I was able to figure out the expression to automatically pull in the Inspection date of when the form was complete with the time, but now I need to determine how I can automatically pull in the user name.
If anyone has any insight or expressions they could share I would appreciate it.
Thank you!
Solved! Go to Solution.
Hello Staci
These types of functions are pretty well documented here.
The function you are looking for is the GetUser function
https://developers.arcgis.com/arcade/function-reference/portal_functions/#getuser
GetUser()
Hello Staci
These types of functions are pretty well documented here.
The function you are looking for is the GetUser function
https://developers.arcgis.com/arcade/function-reference/portal_functions/#getuser
GetUser()
This information you provided is very helpful, thank you so much! I reviewed the GetUser function and I feel like I am getting very close. Per my screanshot I attached do you know how I can get it to return the fullname? In the output it's pulling in all my AGOL information in the inspector name field. Thank you again!
Hi @StaciMcLaughlin, the following will pull back the fullName of the logged in user:
// Returns full name of logged in user
GetUser($layer).fullName
You can just paste that directly in the Calculated expression area in FieldMaps Designer.
Hope this helps.
Great, this helped! I used GetUser(FeatureSetByName($datastore, 'Channel Inspection')).fullname and it worked! Thank you!