how to retrieve state options from sc_req_item table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2018 12:30 PM
I am trying to show the list of option that is available for the 'state' field options in the sc_req_item. The highlighted one
- Labels:
-
Integrations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2018 01:19 PM
Hello Sai,
Right click on state field and select configure dictionary.
then in field configuration form, at bottom related list, you will get choice. there usually you will get choice for other tables which extend task table. there you can select for the table sc_req_item.
Thanks,
Ali
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2018 02:52 PM
Hello Ali,
Thanks for the information. It was exactly what I was looking for. Is there anyway, I can get those choices using an API?
Regards,
Sai

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2018 11:18 PM
Hello Sai,
this can be done with table API. but in rest API explorer the table with name starting with sys_ are filtered out. so we need to build table API with referirng to other table API.
I did one below.
https://Instance_name.service-now.com/api/now/table/sys_choice?sysparm_query=name%3Dtask%5Eelement%3Dstate%5Elanguage%3Den%5Einactive%3Dfalse&sysparm_display_value=true&sysparm_exclude_reference_link=true&sysparm_fields=element%2Clabel%2Ctable%2Cvalue
OOTB no choice are defined for sc_req_item table. so it takes values from task table. so i gave table as task (in query above name%3Dtask%). if you have defined for sc_req_item then you can replace task with sc_req_item. else can use the same as above.
I tried it and will give response as below.
let me know for any query.
Thanks,
Ali
Thank you,
Ali