API access to updating domains in AGO

10-02-2018 10:33 AM
Status: Open
New Contributor III

We use coded value domains for multiple fields in more than 30 feature layers. In our previous applications (using ArcMap), we were able to use ArcObjects to update domains.  Using hosted services in ArcGIS Online,the owner of a hosted feature layer or organization administrator can add/edit/delete domains using the hosted feature layer's item page as described at this link:  Define attribute lists and ranges—ArcGIS Online Help | ArcGIS. This method is useful for GIS administrators or others with GIS knowledge, but it doesn't address our needs.

We need to be able to control which domains are editable and which values can be changed. Examples:

1) Values used in code to trigger other actions (fields that are required, setting default values in other fields). Values in this domain may be required by code or not-- meaning some values cannot be edited/deleted but the domain can have other values that can be editable.

2) Measurement units (ensures calculations use correct units).

3) T/F values -- certain actions are triggered based on whether value is true (1) or false (0), incorrect action can occur if  values other than 1/0 are added.

We want to offer our customers the flexibility of defining their own values for fields, while maintaining the integrity of the code. Our current application is in JavaScript using the 3.x API. Using that API, we might be able to use Esri Request and the UpdateDefinitions method to update domains. The functionality available in the AGO hosted feature layer described above would be preferred. Ideally, an API that allows domain editing tools that perform the following tasks 

1) Create a list of values based on the existing unique values in a field.

2) Assign the same domain to multiple fields (in different layers) at the same time.

3) Control which domains can be edited.

4) Control which values in a domain can be edited.

Tags (1)