Flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2024 09:35 PM
Hi Team ,
Need a help in flow designer ,
We have group ' xyztechub ' in that group total 20 memeber , are there .
we are triggering a notification through flow , we want to exclude some 10 peoples in that group . can any one please provide me the script for this flow .
NOTE - client said don't create new group . same group should be there .
please provide script and please provide screenshots for better understanding,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2024 10:12 PM
Hi @nameisnani,
please try below script:
(function execute(inputs, outputs) {
var excludeUsers = [
'sys_id_1', 'sys_id_2', 'sys_id_3',
// Add all sys_ids of users to exclude
];
var groupMembers = [];
var groupGR = new GlideRecord('sys_user_grmember');
groupGR.addQuery('group.name', 'xyztechub');
groupGR.query();
while (groupGR.next()) {
if (excludeUsers.indexOf(groupGR.user.sys_id.toString()) === -1) {
groupMembers.push(groupGR.user.sys_id.toString());
}
}
outputs.filteredMembers = groupMembers.join(',');
})(inputs, outputs);
Thank you, please make helpful if you accept the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2024 10:27 PM