Select to view content in your preferred language

Splitting tool wipes values from AGOL feature service when using ArcGIS Pro 2.9.0

3430
10
01-09-2022 10:03 PM
PaulHarrison
Occasional Contributor

Hi,

I've just upgraded to ArcGIS Pro 2.9.0.  When I try to split a polygon stored in an ArcGIS Online feature service using ArcGIS Pro all the values are cleared from the fields in the resulting polygons.  I am aware of the Split Policy that can be updated for a feature class in a GDB but I can not find anything similar to update for an AGOL feature service.

Can someone please give me a nudge in the right direction if you have experienced before and found a solution.

Cheers.

Paul.

10 Replies
LindsayRaabe_FPCWA
Honored Contributor

Looking into this issue, could anyone confirm what this setting in the ArcOnline JSON editor might be? I can't find anything through the Googs. 

LindsayRaabe_FPCWA_0-1641860563299.png

 

We know the layer already supports splitting, and I'm unaware of how/where these settings are relevant. 

Lindsay Raabe
GIS Officer
Forest Products Commission WA
0 Kudos
LindsayRaabe_FPCWA
Honored Contributor

Hi Brains trust - we've just done a test install of 2.9.1 and this is still a problem. We can't see find a way to change the Domain Split Policy for an ArcGIS Online Feature Service from Default to Duplicate. When we split a feature through ArcGIS Pro we lose the attributes in any field that has a domain applied. Why this wasn't a problem before but is now is beyond me. Surely there's others out there with the same issue?

Lindsay Raabe
GIS Officer
Forest Products Commission WA
AndyWells
Frequent Contributor

Did you get any solution to this? We are having this happen with ArcGIS Online feature services as well. Some, but not all of the attributes will go to null. Splitting policy in ArcGIS Pro is not enabled for AGOL feature services, and I can't see where to change anything in ArcGIS Online. Like you, I think this started around the time of the 2.9 update. 

0 Kudos
LindsayRaabe_FPCWA
Honored Contributor

No solution yet - we've just reopened the ticket with ESRI. Hopefully something will come of it. Nice to know we're not alone though. 

Lindsay Raabe
GIS Officer
Forest Products Commission WA
0 Kudos
LindsayRaabe_FPCWA
Honored Contributor

UPDATEAfter the most recent updates to ArcGIS Online (June 2022) it seems the below solution doesn't work. I've tried a few variations but none of them result in the split policy either being inserted or changed. Back to not having an option but to use ArcMap to republish the service as suggested here: FAQ: Is it possible to add or edit domains after a feature service is published in ArcGIS Online? (e...

 

Posted an Idea here to give us something that works! Update "Alter Domain (Data Management)" tool to up... - Esri Community

 

 

 

We've finally got a solution to this issue (with assistance from ESRI Support). The JSON at the service URL for the hosted feature layer needs to be updated to either include or modify the split policy so that it reflects the desired behaviour ("Duplicate"). 

My workflow below:

1. Go to item page > click on sub-layer > open Service URL

LindsayRaabe_FPCWA_1-1653635141497.png

LindsayRaabe_FPCWA_2-1653635158290.png

2. Modify the URL to see the Admin settings

LindsayRaabe_FPCWA_3-1653635179294.png

3. Scroll to the bottom of the page and select the "Update Definition" option

LindsayRaabe_FPCWA_4-1653635205806.png

4. Clear the lastEditDate value (replace the value with "")

LindsayRaabe_FPCWA_5-1653635227045.png

5. Scroll down to the fields list

LindsayRaabe_FPCWA_6-1653635268362.png

6. Update any field domains where domain is NOT null with the below line of text:

 

 

 

        "splitPolicy" : "esriSPTDuplicate",

 

 

 

LindsayRaabe_FPCWA_9-1653635398388.png 

Updated JSON below:

LindsayRaabe_FPCWA_10-1653635415981.png

7. Click the "Update Layer Definition" button and whalla! Your features should now duplicate attributes in fields with coded domain values when split in ArcGIS Pro 2.9+

Lindsay Raabe
GIS Officer
Forest Products Commission WA
RichSiko
Occasional Contributor

I appreciate your very detailed explanation of how the the REST API should be able to be used to correct the issue with the Split policy. Here is the latest information on the Bug BUG-000148135 related to this.

I think the severity should be higher than medium since the workaround given is impractical.

Anytime you re-publish from ArcGIS Pro you need to be aware of side effects like losing pop-up definitions and symbology and other impacts to your maps and dashboards in AGOL. I think esri underestimates this effort and thus set the severity to Medium.

RichSiko_0-1657039167694.png

 

LindsayRaabe_FPCWA
Honored Contributor

Agreed. Severely underrated and the Alternate Solution also really lacks detail (use ArcGIS Pro to change the split policy how? Through the Domains menu? Republish service? GP Tool?)

Lindsay Raabe
GIS Officer
Forest Products Commission WA
LindsayRaabe_FPCWA
Honored Contributor

Further update: Apparently this process does work (with a tweak) as described here: Re: Change default split policy on new domains? - Page 3 - Esri Community

Lindsay Raabe
GIS Officer
Forest Products Commission WA
0 Kudos
willbruce_KarukTribeDNR
Frequent Contributor

If anyone is still running into this problem, I've had success using a simple loop to update the merge and split policy for any field with domains in the layer. Maybe this goes without saying, but always test on a non-production layer and back up the current definition before making changes to a definition.

# target the layer
target_service = gis.content.get('id') # '1238h12kj2k12jkh'
target_layer = target_service[0] # or whatever
target_fields = target_layer.properties['fields']

# update the split and merge policies
for field in fields:
    if 'domain' in field and field['domain'] is not None:
        # update mergePolicy and splitPolicy to esriSPTDuplicate
        field['domain']['mergePolicy'] = 'esriSPTDuplicate'
        field['domain']['splitPolicy'] = 'esriSPTDuplicate'

#update definition
target_layer.manager.update_definition({"fields": fields})