Can you set a field as unique using the arcgis rest api for python?
You can, enabling unique values means adding an index with a unique constraint to the field. To do this in the API you'll want to call the FeatureLayerManager's add_to_definition() function, passing in something like this:
{"indexes":[ {"fields":"MyField", "isUnique":True, "description":"For uniqueness"} ]}
thanks that works - this is the code:
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.