Unable to update feature service layer definition

13403
26
Jump to solution
03-13-2018 08:12 AM
AdrianWelsh
MVP Honored Contributor

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:

  1. Change the lastEditDate key value by replacing the string of numbers, which indicates the last edit date, to double quotation marks with no content quoted between them (“ “).

          Replace the lastEditDate key value

  1. Click Update Layer Definition to save the changes.

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.

26 Replies
AdrianWelsh
MVP Honored Contributor

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 .. 

SFM_WillBrewer
New Contributor III

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).

  • error for last edit date: 
KhaledHassen
Esri Contributor

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.

dns
by
New Contributor III

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

0 Kudos
NathanR
New Contributor II

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!

0 Kudos
dns
by
New Contributor III

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.

0 Kudos
NathanR
New Contributor II

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.

0 Kudos