Select to view content in your preferred language

Arcade for Creator field

117
2
Jump to solution
Tuesday
FrankHerbert
Occasional Contributor

This one should be easy for most people out there...

I have a Field Maps survey for offline use. There is only one feature layer that I wish to populate during data collection. I have a field called 'Contractor' and I want it to auto-populate the same as the Creator field. Editor tracking is enabled on the target feaure layer.

So in other words, I can record the name of the person collecting the data without worrying about losing the info if editor tracking is disabled.

I have tried the following:
$feature.Creator

Text(GetUser().username)

$user.username

 

And a few others. Most of them return the Creator field inside the arcade expression preview pane, but then they fail inside Field Maps. I can do this easily in QuickCapture but for some reason, Field Maps won't let me.

 

0 Kudos
1 Solution

Accepted Solutions
AlexHogan
Esri Contributor

Hi @FrankHerbert 

I just tested the following Arcade expression and this works offline

var userInfo = GetUser($layer);
return userInfo.username;
 
Information like the FullName does look like it requires an online connection though,
 
Let me know if you have any other questions about this one
 
Thanks
Alex

View solution in original post

2 Replies
AlexHogan
Esri Contributor

Hi @FrankHerbert 

I just tested the following Arcade expression and this works offline

var userInfo = GetUser($layer);
return userInfo.username;
 
Information like the FullName does look like it requires an online connection though,
 
Let me know if you have any other questions about this one
 
Thanks
Alex
FrankHerbert
Occasional Contributor

This works 🙂

Thank you Alex.

0 Kudos