- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2023 06:25 AM - edited 06-09-2023 06:39 AM
Hey all! We have a request from a team that is needing to run a REST API GET call on some data from RITMs. We are needing the display values of the answers on a given RITM.
So I've referred to sc_item_option_mtom table as I can easily dot walk to get sc_item_option.item_option_new (the question) and sc_item_option.value (the answer). However I noticed that if the answer is provided in a List Collector, the values seem to return as sys_id's instead of display values. Please see the below four screenshots.
The catalog item's variable set for the list collector questions we are trying to parse from.
The RITM's variables options answered (we can see the display value here)
Query pulling from sc_item_option_mtom table showing items that aren't in a list collector come back as a display value, though items in a list collector come back as sys_id's
The GET REST API call, showing sys_id for value and display value for question.
Any ideas on this? Am I dead in the water? Is there another way to get this list collector display value?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2023 06:56 AM
Hi @Jorogumo4
The list collector stores values in the form of sys_ids, that's why you are not getting the display value
An alternate approach would be to create a new variable on the request item and store display values of list collector sys_ids.
You can hide that new variable on form and it can used only for REST API GET call
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2023 06:56 AM
Hi @Jorogumo4
The list collector stores values in the form of sys_ids, that's why you are not getting the display value
An alternate approach would be to create a new variable on the request item and store display values of list collector sys_ids.
You can hide that new variable on form and it can used only for REST API GET call
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2023 07:22 AM - edited 06-09-2023 07:43 AM
Hi Jorogumo,
List collectors do only store the sys_id(s) separated by commas, and there isn't really away around that.
You have three avenues that you could consider:
- Run another Table API on the table that the sys_ids belong to, and get their display name that way.
- Create your own API that returns everything you need in one call. This requires more scripting, and comfortability with creating APIs.
- Store/find the data some other way.