Hello, is it possible to disable a layer's domain value for a specific user ?
We have a feature layer which contains a domain with 5 values including a "completed" one. We would like to disable (or mask, or ... ) this "completed" value for our field workers so that only their managers should be allowed to set it.
Is it possible through Arcade, or another method, to limit the available values based on user authentication ?
Seems very tricky at first sight but if anyone has a solution or a workaround, you're welcome.
Have a nice day.
You can do this using a hosted feature layer view and the Admin REST API.
I agree with the other post that using hosted feature layer views is probably a good way to manage this need for a domain for some users and not for others.
As an alternative though, you could definitely do this with Attribute Rules. You would essentially have a Constraint rule run on insert & update that checked the last_edit_user editor tracking field and this status field you're trying to limit changes to. If the status is Completed, then the last_edit_user must be from an approved list of your manager users or else you reject the edit.
Check out the example at https://github.com/Esri/arcade-expressions/blob/master/attribute-rules/attribute_rule_constraint/res.... It's definitely not an exact parallel since based on the edit user and the feature subtype it completely rejects or allows all edits to the feature. But it could be at least an example of how to manage your list of users in a separate table and call that table to check if the current user is allowed to make a specific edit.