Select to view content in your preferred language

Field Maps GetUser() not working in mobile app

693
3
Jump to solution
12-04-2023 11:19 AM
AlcoGISUser
New Contributor III

I have an app I built with Field Maps Designer and I would like a hidden field (UPDATED_BY) in an editable layer in the app to get automatically updated with the current user's username whenever edits are made.

var inspected = $feature.INSPECTION_STATUS;
var userInfo = GetUser();

IIF(!IsEmpty(inspected), userInfo.username, '');
 
If I make an update to INSPECTION_STATUS on the Smart Form in map viewer the field UPDATED_BY is automatically populated with my username through virtue of signing into AGOL to access the app. But when I try this in the mobile Field Maps version I get the error message:
 
Unable to submit
1 hidden attribute failed
 
Anyone know how to fix this so it works on mobile apps?
0 Kudos
1 Solution

Accepted Solutions
3 Replies
BrianBulla
Regular Contributor II
0 Kudos
AlcoGISUser
New Contributor III

Thanks. That worked but still need to test offline so the aforementioned bug may still be in play.

0 Kudos