Select to view content in your preferred language

Change to full name for created_user and last_edited_user - Editor tracking

513
3
12-19-2023 02:59 AM
Status: Open
Labels (1)
CarolineLindhe
Frequent Contributor

It is difficult, in an organisation with many users, to keep track of all user names registered through Editor Tracking. What user name belongs to whom. 

In my organisation 99% of the editing is made in Field Maps. The user name registrered in created_user or last_edited_user fields is collected from the Portal member info. 

It would make life easier of all users if there was an option to choose full name instead of user name for the Editor Tracking fields.

3 Comments
CarolineLindhe

var p = Portal('https://PORTALADRESS/portal')
var u = getUser(p);
var fullName = u.fullName;
return fullName;

CarolineLindhe

Question is solved.

StuartGrey1

Hi @CarolineLindhe ,

Thank you for this code, it helped me solve my problem 🙂

I've gone one step further and added some extra in order to retrieve username from Editor Tracking fields 'created_user' or 'last_edited_user' and return their full name. I have added this as an expression in a web map and it returns the users name in full. 

var c = $feature["created_user"]

var p = Portal('https://PORTALADDRESS/arcgis');

var u = getUser(p,c);

var fullName = u.fullname;

return fullName;

Hope this helps somebody in the future 🙂