Select to view content in your preferred language

update username when enter date in another field

782
1
Jump to solution
08-14-2023 02:16 PM
Ona_Tim
Emerging Contributor

My field crews had me create a new layer for them for some of the mowing maintenance.  The 3 task they have in the layer is TrimmedBy, SprayedBy, and BlownOffBy with dates the task were performed. One thing that they asked for is when they enter the date the task was completed, the corresponding task( ie BlownOffBy) would auto populate with the user name.  I wrote the following code and when I run the test in the Field map forms it works but when I try it test it on the tablet it says Failed to Calculate.  What am I'm missing?

Thank you.

 
0 Kudos
1 Solution

Accepted Solutions
ChrisDunn1
Esri Contributor

Hi @Ona_Tim ,

There is a difference in behavior between the map viewer and Field Maps when it comes to using the GetUser() arcade function. In order for it to work in Field Maps, try using:

GetUser($layer).username

I hope that helps.

Chris

View solution in original post

0 Kudos
1 Reply
ChrisDunn1
Esri Contributor

Hi @Ona_Tim ,

There is a difference in behavior between the map viewer and Field Maps when it comes to using the GetUser() arcade function. In order for it to work in Field Maps, try using:

GetUser($layer).username

I hope that helps.

Chris

0 Kudos