
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2024 10:37 AM
We need to be able to get the variables of a catalog item based on tasks that are assigned to a specific group. I tried use the table api on the sc_task table and sc_req_item table hoping it would pull the variables but it did not. Is there a way for an external system to get the variables based on sc_task without having to make multiple calls to different tables?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2024 11:04 AM
I understand that you need to pull catalog item variable data based on task.
I found one thread, and I believe this can resolve your issue.
Please mark this as helpful.
Thanks
Akshay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2024 10:44 AM
Extract Variables from Request Item:
var variablesGr = new GlideRecord('sc_item_option');
variablesGr.addQuery('request_item', reqItemId);
variablesGr.query();
while (variablesGr.next()) {
// Process each variable, variable name and value
var variableName = variablesGr.variable.name;
var variableValue = variablesGr.value;
// Store or process the variable data accordingly
}
then aggregate the variable data retrieved from each sc_req_item per your External System's requirements.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2024 11:04 AM
I understand that you need to pull catalog item variable data based on task.
I found one thread, and I believe this can resolve your issue.
Please mark this as helpful.
Thanks
Akshay