Select to view content in your preferred language

Invalid definition for 'SourceSchemaChangesAllowed' error

570
2
12-31-2025 01:10 PM
Labels (1)
AdamMesser1
Frequent Contributor

Was trying to update an ArcGIS Online hosted feature service definition. This service was created by publishing a Survey 123 Connect form, where both the hosted feature service and the *_form view were created. To allow our internal systems to access and query the feature service, we need to update the service definition to change the allowAnonymousToQuery and allowAnonymousToUpdate values to true. When clicking on Update Service Definition, the "Invalid definition for 'SourceSchemaChangesAllowed'." and "Invalid definition for System.Boolean" errors are returned. In researching this it appears the SourceSchema variable is only valid for the View, which I was able to update successfully. However, for the source feature service, you actually don't even have to change anything to get the error. You can click update and the errors appear immediately. The only way to update the allowAnonymous values was to remove all references to sourceSchema before clicking to update the definition. 

Is this a bug? 

Hopefully this helps anyone else with the same issue. Anything not changed is returned the next time you update, so removing the SourceSchemaChangesAllowed entries does not remove them. You will have to remove them each time you need to update the service definition. Please provide suggestions if there is a better way to approach this.

2 Replies
KatharineWhite
New Contributor

Can you clarify what you did to "remove all references to sourceSchema before clicking to update the definition"? Like did you remove that line of code, or did you set it to "false"?

I am trying to change the serviceDescription text of my feature layer to match the name I have given the layer. I tried to follow these instructions (How To: Change the name of a feature service layer), and after changing my serviceDescription, I  set the "lastEditDate"  to "NULL". Then when I click Update Layer Definition, I get the "Invalid definition for 'SourceSchemaChangesAllowed'." and "Invalid definition for System.Boolean" errors.


0 Kudos
AdamMesser1
Frequent Contributor

@KatharineWhite In the link you sent, the instructions on step 11 show an edit to the service definition. This is what I am referencing above. To 'remove all references', I simply removed that entire line, or section, which referenced "SourceSchemaChangesAllowed". Obviously caution is needed to edit the object in the json with respects to commas and brackets that contain or delineate parameters. As I mentioned, when you remove the items, they are still there and will return after updating. The only changes are to items you include that are different. I hope that helps.

0 Kudos