The CreatorCon Call for Content is officially open! Get started here.

Need help with the 'user query' business rule

Maria DeLaCruz
Tera Guru

Hi,

Need some help with the 'user query' business rule.  I understand that out-of-the-box, non-active user records are not visible to non-admin users.  In our organization, we've updated this business rule to allow users with the service_desk role to have visibility to non-active users.  We've also made non-active users visible on two catalog item variables, one is a reference field, the other a list collector field.

The situation we're having is that on the catalog item that has the list collector, non-admin and non-service desk users are able to look-up non-active users on the catalog item view.

find_real_file.png

But, on the RITM and Catalot task view, the list collector variable shows empty.

    find_real_file.png

Here's a screen shot of the 'user query' business rule:

find_real_file.png

find_real_file.png

 

Any assistance would be greatly appreciated.

Thanks,
Maria

 

 

1 ACCEPTED SOLUTION

Michael Fry1
Kilo Patron

The User Query business rule doesn't work on variables hence the reason you're seeing the results you do. You can apply a filter to the list collector. https://www.servicenowguru.com/scripting/client-scripts-scripting/changing-filter-list-collector-var...

View solution in original post

4 REPLIES 4

Michael Fry1
Kilo Patron

The User Query business rule doesn't work on variables hence the reason you're seeing the results you do. You can apply a filter to the list collector. https://www.servicenowguru.com/scripting/client-scripts-scripting/changing-filter-list-collector-var...

Actually query business rules run across the platform including variables; they run any time a query is run against a table.  I just created a few test catalog items in my demo instance and the out of the box "user query" business rule does indeed run with list variables.

Maria DeLaCruz
Tera Guru

Thanks Michael!  I used the onLoad client script and it worked perfectly!

@mcdelacruz 

 

Hi, I am looking for the same solution. Where did you use the onLoad?