Hi @CraigCheeseman @Anonymous User ,
EDIT: I just tested with an offline area and it works 🙂
Yet to test offline, but I was also struggling to get this to work in the FieldMaps app. Worked fine in the WebApp but not in the mobile app once editing. Having come across your post, I decided to test the following code:
var user = GetUser(FeatureSetByName($map,"FEATURE"), true)
var username = user.username
return username
I replaced $layer with FeatureSetByName and this worked in the FieldMaps app and in the Web App.
Hope this helps!
Elleni