how to set choice values ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2017 05:04 AM
explorenow Developer Community
i am having choice field as yes/no how to set it
current.u_is_rolledback='Yes';
i have done this but not taking the value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2017 05:08 AM
Hi ,
You can use current.setValue('u_is_rolledback','Yes');
Thanks,
Mark correct if it solves your issue

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2017 05:12 AM
Where are you setting this? A business rule? A UI Action? Can you include all of the code?
Also verify the VALUEs of the choice list (not to be confused with the LABELs) by right clicking on the field label and choosing Show Choice List. You will get a list of what those values are. That's what you want to use in the script. It might be (and I say this without looking at your system) that you need something like:
current.u_is_rolledback = 'yes'; // not 'Yes'
or
current.u_rolledback = 'false';
or
current.u_rolledback = '1'; //who knows... you'll have to look
http://wiki.servicenow.com/index.php?title=Customizing_Choice_Lists
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2017 09:12 AM
i am using it in ui action

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2017 07:05 AM
Sorry if I was unclear.
Please paste a screenshot of what you get when you se the "Show Choice List" option on that form's field. That will tell me what the actual value is on that field that needs to be used in the UI action.