Select to view content in your preferred language

Update Definition Through Rest Not Working

11512
15
Jump to solution
02-18-2019 10:25 AM
PhilipQueen
Frequent Contributor

I am trying to update a feature service definition following the process described in this document: https://www.esri.com/arcgis-blog/wp-content/uploads/2014/10/How-to-Update-Hosted-Feature-Service-Sch... 

Specifically, I am trying to set the sourceSchemaChangesAllowed property to false (and eventually back to true). So in the admin page of my service URL, I go to update definition.

I change true to false in the above, and then replace the last edited field with empty double quotes. It returns the following page with no error:

But when I go to my feature service again, the change has no been made.

 

This is a similar issue to this Geonet post: Updates in JSON feature service edit not taking. A bug was filed for making the same operation on different fields, with no workaround provided. Is this also a bug, and if so, does anyone have a workaround?

0 Kudos
15 Replies
GrantSmith122
Regular Contributor

Hi, I'm working with a View layer and am getting a similar issue to what was discussed in this thread. I have verified that "hasStaticData" : false, and "sourceSchemaChangesAllowed" : true are set in the View layer. When I go to update the drawingInfo section in JSON, I get a successful response but no updates to the data. What am I missing here?

0 Kudos
Kaz
by
Occasional Contributor

Thank you so much for the detailed response. We had a survey that could not be updated due to a view that had "hasStaticData" : true,"sourceSchemaChangesAllowed" : true

We updated the view definition to "hasStaticData" : false,"sourceSchemaChangesAllowed" : true 

Then we were able to update the source schema and republish the survey with new fields. 

Life saver! 

mikaël
Frequent Contributor

This thread has helped me a lot in the past and was successfully able to modify the "sourceSchemaChangesAllowed" and "hasStaticData" properties multiple times to change schema definition on my feature service. Today, for some reason, "hasStaticData" is not going back to True even though I've changed this property for all the views, as I've done multiple times before.

Has this happened to anybody?

I'm wondering if this is causing me some problem that I encountered. What is "hasStaticData" anyway?

Thanks!

0 Kudos
JosephHilliard94
Regular Contributor

I have been having this problem too. Doesn't seem to want to change the hasStaticData to True on the layer level. You have to go through the views and the layers/tables first but again, still isn't changing to True for me either.

JosephHilliard94
Regular Contributor

Thinking about this, Static Data won't go back to True if you have editing capabilities on that layer enabled. 

JosephHilliard94
Regular Contributor

This process worked best for me:

Source - Disable Settings (Editing/Sync)
View - Static to True and Source Changes to True
Source - Unlocked. Make changes to Source.
Source - Re-enable Settings (Editing/Sync)
View - Static to False and Sources Changes to False
Source - Locked - Source Changes now False