Updating coded domains on portal

7089
19
Jump to solution
05-19-2021 09:16 AM
LLCCG
by
New Contributor III

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
19 Replies
LLCCG
by
New Contributor III

There is no "Created From" or "Other Views". There is, however, a Map Image Layer with the same name under Content. 

Unfortunately, I have no idea how it was created, as it happened before I started. 

0 Kudos
dgiersz_cuyahoga
Occasional Contributor

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.

#CLE #sloth
by Anonymous User
Not applicable

Hello Henry,

I am following your exact steps.  We just upgraded to 10.9.1 and when I try to delete or add an item in the domain I get "there was an error" with no other information.  I have tried it several times with no luck. Any other ideas?

Thank you,

AnnetteDomain Error.PNG

0 Kudos
Henry
by
Occasional Contributor II

Hi,

You may have more success editing the domain list via JSON from the REST endpoint as explained in this article:


How To: Add coded value domains to a hosted feature service from a REST endpoint (esri.com)

Just be sure to do it during downtime and save a json of the unedited service before you do so.

I've since transitioned my organization away from an Enterprise and Portal deployment to totally hosting in ArcGIS Online, which allows easier updates to the Domain values than what I had to content with in Enterprise - but I remember using the REST endpoint to edit coded domain values succesfully. Worked sometimes, didn't work others.

 

Henry
0 Kudos
CassidyKillian
Occasional Contributor II

Were you able to resolve this issue?  I am getting the same error when I try to add domain values at 10.9.1.

0 Kudos
dgiersz_cuyahoga
Occasional Contributor

Check the request in dev tools and see what the error is, it will be an updateDefinition call.

I just tried to add a value to a domain on our 10.9.1 box and I received an error.

I tried again with the browser dev tools open and looked at the response of the request and it had an error that the description was not a string (it was null in the request).

So I added a description to the field, then tried modifying the domain again and it worked fine.

 

#CLE #sloth
CassidyKillian
Occasional Contributor II

That did the trick.  I added a description to the field and it allowed me to update the domain list.

najeebhall
New Contributor III

Thank you! this works! 

0 Kudos
ZachBodenner
MVP Regular Contributor

Hello, were you able to find the solution to your issue? I'm having a similar one right now, though I've done this dozens of times before. I have a feature layer published from a geodatabase to the federated server we have set up with our org's Portal. I added a value to a coded domain in ArcCatalog, republished the service and... nothing. Sometimes I find it helps if I create a feature in a desktop program that already has the new coded value in it before overwriting my feature service, but that isn't working this time either. I don't know why I'm running into brick walls right now when I've done this process before, but if you found a solution I'd love to hear what you did!

0 Kudos
LLCCG
by
New Contributor III

I was, but all it took was republishing. 

0 Kudos