- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2018 04:57 AM
Hi Team,
we have an email notification when an item is submitted, here we need to show variables visible on summary.
can any one suggest me how to show variables visible on summary using email script.
Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2018 05:09 AM
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.
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
‎01-11-2019 07:08 AM
A small revision to hide variables that are not set to "Visible on Summaries":
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).isVisibleSummary()) {
continue;
}
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
‎06-25-2018 06:18 AM
Hi ctomasi,
the above script is not pulling Macro variables on summary view, is there any reason for that?
Thanks,
Rajashekhar Mushke
Community Leader - 18
Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2018 08:10 PM
Hi Sir,
May I have your e-mail address? because I have some practices to hope you can help to check, thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2018 10:57 PM
Hey Supereric,
Good Day.!!!
Please connect me through LinkedIn:
Thanks,
Rajashekhar Mushke
Community Leader - 18
Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke