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.
Hi @James_Whitacre_PGC ,
The portal parameter should be optional but runtime is returning an error unexpectedly when a portal is not specified in the expression. Have you tried specifying with your portal in the expression (not arcgis.com)? I am assuming you are on Enterprise and not AGOL?
Also, what is the other bug you mentioned? I can help look at that as well.
@ColinLawrence Thanks for responding. I am using ArcGIS Online in this case and the project that I am trying to use GetUser() also includes users within our ArcGIS Hub Premium AGO instance, so I think I would need to use GetUser(Portal('https://www.arcgis.com')), and not our org-specific URL. I tried both URLs with no success. I have not tested with ArcGIS Enterprise yet.
The bug I mentioned was linked in my previous post, but here is it again: https://support.esri.com/en-us/bug/the-arcgis-arcade-getuser-function-does-not-work-in-arc-bug-00017...
Sorry @James_Whitacre_PGC I did see this bug you linked, I meant the other one as you mentioned this was the second bug you ran into recently with arcade and Field Maps. Is there another BUG number I can help review?
Regarding BUG-000171374, we are working with the runtime team to get this addressed and hope it will be fixed in a future release of Field Maps but I currently do not have a timeline.