- 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 02:42 AM
Hi @Community Alums,
Hope you are doing well.
Proposed Solution
In order to show only those users in the 2nd Field who are not the owners or not in the DL Table (where you have the list of owners), you have to use the Reference Qualifier where you will call the Non-Client Callable Script Include which will contains the validation code that will filter out the records which are not required (means the records match with the records available in the DL Table) and the rest will get visible in the 2nd Field.
Let me know if you need a script for this.
If you find this information/knowledge/solution helpful, please don't forget to mark my solution and reply as Helpful and Accepted.
Thanks 🙂
Aakash Garg
ServiceNow Developer
- 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 02:56 AM
Hi @Community Alums
Can You share the screenshot of DL record where you have owner field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2025 03:14 AM
@Community Alums
what's the DL table? which field in it holds owner i.e. reference to sys_user?
something like this in advanced ref qualifier of Select User variable
javascript: 'sys_idNOT IN' + current.variables.dlVariableName.ownerField;
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