Updates in JSON feature service edit not taking

3571
6
Jump to solution
02-08-2017 04:19 PM
jameshickey
Occasional Contributor

I am trying to use the POST process to update the JSON for a feature service on ArcGIS Online. A detailed procedure on this process can be found here: https://blogs.esri.com/esri/arcgis/2014/10/19/updating-hosted-feature-services-in-arcgis-online/#com... 

I am trying to change the field editable to true in the following JSON.

{
 "name" : "FACILITYID", 
 "type" : "esriFieldTypeString", 
 "alias" : "Facility Identifier", 
 "sqlType" : "sqlTypeOther", 
 "length" : 20, 
 "nullable" : true, 
 "editable" : false, <--- CHANGE TO true
 "domain" : null, 
 "defaultValue" : null
 },

Everything seems to run okay. I don't get any response only a blank page with the name of the layerresponse from service update
The change does not stick in the feature service howerver. 
Any ideas?

Published with ArcMAP 10.4.1  and Windows 7.

Thank you,

James

0 Kudos
1 Solution

Accepted Solutions
jameshickey
Occasional Contributor

Updating to let people know there is now a BUG logged with ESRI and it is currently under review.

BUG-000102784
Cannot change field editable value by updating service definition from REST end point

Current workaround is to edit field properties in ArcMAP and republish.

View solution in original post

6 Replies
jameshickey
Occasional Contributor

Updating to let people know there is now a BUG logged with ESRI and it is currently under review.

BUG-000102784
Cannot change field editable value by updating service definition from REST end point

Current workaround is to edit field properties in ArcMAP and republish.

deleted-user-LNABNwA5CZcD
New Contributor III

I'm pretty much hitting the same issue, just with trying to edit the "nullable" field from false to true. Was this never fixed?

by Anonymous User
Not applicable

Has this issue been addressed? 

0 Kudos
KhaledHassen
Esri Contributor

Currently you can only change the field visibility, domain and field alias. All other field properties cannot be changed once you publish the layer. We will add support to set field editable property. But we will not be able to support making a field NOT Nullable or Nullable since this operation relies on the data and affect the data store schema. You can work around this by creating a new field with the property you want, then use layer Calculate API to copy the data.

by Anonymous User
Not applicable

Wow so if we need to make a field Not nullable we have to republish and repoint all our features.....awesome. Just a note onto what you said: you can change the names in the domains, but not the order. 

0 Kudos
AdrianWelsh
MVP Honored Contributor

It looks like blog posts are no longer redirecting like they used to. The newest link for the blog mentioned in this thread is:

Updating Hosted Feature Services in ArcGIS Online 

It references this article:

https://www.esri.com/arcgis-blog/wp-content/uploads/2014/10/How-to-Update-Hosted-Feature-Service-Sch... 

Here is the link for the bug:

BUG-000102784: Unable to change a field editable value by updating .. 

It has no listed workaround.

0 Kudos