- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2025 01:48 AM
Hi All,
Having a requirement that,
On catalog form we have a fields like
> Select the dl - (reference to DL table where we have owner, member)
> Select user to add owner - reference to user table
here in the select user filed want to add a reference qualifer that validate the users data and show only the user who are not as owners of the selected Dl.
Stucked here on proceeding further to how to keep this validation. Any suggestions.
Thanks inadvance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2025 02:54 AM
Hi @Community Alums
You can acheive this by using "sys_idNOT IN" operator in the ref qualifier.
1. Create one varibale to store the sys ids of the current owners (Hidden variable)
2. Create new variable and in the ref qualifier add the below script.
javascript:"active=true^sys_idNOT IN"+current.variables.approvers_sys_id;
Sample:
1. Catalog variables
2.
3. Output:
Hope this helps.
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2025 03:42 AM
Hi Anukar,
Thanks for the response.
DL means - Distribution list table. Here we are storing all the DL data with the name, owner and members
tried the suggested reference qualifier as below
javascript: 'sys_idNOT IN' + current.variables.distribution_list_s.u_managedby;
> distribution_list_s - variable name
>u_managedby - name of the filed refers to owner from the table.
> This owner field is a glide list type field
its not working. Any further validation need to check.
Thanks inadvance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2025 03:52 AM - edited 03-26-2025 04:18 AM
Hi @Community Alums
Create one hidden field to store the sys ids. Then use that field value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2025 03:55 AM
Hi @Community Alums ,
You can create one string variable (u_owner_list) which you can hide in that string variable you can store the sys_id of u_managedby by using dependent variable (distribution_list_s) and dot walk to store owner.
And now in the the select user refence field add this reference qualifier.
javascript:"active=true^sys_idNOT IN"+current.variables.u_owner_list;
If my response helped, please hit the Thumb Icon and accept the solution so that it benefits future readers.
Regards,
Rohit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2025 04:11 AM
@Community Alums
try with following reference Qual.
javascript: 'sys_idNOT IN' + (current.variables.distribution_list_s.u_managedby ?
current.variables.distribution_list_s.u_managedby.join(',') : '');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2025 04:11 AM
@Community Alums
then try this if u_managedby is glide list
javascript: 'sys_idNOT IN' + current.variables.distribution_list_s.u_managedby.toString();
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader