Hello!
I am having to set up a bunch of new domains a day for the foreseeable future. Is there a way to have the split policy in domains automatically go to "duplicate" instead of "default" in all new domains. We NEVER need the "default" option and it is very easy to miss that step when setting up multiple things per day.
I'll have to give this another crack if I can find a feature service that still has the old settings. I think I did a mass run of updates when I had this working the first time so might not have any left. Suppose I could always try on a test dataset and see what happens. Good to know that it wasn't all in vein though!
@LindsayRaabe_FPCWA - I have figured out how to update definitions through the admin services in AGOL! Here is the general workflow:
1. Go to your item page of the desired layer.
2. Scroll down to the URL and click View.
3. In the ArcGIS Rest Services Directory, click on Admin on the top right.
4. Click on the layer name.
These next few steps are from LindsayRaabe's post here: Re: Splitting tool wipes values from AGOL feature ... - Esri Community
5. Scroll to the bottom of the page and select the "Update Definition" option
6. Clear the lastEditDate value (replace the value with "")
7. Scroll down to the fields list
8. Update any field domains where domain is NOT null with the below line of text:
"splitPolicy" : "esriSPTDuplicate",
Updated JSON below:
9. When finished, click the Update Layer Definition button. You should then say the layer was updated.
Is your script running on local feature classes or feature services in ArcGIS Online? I'd love to find a way to manage ArcGIS Online domains from centralised lists.
I'm not sure if there's an answer to changing the default settings...but I run a pretty standard script to do this whenever I start a new project and need to make edits to data. You could employ the same script and schedule it to run daily to update all the domains you create.
Hopefully this helps.
# Identify all domains present within the gdb and create an object listdomainList = arcpy.da.ListDomains(inputGDB)# Update the split policy for each domain within a loopfor domain in domainList: # Identify the domain name from the domain object list domainName = domain.name# Update the split policy to 'Duplicate' for the domain arcpy.management.AlterDomain(inputGDB, domainName, split_policy='DUPLICATE')
Thanks for looking into this Lindsay. I was hoping I was doing it wrong! I'm surprised there are not more people screaming about not being able to update the definitions in the admin services.
Overwriting all my services would definitely not be ideal. I might just have to revert back to Pro 2.8 just so I can use my split tool correctly, until they fix things. I'll try to follow up with ESRI about the bug that didn't really get fixed.
Idea posted here: Update "Alter Domain (Data Management)" tool to up... - Esri Community
Hi Luke. It looks like things have changed with the most recent ArcOnline update....and no longer work! I tried recreating the steps and discovered that now I can't add or update the split policy! >:(
The below help topic has a workflow that includes making a local copy of an existing feature service (in ArcMap!) and overwriting the previous service. Not really desirable (especially when this can mess with hosted views, offline capabilities, etc).
FAQ: Is it possible to add or edit domains after a feature service is published in ArcGIS Online? (esri.com)
I will now be posting an Idea to update the "Alter Domain" tool to include feature services and not just geodatabases/feature classes.
Talk about making life harder for everyone.........
Thanks for the responses, guys.
@LindsayRaabe_FPCWA can you confirm that the first couple steps in the linked post above are correct? I'm wondering if something changed since then, or if I'm doing something wrong. When I View the URL, it brings me to the ArcGIS REST Services Directory, but the URL starts with my organizations info, not the "services#.arcgis.com", so there doesn't appear to be the appropriate place to enter "admin". But I can go to Update Feature at the bottom, and then there is an Admin option where I can then find Update Definition. It just doesn't appear to be saving the "esriSPTDuplicate" changes that I make when trying to update the definition.
Instead of going to View the URL, if I copy and paste the URL into a new window the URL looks correct, but says Token Required. Can you help?
Thanks @LindsayRaabe_FPCWA for responding to @LukeGilner1 . Interesting that the issue seems to still persist in 3.0. We've got a rigorous testing process to complete before doing version upgrades so we're not quite up to looking at 3.0 in that much detail. Lindsay has made all the fixes to our feature services in AGOL as discussed above so we may not have picked it up anyway. Thanks for the feedback Luke.
Hi Luke. The solution that we have described in the linked post didn't seem to have any negative effects on our maps in Field Maps, and I assume that would be because Field Maps doesn't actually have any split capabilities yet. As frustrating as it was to implement, it wasn't difficult to do, just a bit time consuming. In saying that, we don't have hundreds or thousands of feature services like some organisations might which would make it prohibitive. Some python guru might be able to write a find/replace script that could search all the feature service JSON's and update the relevant text to duplicate. Wouldn't be a small undertaking though.
Well...I upgraded to 3.0 today. The split tool is still not performing as it did before 2.9. If you have any domains and the domain policy is not duplicate, it will still wipe out all your attributes with domains. (If your split policy is set to duplicate, it will work correctly). I'm fairly certain when I originally published my hosted features I had the domain policies set to duplicate, but when you bring the hosted feature back into ArcPro the policy was changed to default. Prior to 2.9 this didn't matter - the split tool would still duplicate attributes properly.
@PaulHarrison do you know if the above workaround you posted has any effect on replicas using the layers in Field Maps/Collector? I'm always cautious to make a significant change to any layers because I'm afraid it'll cause syncing issues from Field Maps/Collector. I wish there was a way to batch update all domains to duplicate!
Yeah. It does look like they have fixed the bug. We haven't tried it either. However, as an interim fix Esri gave us a patch up process that has done the job for us. Go to the below thread to see the details posted by my colleague. Sorry, I should have posted this earlier!https://community.esri.com/t5/arcgis-pro-questions/splitting-tool-wipes-values-from-agol-feature/m-p/1177873#M55583
Cool! I haven't updated yet either.
found this item in ArcGis Pro 3.0 "issues addressed"
"BUG-000148890 In ArcGIS Pro, splitting features from a hosted feature service deletes the values in theattribute table when a domain is assigned"
ArcGIS Pro 3.0 Issues Addressed (esri.com)
have not updated to test yet.
I've actually got an open ticket with Esri on this issue at the moment. I've had some discussion with them and I believe they are looking into it.
I will post an update when I get something that is going in the right direction.
Not yet - still waiting on ESRI support (US) to get back to ESRI support (Aus) I believe.
Has there been any more movement on this? I had my split policies set as duplicate prior to 2.9, but it appears they have reverted to Default. Not helpful.
Looking into this issue with Paul, could anyone confirm what this setting in the ArcOnline JSON editor might be? I can't find anything through the Googs.
We know the layer already supports splitting, and I'm unaware of how/where these settings are relevant.
Thanks for the insight Olivia. We may go down that path and wait for another patch that hopefully resolves the issue. However, one of my colleagues who is quite good at digging up solutions has just got back from leave and it taking another look to see if there is a work around. No doubt you'll see the post he finds a solution.
I logged this issue with Esri UK Technical Support. It seems as though there is a bug with 2.9. I rolled back to 2.8.2 (their suggestion) so that I could carry on working efficiently. Not the best solution, but at least it works.
Was this resolved? I am having the same issue. It didn't occur until after we upgraded to ArcGIS Pro 2.9.0 and we have been trying to split AGOL feature services through Pro.Interestingly, when we try to split the feature service on a PC still running Pro 2.8 the Split Policy seems to honor the "Duplicate" option. Very odd...Would really appreciate some support on this.Cheers.
I'm having the same issue with editing feature hosted layers in ArcGIS Pro 2.9. A colleague just used the same workflow/process in ArcGIS Pro 2.8.2 and doesn't have the same issue. It's a real time waster to have to add back attributes that were already there - my work is taking about three times longer than it should. Downloading the feature hosted layer, editing and reloading will also not work for us.
We have the same issue with default split policy when working with hosted feature layers. There does not appear to be a way to change the split policy from the default value to duplicate. This lack of functionality will prevent us from utilizing basic GP tools to reduce field worker data entry. We want to add new fields to our data collection form (we enhanced said form using the Field Maps web app to streamline data collection) but there does not appear to be a way to set the split policy to anything other than "default." The same issue exists with setting the merge policy for new fields. Hypothetically we could download the hosted feature layers, update them and then replace the existing hosted feature layer but this will break the customized forms we developed. Is there any documented work around that will let us manage these critical domain settings without blowing up our Field Maps forms?
Having the same issue- any solution found? Please ESRI, this has resulted in much work to fix lost attributes when forgetting to change default split policy to duplicate.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.