- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2021 02:35 AM
Good Morning, We are trying to find a Rest API that will link the "sc_task" or the "sc_req_item" tables to the variables and the answers to these so we can create a report in PowerBI. I believe the table is "sc_item_option_mtom" but I am unable to find a way to link this to the correct table to link all things together. We need to pull out 1 particular field in the variables list and link to the request so we have all details.
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2021 12:38 AM
Morning,
This didnt work as expected and I kept getting a failure but I found this website "https://snprotips.com/blog/2016/7/15/scripted-rest-apis-in-servicenow-how-to-retrieve-catalog-item-variables" from a few years ago and following this process end to end working. Thanks for your help and pointing me in the right direction
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2021 02:51 AM
Hi Alex,
Currently, We don't have one direct link to get all these details because variable editor information stores in different tables.
Variables information stores in the sc_item_option_mtom and answers information stores in "sc_item_option"
Hence, the easiest way is to create your own scripted REST API, and in the script create a glide record on the sc_item_option_mtom table and create the output response as per your requirement.
Notes: From sc_item_option_mtom you can get the answers by dot walking through the dependent item (sc_item_option) field.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2021 03:14 AM
Hi Alex,
In OOB API you have to mention the variable names you want. You can follow the below steps:
1) Goto Rest API Explorer
2) In table name select sc_task
3) In sysparm_fields enter the coma separated list of fields you want. For variables prefix with variable. eg(number,short_description,variables.variable1,variables.variable2,variables.variable3)
Note: You can type the value in sysparm_fields. If you use pencil icon, you will not find option to choose variable
4) Send request
5) You will see the URL with parameters in Request section. You can use this in Power BI
Thank you,
Palani
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2022 08:21 AM
Thanks, this really helped me out today 🙂