Add ability to access the current user name in Arcade

732
3
04-10-2020 05:49 AM
Status: Implemented
Labels (1)
JohnBrodnicki
New Contributor III

Our organization currently uses class extensions applied to feature classes in a SDE geodatabase to manage edit permissions. Many people can have permission to edit features within a certain area (defined by a feature in a feature class). This works well in ArcMap but we would like to migrate to ArcPro. Editor Tracking in combination with Constraint Attribute Rules seems to be the best option for replacing the class extensions. It works well when a user inserts or updates a feature. But, Editor Tracking only fires on inserts and updates. It does not  fire on delete. There doesn't seem to be any way to check who the current user is when a delete is made to determine if they have permission to delete a feature in that specific location. The ability to access the current user name would make it possible to determine if the user has permission to delete a feature in a specific location using a Constraint Attribute Rule. This is the main issue keeping us from migrating to ArcPro. 

3 Comments
KoryKramer
Status changed to: Implemented

The getUser function is added in ArcGIS Pro 2.7.  See @HusseinNasser2's great demo here: Use the getUser Function to Control Editing Access - YouTube 

And check out Ideas in ArcGIS Pro 2.7: Something to Celebrate  and what's new in ArcGIS Pro 2.7.

JohnBrodnicki

Thanks Kory! This is great news.

FredIausly1

I'm not able to to use the GetUser function to populate my CreateBy and EditedBy fields.  I'm editing address point feature in Pro.  I've tried numerous example that have been given with no success.  Regardless of what I try nothing is passed to populate the field.  This is where I'm at:

var user = GetUser($featureSet)
var u = user.username
return u

Can anyone help on tracking the User while editing a feature in a geodatabase?