Select to view content in your preferred language

How do I remove coded domain values added to a feature service via the API for Python

1015
4
03-11-2019 02:33 PM
SanjayAdvani
Emerging Contributor

Using either the ArcGIS API for Python arcis api for python or the AGOL Web UI, I am not able delete coded domain values (CDV) that were mistakenly added to a field.  The field has a sub-type associated with it, but even in an earlier test version, without the subtype, if I use the update_definition or delete_from_definition methods the CDVs seem to "stick"

Anyone have an example - ideally scripted - on how I am supposed to remove - I was able to add CDVs  through the python API, so I assume I should be able to remove them, yes?

Tags (1)
0 Kudos
4 Replies
EarlMedina
Esri Regular Contributor

If this is possible (haven't checked) and you were able to add them, I suspect that update_definition is what you're after. This should correspond to the REST API operation of the same name which I believe is used for the purpose.

0 Kudos
SanjayAdvani
Emerging Contributor

I have already tried that.  It doesn't work.  I am looking for an example of syntax on how to do it.  The return messaging is terrible and regardless of whether it works or not it says "success: True"

0 Kudos
EarlMedina
Esri Regular Contributor

I see. Just to confirm, you are working with a Hosted Feature Layer correct?

0 Kudos
SanjayAdvani
Emerging Contributor

Yes - uploaded a gdb to AGOL and then working against the hosted layer collection that results.

0 Kudos