"Query Rules" is not getting triggered.

Sathwik1
Tera Expert

The "Query Rules" functionality is not working as expected. There was a OOB query rule set up to display records based on the logged-in user's account.

For example, if a user is mapped to an account with 10 cases, only those 10 cases should be shown to them.

Recently, I modified the filter condition to use sysID IS ONE OF  "CALLED SCRIPT INCLUDE AND FUNCTION", which is supposed to return specific cases based on the function's output.

 

While the "SCRIPT INCLUDE AND FUNCTION"" itself works perfectly in the background (I’ve tested the output using logs), the query rule is still not functioning.

No logs are being generated, and in the front portal, when the case table is accessed through the DataInstance widget, the logic isn't being applied.

 

Could anyone help with troubleshooting why the query rule isn’t working as expected?

@Ankur Bawiskar

6 REPLIES 6

Sathwik1
Tera Expert

Ankur Bawiskar
Tera Patron
Tera Patron

@Sathwik1 

Would you mind closing your earlier questions by marking appropriate response as correct?

Members have invested their time and efforts in helping you.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

None of my questions end up with any solution..that's why I didn't closed yet.

 

I respect all your hardwork, but without solution if I close it results in wrong inputs for future readers

Ankur Bawiskar
Tera Patron
Tera Patron

@Sathwik1 

if it was working already then any reason to invoke script include etc?

share your configuration scripts screenshots etc

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader