- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2022 03:27 AM
Hi All,
I am trying to read the variable values from a requested item using REST API. I queried the table "sc_item_option_mtom" with the below context.
sc_item_option_mtom.request_item=<<sys_Id of the corresponding RITM>>
The output response from postman looked something like below:
{
"result": [
{},
{},
{},
{},
{}
]
}
What does this response mean? What is the mistake that am making here? I would like to capture the values of the custom variables in a request item.
Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2022 12:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2022 03:46 AM
Please update "sysparm_display_value" to true in REST API Explorer.
Note: Table level API is ok if you are planning to use this API for only one catalog item with limited fields/variables to retreive.
If you configure a scripted rest API, you can leverage it for all request items which is a more stable and configurable solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2022 11:37 PM
Hi Swapna,
Attaching the snapshot of variables below:
Any help would be appreciated.
Thanks,
Akshaya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2022 12:01 AM
Hope you are using name of the variable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2022 01:26 AM
Hi Swapna,
Thanks for your guidance! This did work! Thank you so much.
One last question. One of the variables as shown below, is a list input field.
variables.compound only fetches the sys_id of the chosen values whereas couldn't retrieve the actual name of the selected values. Could you please provide your inputs here?
(Had to hide the values partially due to confidential reasons.)
Regards,
Akshaya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2022 03:46 AM
Please update "sysparm_display_value" to true in REST API Explorer.
Note: Table level API is ok if you are planning to use this API for only one catalog item with limited fields/variables to retreive.
If you configure a scripted rest API, you can leverage it for all request items which is a more stable and configurable solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2022 04:41 AM
Yes this worked too! Thanks a lot again!
I am a beginner with Snow APIs and your support was really helpful.
And about the table/scripted API, at the moment we are just looking for a single item retrieval by using the RITM sys_id. Thank you for the suggestion. I will keep in mind for future requests.
Regards,
Akshaya