- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 02:29 PM
Hi, I have a multi-line text variable that is called on in a notification. When the email notification goes out, all the entries in the variable run on continuous line even if they are spaced in the variable.
This is what the email recipient currently receives:
Hello Brad,
A request was submitted for you to be able to access the queue:
dfjdj dcghjehj dfhsg
This can also be found in the network folder located at [copy/paste this network folder path into the file explorer window address bar]: fgkhfjk fhkfuk fgkdhg
This is what i would like the email recipient to receive:
Hello Brad,
A request was submitted for you to be able to access the queue:
dfjdj
dcghjehj
dfhsg
This can also be found in the network folder located at [copy/paste this network folder path into the file explorer window address bar]:
fgkhfjk
fhkfuk
fgkdhg
Thank you for looking any help would be appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 03:55 PM
Hi @Bradley Bush ,
Can you give this option a try and let me know how it goes.
1. Create a mail script to handle the multiline text
2. Check the below option
3. Use in the notification.
Please mark helpful or correct if it worked out fine.
Johnny
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 03:55 PM
Hi @Bradley Bush ,
Can you give this option a try and let me know how it goes.
1. Create a mail script to handle the multiline text
2. Check the below option
3. Use in the notification.
Please mark helpful or correct if it worked out fine.
Johnny
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2025 10:11 AM
Hi Johnny, i added the script and changed the script call name in the notification to what was in the picture. I get "undefined" even if i change the
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2025 02:50 PM
@Bradley Bush can you share the screenshots of all the code that you have written
Johnny
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2025 03:35 PM
Hi Jonny, i also have the box "Newlines to HTML" checked. I did find once i changed the word "description" to the variable name it displayed how i wanted it to. Will each variable need this script or can it be made universal, (i'm not that good at coding)?
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
// Check if the current.variables.description exists before attempting to print it
if (current.variables.right_test) {
template.print(current.variables.right_test);
} else {
template.print("No description available.");
}
})(current, template, email, email_action, event);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2025 03:39 PM
@Bradley Bush I'm glad it worked, for other variables, are those all multi-line texts?
Can you share your notification? you dont have to create mailscripts for each variable, you should be able to use current.variables.<your_variable_name> to access those.
Please mark it as helpful or correct if it helped you resolve the issue or worked for you.
Johnny
Please mark this response as correct or helpful if it assisted you with your question.