please Explain how to create ACL with Query match and range and how to validate.

Ammy01
Giga Contributor


please Explain how to create ACL Query match and Query range ACL and how to validate.
with step by step process.

4 REPLIES 4

kalyanrajpu
Tera Contributor

Please reply... How to write query_range and query_match ACL .... steps 

 

palanikumar
Giga Sage
Giga Sage

Hi @Ammy01 ,

 

The below bloc gives you more details about query ACL. You can have a look and let me know if you need any other details

https://www.servicenow.com/community/developer-blog/query-acls/ba-p/3273676

 

Thank you,
Palani

Ammy01
Giga Contributor

HI @palanikumar ,
Thanks for responding.

I have already gone through that blog. it is good.
But i want steps to create ACL with query match and range.
Also steps for how we can validate.

Chaitanya ILCR
Mega Patron

Hi @Ammy01 ,

Creating a query match and query range is just like any other ACL

ChaitanyaILCR_0-1749731570423.png

 

ChaitanyaILCR_2-1749731601756.png

testing query match is 

let's say I have a query match on the description field

ChaitanyaILCR_3-1749731928090.png

use the operators highlighted on the field and run 

ChaitanyaILCR_0-1749734802280.png

 

 

for query range use other operators

 

  • query_match ACLs – A query_match rule governs exact or direct searches. This covers “safe” operators like equals (=), not equals, is empty, etc. Essentially, these are queries where a user is looking for a specific value or record. ServiceNow documentation explains that query_match ACLs allow specific, targeted lookups – for example, “Incident number = ABC123” or “State is not Closed” would fall under match queries. These are considered lower risk because they return a focused result (you’re only pulling up what you explicitly asked for).

  • query_range ACLs – A query_range rule governs broad or pattern-based searches. This applies to operators like greater than/less than comparisons, “starts with”, “ends with”, “contains”, and other queries that return a range or set of results. Such queries are more powerful – e.g. filtering all incidents opened this month, or searching all users with last name starting “Smith”. Because they can reveal sets of data, they’re considered higher risk. In our HR example, searching for all salaries in a range or all SSNs that start with a certain digit would be a “range” query. The new query_range ACL type lets admins explicitly control who (if anyone) can perform those kinds of searches on a given table/field. If a user isn’t authorized via ACL to run a range query on a field, that query will now be blocked.

source

 

https://www.ikconsulting.com/post/understanding-servicenow-s-may-2025-query-range-acl-update-what-you-need-to-know

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya