sc_item_option_mtom table shows some values as sys_id instead of display value

Jorogumo4
Tera Expert

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.

maintain item variable set.PNG

 

The RITM's variables options answered (we can see the display value here)

sc_req_item values.PNG

 

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

sc_item_option_mtom result.PNG

 

The GET REST API call, showing sys_id for value and display value for question.

result.PNG

 

Any ideas on this? Am I dead in the water? Is there another way to get this list collector display value? 

1 ACCEPTED SOLUTION

Manmohan K
Tera Sage

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

View solution in original post

2 REPLIES 2

Manmohan K
Tera Sage

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

Prinssi
Mega Sage

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:

  1. Run another Table API on the table that the sys_ids belong to, and get their display name that way.
  2. Create your own API that returns everything you need in one call.  This requires more scripting, and comfortability with creating APIs.
  3. Store/find the data some other way.