- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2025 04:39 AM
There is a catalog item.
It contains two reference field where we can choose users.
Second reference field only appears after filling the first reference field with a user.
The requirement: the user selected in the first reference should not appear in the second reference field.
So, I have tried adding a reference qualifier for the second reference field variable for that catalog item.
..........^sys_id!=javascript:current.variables.var_second_variable^EQ
the reference qualifier ends like this.
I have tried this in simple and advanced.
In simple
I have added a AND condition and choose
Sys_id is not javascript:current.variables.var_second_variable
However, this is not working.
How else should I have written this reference qualifier to exclude the user available in the first reference field?
Note: the second reference field have more reference qualifiers to exclude certain location users
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2025 05:02 AM
Hi @Kvb Kiran ,
javascript:'active=true^nameISNOTEMPTY^u_user_type!=Customer^ORu_user_typeISEMPTY^location.countryLIKENetherlands^sys_id!='+current.variables.your_variable_name
note it's ":" not ":";
and replace your_variable_name with your actual variable backend name
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2025 05:37 AM
try forming the encoded query on sys_user and then copy that and use in your advanced ref qualifier.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2025 08:41 AM
Thank you
Solution provided by Chaitanya worked well.
However, I will also try this way.
Did you mean, navigating to the sys_user table and user filter, then copy the query?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2025 05:36 AM
Never mind. It worked.
Thanks a lot for your quick responses.
I have missed to remove the '^EQ' at the end.
After removing, the complete script started to work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2025 05:11 AM
try below:
javascript:'sys_id!='+current.variables.your_variable_name+'^active=true^nameISNOTEMPTY^u_user_type!=Customer^ORu_user_typeISEMPTY^location.countryLIKENetherlands'
Raghav
MVP 2023