- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2018 06:25 AM
Hi all,
I have a requirement where in I have a field type 'List' for 'Approvers' which I need to filter based on users of current company and active users. The company part worked for me i.e. javascript: 'company=' + current.company' but how can I include an 'AND' condition in the same script to filter active users. Please find below the screenshot of the same.
Thanks,
Neha
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2018 06:40 AM
You would do something like this:
javascript:'company='+current.company+'^active=true'
The whole point of the reference qualifier is to return an encoded query to the system. ^ is the default separate for "and". If you want to get a sample, go to a list of records and build the filter you want, then right click on the blue breadcrumbs at the top and select Copy Query to see what you've built using the condition builder.
Reference: Docs: Encoded Query Strings

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2018 06:40 AM
You would do something like this:
javascript:'company='+current.company+'^active=true'
The whole point of the reference qualifier is to return an encoded query to the system. ^ is the default separate for "and". If you want to get a sample, go to a list of records and build the filter you want, then right click on the blue breadcrumbs at the top and select Copy Query to see what you've built using the condition builder.
Reference: Docs: Encoded Query Strings
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2020 07:47 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2020 05:57 AM
When dealing with dynamic data like "not current company", you are going to need to use script to build an advanced reference qualifier. Please note that I am working with the docs team to fix this page. it should NOT use a global business rule, but rather a script include.
Create an advanced reference qualifier | ServiceNow Docs
The function must return an encoded query string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2020 07:31 AM
it helped me a lot