Script to check if user is part of existing group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 09:17 PM
Hi Team,
I have a requirement where I have 2 fields existing groups and add new group. In existing group I'm populating the groups which are already mapped to user. Whereas in the field Add New I need to populate the groups which are not mapped for the user and he should select only those groups.
Note both are of list collector variable types. Below is the script
Script Include :-

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 09:54 PM - edited 02-21-2024 09:54 PM
In the advanced reference qualifier, you can just write :
javascript: "sys_idNOTIN"+current.variables.existing_group;//validate the field name for existing group field
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 10:06 PM - edited 02-21-2024 10:06 PM
Hi Aman,
I have added condition javascript: "sys_idNOTIN"+current.variables.groups; (groups is the name of the variable) but its not working.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 10:10 PM
There is a space between NOT and IN
something like
"sys_idNOT IN"+current.variables.groups;
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 10:17 PM
Updated but still the same issue

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 10:33 PM
Can you share the screenshot of the changes that you made
Aman Kumar