
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2025 01:50 AM
Hi,
Can anyone advise if there is a way to do this please.
We have a list field on a form, and we want to send a notification to the users in the list when someone new is added. However, we only want to send the notification to the original users in the list, and exclude the new user.
I have created a Before Update BR below which triggers the notification, but it sends it to the new user as well.
Is there a way we can exclude the new user from receiving the notification?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2025 02:52 AM
Hi @Cirrus , try this -
var pre = previous.watch_list;
var cur = current.watch_list;
var preArr = pre.split(',');
var currArr = cur.split(',');
var difference = new global.ArrayUtil().diff(currArr , preArr);
gs.eventQueue('test.notify',current,difference.toString());
This way, even if someone is removed from the list, a notification will not be sent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2025 02:52 AM
Hi @Cirrus , try this -
var pre = previous.watch_list;
var cur = current.watch_list;
var preArr = pre.split(',');
var currArr = cur.split(',');
var difference = new global.ArrayUtil().diff(currArr , preArr);
gs.eventQueue('test.notify',current,difference.toString());
This way, even if someone is removed from the list, a notification will not be sent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2025 02:21 AM
Hello @Cirrus , You can make use of previous instead of current to send notification to older list. for e.g.
var getListusers = previous.collaborators.toString();
Regards,
Nishant

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2025 02:44 AM
Thanks Nishant. Previous works. Is there a way to reverse this to only get the new user from the list?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2025 02:54 AM
You can put new (current) and previous in 2 arrays and find the difference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2025 02:56 AM
Hello @Cirrus, Glad to hear that previous solved the older list issue. for the new user, you will have to compare previous and current and then take out the remainder. If you find it difficult to do, please let me know, I'll help you with the script part of the same
Regards,
Nishant