- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2020 11:57 AM
I have a 'create event' activity in my workflow to trigger an email. That works fine. I need to get 4 variables from the catalog request down to the email notification. These 4 variables are reference fields pointing to users who need to be notified. I know I can pass 2 parameters so how do I pass 4 variables to the email notification triggered by the event?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2020 09:19 PM
Hi Jeff316,
I got it now actually you need to send the notification to the param1 values which is multiple here.
So here you don't need the object part you can simply write the following script in the event1 param field of the create event activity as:
(function() {
var arr= [];
arr.push(current.variables.owned_by);
arr.push(current.variables.managed_by);
arr.push(current.variables.primary_product_owner);
arr.push(current.variables.requested_for.requester_name);
return arr.toString();
}());
We are storing all the users in an array and returning that array to the event param1.
If it helps then please mark my answer Correct and Helpful.
Thanks,
CB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2020 12:14 PM
Hi Jeff316,
You can use use
(function() {
var obj = {};
obj.var1= current.varaiales.var1;
obj.var2= current.varaiales.var2;
obj.var3= current.varaiales.var3;
obj.var4 =current.varaiales.var4;
return JSON.stringify(obj);
}());
Please mark my answer correct or helpful if it works,
Thanks,
CB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2020 04:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2020 09:19 PM
Hi Jeff316,
I got it now actually you need to send the notification to the param1 values which is multiple here.
So here you don't need the object part you can simply write the following script in the event1 param field of the create event activity as:
(function() {
var arr= [];
arr.push(current.variables.owned_by);
arr.push(current.variables.managed_by);
arr.push(current.variables.primary_product_owner);
arr.push(current.variables.requested_for.requester_name);
return arr.toString();
}());
We are storing all the users in an array and returning that array to the event param1.
If it helps then please mark my answer Correct and Helpful.
Thanks,
CB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2020 06:23 AM
Thank you CB.
I appreciate the help.
I've learned something new thanks to you.
Have a nice week.