how to call ritm variables in email notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2024 12:12 AM
Hi All,
I am having a requirement to call variables details in notification when we are sending it to requester.
Please let me know how I can call the variables in notification.
Sample:
Hi <requested for>
Based on selection, these are the below details that are selected:
<calculated list>
Regards,
Support Team
The variables are :
1.is_monitor_required?
2.is_keyboard_required?
3.is_mouse_required?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2024 12:29 AM
Hi,
You can write the Email Script to fetch the variables from RITM and same Email Script you can call from notification.
Thanks,
Dhananjay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2024 01:32 AM
Could you please help me here how I can fetch variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2024 02:36 AM
HI @Renu9 ,
Create a notification script and include it in your email, here is a notification script i created a while back to include all non empty variables form a ritm in an email
(function runMailScript(current, template, email, email_action, event) {
template.print('Variables: <br/>');
var variables = current.variables.getElements();
for (var i = 0; i < variables.length; i++) {
var question = variables[i].getQuestion();
var label = question.getLabel();
var value = question.getDisplayValue();
if (value != '') {
template.space(4);
template.print(' ' + label + " = " + value + "<br/>");
}
}
})(current, template, email, email_action, event);
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2024 02:52 AM
Hi @Sohail Khilji ,
Thanks, but I don't want all the variables in the RITM to be displayed.
I only want 5 from 10 variables. How can I get display them.