Hi all,
My question is: why is it that domain values are not implemented to the fields in a layer in a FeatureServer when you publish Feature Classes from an FGDB containing domain values?
This is the workflow I have followed (Python files to replicate this workflow can be found in the attached zip file):
- I have a Python (ArcPY) script to create an FGDB - with Editor Tracking and Attachments enabled, and wit coded domain values applied to multiple fields.
- After creation, I have (manually) zipped the FGDB
- Next I use a Python script to upload the FGDB to ArcGIS Online, and once uploaded the Feature Classes from this FGDB are published to a FeatureServer /Hosted Feature Layer. This script also takes care of all kinds of adminstrative tasks, like adding a Snippet, a Description, the Terms of Use, Tags, Credits and a Thumbnail.
Everything looks fine after publication, except for the Coded Value Domains which where present in the FGDB: these are not applied to the fields in the layers in the FeatureServer... These fields just remain free fields with no domains attached. And that's a pity, isn't it?
Can anyone advise?
Pythons files used in this process (see attached zip file) - please feel free to have a look at the code; it creates just a simple FGBD for demonstration purposes:
- Step 1 above: arcpy_prepare_fgdb_example.py together with domain_definitions.py and feature_class_fields.csv
- Step 3 above: agol_publish_fc_from_fgdb_to_featureserver_layer.py together with provide_credentials.py and my_credentials.json
Of course I can add the domains afterwards, manually (using the ArcGIS Online UI) or using the ArcGIS API for Python, but I just wonder why the domain values are not implemented in the first place.
Thanks in advance,
Egge-Jan