- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2022 10:35 AM
I have create a catelog item. it has a dropdown variable which contains the name of some groups.
in the workflow notification how can i send mail to the groups which user select in the variable.
I tried the above, but not working..
Please help me
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2022 10:56 AM
Hey
Hope you are using Approval - Group activity
Try below code:
var grp = current.variables.group;
var gr = new GlideRecord("sys_user_group");
gr.addQuery("name", grp);
gr.query();
if(gr.next()){
answer.push(gr.getUniqueValue());
}
Feel free to mark correct, If I answered your query.
Will be helpful for future visitors looking for similar questions 🙂
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2022 10:46 AM
Hi,
If there is only 1 group then you can use the below script.
var answer = [];
answer.push(current.variables.group.toString());
If there are multiple groups then you can utilize the below script.
var answer = [];
var arr = current.variables.group.toString().split(',');
for(var i=0; i<arr.length; i++){
answer.push(arr[i].toString());
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2022 10:50 AM
I tried the first script, not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2022 11:01 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2022 10:52 AM
Hi Beast,
This has some good answers you may have to modify things a little.
Send notification from workflow
Mark Correct or Helpful if it helps.
***Mark Correct or Helpful if it helps.***