How can we show list collector variable values in notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-22-2022 07:21 AM
I have a record producer and the record producer is having a variable of type List collector. How can we show the list collector value in notification .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-22-2022 07:37 AM
Hi, Yes you can add & show the list collector variables values in notifications.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-22-2022 08:00 AM
Hello Akash,
If you want to show the values for the list collector variable in your notification then you can create the email script and in email script you can use the below code:
you can call the email script in your notification using ${mail_script:<name of your email script>}
For eg. if email script name is getVariableValues then use ${mail_script:getVariableValues}
template.print("List Collector Values : " + current.variables.your_list_collector_variable_name);
If you want to show the Display values for the list collector variable in your notification then you can create the email script and in email script you can use the below code:
template.print("List Collector Values : " + current.variables.your_list_collector_variable_name.getDisplayValue());
If my answer helped you in any way then please do mark it as helpful. If it answered your question then please mark it correct and helpful.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-22-2022 08:01 AM
Hi,
Did you try to use this in email body?
${variables.variableName}
Where are you stuck?
regards
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-22-2022 09:55 AM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader