- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2015 02:34 AM
Hi, all,
I'd like to set the value of a user(sys_user) field, which is defined using a dropdown list of choices with "-- None --". Now I can find out the value of all the choices in the list and set the field to them using their value, except I can't find the value for "-- None --". By pulling user data and read the value in filter query, I can see the value of --None-- is in fact "" or a NULL, but I've tried setting the field with value as "","null","NULL","none" with both "Update" amd "Patch" method, but nothing works.
If i change the display value of --None-- by setting the label to something and value of option to NULL_OVERRIDE, I can update the field to new option by setting the attribute value as"NULL_OVERRIDE". So I think this also imply the -- None-- value is NULL, but I just can't set the value using "NULL".
So, does anyone how I could set a field to "-- None --" using REST API?
Thanks in advance.
Haotian
Solved! Go to Solution.
- Labels:
-
Integrations
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2015 07:08 AM
According to the FAQ #16 (https://hi.service-now.com/kb_view.do?sysparm_article=KB0534905), it seems not to be possible if the field is a choice field.
I wonder if you can work around the issue by using the Import Set API (http://wiki.servicenow.com/index.php?title=Import_Set_API#gsc.tab=0) or Scripted Web Services (http://wiki.servicenow.com/index.php?title=Scripted_Web_Services#gsc.tab=0) instead of the Table API. Then you may be able to create your own Transform Map rule to set the value back to null. (Haven't had time to try it yet)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2015 07:46 PM
HI,Zachary,
Thanks for the help. Really appreciated.
regards,
haotian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2015 07:44 PM
Hi,Deryck,
Thank you so much for the information. I'll look into the methods.
regards,
Haotian