Select to view content in your preferred language

Error when cloning Survey123 form

303
2
01-08-2025 01:38 AM
Labels (1)
HanliePetoors
Frequent Contributor

Hi,

I'm using the process outlined here to try and clone a survey from AGOL to an enterprise portal.

Everything works fine up until the line where I actually clone the items:

 

# Identify the folder associated with the survey
fldr = next((f for f in full_folder if f['id'] == survey_folder), 0)
#List all the items within that folder to be cloned later on
fldr_items = usr.items(folder=fldr)
# Create a new folder with the same name as the source folder to clone the contents to
target.content.create_folder(folder=fldr['title'])
# Clone items to the new folder
cloned_items = target.content.clone_items(items=fldr_items, folder=fldr['title'])

 

 

This gives me an error 

_ItemCreateException: ('Failed to create Feature Service EIIF Monitoring Tool V6: {\'code\': 500, \'message\': "The submitted field \'creationdate\' is not available in the layer \'0\' of the service \'Hosted/service_3053a\'.", \'details\': []}', <Item title:"service_3053a" type:Feature Layer Collection owner:myusername>)

 

The source survey has a field called 'CreationDate' that Survey123 added itself. I don't know why the clone method is looking for a field called 'creationdate'.

HanliePetoors_0-1736328834768.png

 

Does someone know how to resolve this error?

Thanks

Hanlie

 

Tags (2)
0 Kudos
2 Replies
JeffGarcia
Occasional Contributor
_ItemCreateException: ('Failed to create Form GIS Trainings: Failed to update Form GIS Trainings: Resource does not exist or is inaccessible.\n(Error Code: 404)', <Item title:"GIS Trainings" type:Form owner:userAdmin>)

Hi @HanliePetoors, were you ever able to figure this one out? I am seeing a very similar error trying to clone a survey form within my same portal environment. I am using notebook server (10.0 runtime with arcgis version 2.3.0) on enterprise version 11.3. 

0 Kudos
HanliePetoors
Frequent Contributor

@JeffGarcia unfortunately not.

To be honest, I have never been able to get the clone_items method to work for anything. Just the other day I wanted to clone a feature service from one AGOL organisation to another and it failed once more.

Good luck

Hanlie

0 Kudos