Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Passing through Catalog variable in workflow event param 1 to populate the who gets a notification

wiganmichae
Tera Contributor

Hi,

I have a catalog item that has 2 variables I would like to pass through the workflow with 2 different events and populate who get the notification.

The first variable they select a support group (assignment group) and want that groups manager passed through for the email notification.

The second is a lookup list of sys_user and I just want that list of selected users passed through the notification.

I've tried version of the script below in Event parameter with no success.

(function() {
answer = [];

answer.push(current.variables.platform_support_group.manager);
	return "";
}());

 

(function() {
answer = [];

answer = current.variables.individual_notificaitons.toString().split(',');
	return "";
}());



1 REPLY 1

Tanushree Maiti
Giga Sage

Hi @wiganmichae 

 

Hope this scripts from workflow ,

comment this line and try

// return "";

 

And do some null checking like 

 

(function() {
answer = [];
if(current.variables.platform_support_group.manager){
answer.push(current.variables.platform_support_group.manager);
}

}());
Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: