- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 09:13 AM
using a mail script to call a variable which is not appearing:
anything wrong with this script:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 09:29 AM - edited 12-27-2023 09:30 AM
@Joshua Comeau : That's correct. As you are printing only the variable value its displays only value.
template.print('YOUR VARIABLE QUESTION: ' + current.variables.your_variable_name);
Using this statement it prints the question followed by the value of it. If you are looking for all variables to be printed on the notification refer the below article where I answered similar question.
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 09:18 AM
Hello @Joshua Comeau ,
Please find the below link
For this you need to glide record and print the variable name ib notification.
Please let me know if this helps.
Thank you,
Omkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 09:25 AM
can you provide script example?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 09:28 AM
Please find the below script:
var reqitem = new GlideRecord('sc_req_item'); reqitem.addQuery("sys_id", current.request_item); reqitem.query(); if(reqitem.next()) { template.print("Hello3"); // add here logic to check variable value is true then only print }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 09:21 AM
@Joshua Comeau : While printing the variable value, use current.variables.your_field_name in your template statement (in line 8 as per the screenshot) and give a try.
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.