Modify Query BR

Sachin G K1
Kilo Sage

Hi All,

 

There is a "query BR" on user table which returns active user whenever we lookup for user table from watchlist/requested_for field. But i have requirement like for a variable "Select User"(reference field for user table from catalog item) it should show both active and inactive. how to achieve this.

 

 

 

Thanks in Advance,

Sachin

3 REPLIES 3

Maik Skoddow
Tera Patron
Tera Patron

Basically you cannot as it is pretty dangerous to deactivate the OOTB "query BR" on sys_user table. A workaround is to create a child table for the sys_table and point your variable to that child table.

Maddysunil
Kilo Sage

@Sachin G K1 

  1. Navigate to the catalog item form where the "Select User" variable is defined.

  2. Find the "Select User" variable in the form and click on it to edit its properties.

  3. Look for the Reference Qualifier field. If it's not visible, you may need to personalize the form to display it.

  4. In the Reference Qualifier field, you can specify a condition that allows both active and inactive users to be displayed. You can use the following script:    javascript: 'active=true^ORactive=false'

  

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks

Jitendra Diwak1
Kilo Sage

Hi @Sachin G K1,

 

user query business rule is running on User table which always check the active user only. You can make changes in in this business rule for perticular user only because many company wants that we want to see the inactive user as well. to achieve this you can try below code:

if(current.sys_id != "sys of user"){
    current.addActiveQuery();
}
 
you can also keep the sysid in system property as well and cll like gs.getProperties('property name').
 
Thanks
Jitendra
Please accept my solution if it works for and thumps up.