How can we show list collector variable values in notification

akash kaj
Tera Contributor

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 .

4 REPLIES 4

Sagar Pagar
Tera Patron

Hi, Yes you can add & show the list collector variables values in notifications.

Thanks,
Sagar Pagar

The world works with ServiceNow

Mahendra RC
Mega Sage

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

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Did you try to use this in email body?

${variables.variableName}

Where are you stuck?

regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@akash kaj 

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

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader