Select to view content in your preferred language

Can't set integer to null with Feature Service REST update

3779
12
09-07-2012 07:18 AM
by Anonymous User
Not applicable
Original User: oppedahl

I have a feature class published to a Feature Service with one of its attributes a nullable integer with no default value defined. I'm trying to edit the attribute with the REST API's Update operation. It works if I set it to a number, but saving null doesn't work. There's no error--the call goes through fine--but the value remains unchanged. Is it not allowed to set a numeric field to null once it's been set to something else? I can set it to null just fine in ArcMap. Here's a snippet of the JSON I'm sending to the update:

[
{
   "attributes": {
    "OBJECTID_1": 1234,
    "AnInt": null,
   }
  }
]
0 Kudos
12 Replies
by Anonymous User
Not applicable
Original User: oppedahl

This has been confirmed as a bug by ESRI: #NIM085862 Using REST to setting a feature service feature value to null returns success message but does not modify value.
0 Kudos
KevinGooss
Occasional Contributor
Ugh. Not good news. I wonder if they stuck the fix in the next sp. which is supposed to be released in October although we only have one week left.
0 Kudos
DaleGeo24
New Contributor

Massive stretch here given the time passed... Has anyone seen this issue reappear since? We're seeing the exact same thing in our application currently in development, but can't be certain when it started occurring.

0 Kudos