
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2018 05:25 AM
Hi All,
I'm looking to give users a view of their past request of a particular item by creating a simple list on the portal and filtering by the item. The issue I'm running into is that there is no way to pull the variables from the RITM. Has anyone done this already? I'd imagine it's a pretty common ask out there?
I appreciate any help you all can provide!!!
Solved! Go to Solution.
- Labels:
-
Service Catalog
-
Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2018 05:33 AM
Hi Glenn,
The first thing to note is that you will need a customer widget to do this. It's not available OOB because every RITM has different variables so there's no easy way to display them in a list.
If you choose to write a custom widget, you'll need to "load up" the data object for each record with the variables in the server script. Pretty straight forward when it comes to getting variables and values.
You can use this code in a mail script to print variables. This one assumes the message is on the sysapproval_approver table and gets the variables from the record pointed to by the sysapproval table. Below is a code snippet I use to get variable values for an approval record in to an email template. You can adjust the bold lines to your needs in the widget.
printVars();
function printVars(){
var set = new GlideappVariablePoolQuestionSet();
set.setRequestID(current.getValue('sysapproval'));
set.load();
var vs = set.getFlatQuestions();
for (var i=0; i < vs.size(); i++) {
if(vs.get(i).getLabel() != '') {
template.print(' ' + vs.get(i).getLabel() + " = " + vs.get(i).getDisplayValue() + "\n");
}
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2018 05:56 AM
Hi,
So if i understood you correctly,
They want to see RITM's for particular catalog item which wer opened previously including Price and Vendors value.
And this should be just a table?
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2018 06:04 AM
Doesn't have to be a table just a way to view that data.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2018 08:35 AM
You can any variable in RITM list view. Here are steps you need:
1)Create a new view for RITM table and save it
2)Navigate to sys_ui_list_list.do and open a record for the view you have created
3)In the List Elements related list created a new record and set Element field to something like variables.fdd0eccc4fae62001fa791311310c7c7 (valiables.sys_id_of_the_variable in item_option_new table)
You can test the same approach with using variables.fdd0eccc4fae62001fa791311310c7c7 as a column name for Simple list

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2018 04:36 AM
Thanks for the reply. I ended up taking the simple list widget and configuring it to display my variables.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2019 09:00 AM
Hello, can you share the solution/code for this approach, please. I am needing the same exact requirement. Thanks.