- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 07:29 AM
Hello
i want to populate the sctask data on email notification body
TASK number :
closed date :
work note:
and i have one variable is list collector if user select something some value i need to put that value on notification body:
please refer above snap short based user selection need to populate on email body.
please help me on this requirement
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 11:50 AM
Hi @kotab
Add Content in Email Body: Use ServiceNow email scripting (${} placeholders) to pull task details dynamically.
<b>Task Number:</b> ${number} <br>
<b>Closed Date:</b> ${closed_at} <br>
<b>Work Notes:</b> ${activity.work_notes} <br><br>
<%
// Fetch the list collector variable value
var lcVar = current.variables.list_collector_variable_name;
if (lcVar) {
%>
<b>Selected Values:</b> ${current.variables.list_collector_variable_name} <br>
<% } %>
Exolanation:
${number} → Populates SCTASK number.
${closed_at} → Displays the closed date.
${activity.work_notes} → Shows the latest work notes.
current.variables.list_collector_variable_name → Retrieves the selected values from the list collector.
Mark helpful if this helps you
Regards,
Pratik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 11:50 AM
Hi @kotab
Add Content in Email Body: Use ServiceNow email scripting (${} placeholders) to pull task details dynamically.
<b>Task Number:</b> ${number} <br>
<b>Closed Date:</b> ${closed_at} <br>
<b>Work Notes:</b> ${activity.work_notes} <br><br>
<%
// Fetch the list collector variable value
var lcVar = current.variables.list_collector_variable_name;
if (lcVar) {
%>
<b>Selected Values:</b> ${current.variables.list_collector_variable_name} <br>
<% } %>
Exolanation:
${number} → Populates SCTASK number.
${closed_at} → Displays the closed date.
${activity.work_notes} → Shows the latest work notes.
current.variables.list_collector_variable_name → Retrieves the selected values from the list collector.
Mark helpful if this helps you
Regards,
Pratik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2025 09:59 PM
very helpful pratik...keep helping the community.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2025 03:42 AM
Hello pratik
every thing populated expect work note
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2025 12:40 AM
What table is the notification on? You can just add ${number} and it will show you the number.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark