I followed the directions here:
Updating Hosted Feature Services in ArcGIS Online | ArcGIS Blog
to update a hosted feature service in AGOL.
But, I came across this error:
Invalid definition for 'LastEditDate'. Invalid definition for ESRI.ArcGIS.SDS.Metadata.EditingInfo
So, I found this article describing a workaround:
Error: Unable to update feature service layer definition. Invalid definition for 'lastEditDate'
I did what was described in the article:
But, the feature service did not update. It reverted back to the last state.
Has anyone come across this issue? Is there an actual workaround or am I just stuck with what I have?
thanks.
Solved! Go to Solution.
Just bouncing back to this a little bit, I found a similar thread of a similar problem from a year ago:
Updates in JSON feature service edit not taking
There is a bug in the system that maybe addresses this:
BUG-000102784: Unable to change a field editable value by updating ..
I wanted to touch base on this bug again. The 'Update Service Definition' is still not working properly. Some days/weeks it seems to accept changes, and then others it does not. When it does not accept changes one of the following happens: it refuses to accept changes to the date field (i.e. "lastEditDate" : "") or it "accepts" changes but they do not stick when the window is refreshed or when the Service Definition page is accessed again later. I have noticed this problem off and on for about the last two months (8-10/2018).
Pl. note the only value we support for lastEditDate is null. So you will need to be sure to have something like (i.e. "lastEditDate" : null).
Also you can specify "sourceSchemaChangesAllowed" : false/true only for views. If you are specifying "sourceSchemaChangesAllowed" : true for non view feature service, you will get an error.
I am trying to update a template name to say something different. And I receive the same error message. All instances of sourceSchemaChangesAllowed are already true and this is not a view feature service. Can you please advise whether this is a bug and workarounds? It is a very simple operation and I'm struggling to understand why it is not supported.
Invalid definition for 'SourceSchemaChangesAllowed'.
Invalid definition for System.Boolean
I had this same error, where changes made to 'updateDefinition' did not work. However, they work now! To make these work, do the following:
1) Make sure you change the "lastEditDate" to null.
2) Make sure you go into the feature service layer. There is a 'updateDefinition' operation for the feature service. But, as far as I am aware, this does NOTHING. Make sure you make changes from within the feature service layer and not the feature service!
Thanks Nathan. How are you applying your operation? In the Python API? I was using the update definition tool in the Admin page of the service directory for the entire FeatureServer.
For some reason, updateDefinition did not show for me when using the python API. It wasn't even a recognized capability when I printed a list of capabilities for that feature service. Though, this could be due to user error.
What I did was directly from within the browser, using the admin rest page for the service. You can modify the raw data there. However, this seems to only work for hosted features on AGO & Portal. This does not work for server referenced features.