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?