Is it possible to pass more than 3 param from eventqueue to Notification?

KS18
Giga Guru

I want to use multiple variables using eventqueue in Notification.
I know that eventparam1,2 can be used.
Is it possible to pass more than 3 param from eventqueue to Notification?

1 ACCEPTED SOLUTION

Harish KM
Kilo Patron
Kilo Patron

Check this thread.

https://community.servicenow.com/community?id=community_question&sys_id=7fee045e1bd9381017d162c4bd4bcbe2

Regards
Harish

View solution in original post

2 REPLIES 2

Harish KM
Kilo Patron
Kilo Patron

Check this thread.

https://community.servicenow.com/community?id=community_question&sys_id=7fee045e1bd9381017d162c4bd4bcbe2

Regards
Harish

Community Alums
Not applicable

Hi KS,

Pass your parameters in a JSON object and then refer to them in an email script.

Add value/pairs to variable in a JSON object.

var myParameters = {"first_name": "John","last_name": "Doe","address": "1 Abbey Road, London"};

Refer to object in Email Script:

//extract details from JSON object
var firstName = event.parm1.first_name.toString();
var lastName = event.parm1.last_name.toString();
var address = event.parm1.address.toString();

//print results
template.print(firstName);
template.print(lastName);
template.print(address);

 

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep