Updating coded domains on portal

2508
18
Jump to solution
05-19-2021 09:16 AM
LLCCG
by
New Contributor II

I'm a new GIS tech (and only GIS tech) at an organization. This organization has a map layer that has coded domains for a field. The engineering team asked if we could add another value. I added it to the layer in ArcGIS Pro (2.7). 

That layer is visible through Portal. If I make a change to a feature on the desktop, that change is immediately visible on the webmap. 

However, my new coded domains are not updated. If I change the value of a feature on the desktop, the new value shows up on Portal (that is, if I manually change something from "0" to "1", it will show "1" when I click on it in the webmap).  However, if I try to edit it in the webmap, the new value isn't an option. If I go to the layer's description in Portal, it only shows the old coded domains, and not the new ones that I added in Pro.

How do I get these to update?

0 Kudos
1 Solution

Accepted Solutions
dgiersz_cuyahoga
New Contributor III

OK, that makes sense. This is a map service with feature access enabled. Since this isn't hosted you'd have to update the domains in the service by either overwriting the service by republishing or using the REST API (to update the service definition.

I would try and find out who published it and how. You can also check the service details in ArcGIS Server Manager and to see  the original document used to create it and try and find that. Re-using that same document is the easiest way to republish. Make sure you pay attention to the Layer IDs, if those change it will break any Web Maps using the service.

View solution in original post

18 Replies
Henry
by
Occasional Contributor II

Hi LLCCG, can you confirm if you're attempting to modify the Domains of a live Feature Service or Hosted Feature Service? I assume that's what you're trying to do.

If that's the case, this can be tricky, and I struggled with it quite a bit when I was starting out with GIS at my organization. I'm assuming you're using Portal for Enterprise and attempting to modify a live Feature Service but I think this strategy works for Online as well. Prior to changing anything with the service I advise you to save/export a backup of the original service in case something goes wrong. And if you can make these changes during down hours when nobody is using or working with the service that is the safest option.

The easiest method I've found is to:

1) Navigate to the feature layer in your Portal's Content.

2) Select the Data tab on the blue bar for the Portal item.

3) Select the "Fields" button next to the "Table" tab to show the list of fields for the service.

4) Find the field that you want to change and click it's Display Name.

5) You will then see an overview of the Field and its details, including a List of Values (Domain)

6) Next to the List of Values (Domain) click edit. You should now be able to Add a new Domain Code and Label.

7) After that is done click Save at the bottom. For me, the Save sometimes returned a fail message and it took another try or two in order for the new domain code to stick.

Hope this helps, but as I said before be very careful when changing the data's schema. Save/export a backup of the original service in case something goes horribly wrong and you need to republish it later. There's another method that involves editing the layer's JSON through Portal Admin - but try it through the Portal first if you can.

Henry
0 Kudos
LLCCG
by
New Contributor II

Is there any reason that I wouldn't have an "Edit" button?Screenshot.png

0 Kudos
dgiersz_cuyahoga
New Contributor III

You probably have to be the Item owner or an administrator.

0 Kudos
LLCCG
by
New Contributor II

I think I'm both.

0 Kudos
dgiersz_cuyahoga
New Contributor III

Can you provide more specifics on the source of the data? Is it hosted in Portal or AGOL?

Is the screenshot above of a view of the service?

0 Kudos
LLCCG
by
New Contributor II

It's hosted in Portal. (It's at myorganization.com/portal/ rather than on Esri's servers, at least, so I assume so.)

That's a screenshot from if I go to "Content", click on the Feature Layer, then go to Data>Fields and then clck the Display Name for the attribute I'm trying to change. 

0 Kudos
dgiersz_cuyahoga
New Contributor III

The Item page would should show it as "Feature Layer (hosted)" too.

You can also confirm here that you're the owner, it isn't a view, and the source URL is your ArcGIS Server URL.

I don't know, all the hosted stuff I am looking at in my Org that I own gives me the option to edit the List of fields. And all the docs show this is how you do it for Portal 10.7 and above.

0 Kudos
LLCCG
by
New Contributor II

It shows it as a "Feature Layer", but not a "Feature Layer (hosted)". It does show me as the owner, the source is "Feature Service" and url is myorganiztion.com/server/rest/...

 

0 Kudos
dgiersz_cuyahoga
New Contributor III

Is there a 'Created From' or 'Other Views' under the Details, just below 'Source'? What about an a Map Image layer with the same/similar name?

How was this feature service created?

0 Kudos