Hi,
So I'm trying to populate a field using an expression. Just to fill it in with the logged in username, so a fairly basic one line expression, which compiles and works fine in the Arcade Editor on the AGOL Field Maps Early Access designer.
GetUser($layer).username;
For some reason when running the app (using iOS), I get the "Failed to Calculate" error on that expression and it won't let me save the record.
Any ideas??
Solved! Go to Solution.
But for some reason this does work.....so strange that this (and my first one) work in the Arcade Editor, but only one of them works in the actual app.
GetUser(FeatureSetByName($datastore, 'Manhole Inspections')).username;
Hi Brian,
This is what works for me:
No, that doesn't work for me at all.
But for some reason this does work.....so strange that this (and my first one) work in the Arcade Editor, but only one of them works in the actual app.
GetUser(FeatureSetByName($datastore, 'Manhole Inspections')).username;
Thank you Brian, this was very helpful. I modified your expression a little bit to use on a related table . This worked for my snowplowing record:
GetUser(FeatureSetById($datastore, "3")).fullName;
I believe this bug is back...or at least I am unable to get the $layer, $datastore, or $map methods working again on iOS Field Maps
I should clarify I am online (not an offline workflow) and it is still failing to populate
Looking into why this is happening. Seems to be related to the expression being 1 line only as something like this works:
var userInfo = GetUser(portal("https://www.arcgis.com"),"")
return userInfo.fullName
Adding the portal fixed the issue for my inspectors, using Field Maps on a related table.
I can't get any of these suggestions to work in Field Maps. They all work in the web map. There is also a bug registered: https://support.esri.com/en-us/bug/the-arcgis-arcade-getuser-function-does-not-work-in-arc-bug-00017...
Probably good for me to note that we are using SAML, but I also checked with a built-in account and it still did not work.
This is the second bug I have uncovered related to Arcade and Field Maps in two weeks. Getting pretty frustrating!!