Morning Everyone,
Is it possible to set the "allow null values" from true to false after the service is pubished? I went into the geojson and tried to update there but no dice. There is also no option to edit this function in AGO. Do I need to republish?
Thanks
republish
Modify field properties—Geodatabases | ArcGIS Desktop
You can't even change a fc field after data are added to it
Here is a possible workaround to that:
FYI: Currently you can change the followings field properties after it is published:
- Domain
- Alias
- Visibility
The way to change this properties through layer update definition API. /rest/admin/.../FeatureServer/<layerId>/updateDefinition
{
"fields" : [
{
"name" : "myField",
"alias" : <myalias>,
"domain" : "...",
"visible" : <true/false>
}
]
}
We are currently working on allowing updating other properties including nullable, editable in the next release or so. Will be update you shortly if we can make it in March release of online.
Until we support this. You can always create an empty service and add a new empty layer with the new definition you need. You can then use the layer Append API to append the existing data you have (you would need to export the existing data to a filegdb or any other other format).
Khaled