Filter sys_user_group results

rafaelalves4337
Tera Contributor

Hello,

 

Quick question, I had to create a reference qualifier to get only groups the requested_by is the manager, but now I need to filter only groups that Parent is empty (parentISEMPTY), how can I add this to the reference qualifier bellow?

Screenshot_5.png

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@rafaelalves4337 Please update your reference qualifier as follows. Add the '^parentISEMPTY' at the end of your reference qualifier string

 

 

javascript: 'sys_idIN' + new global.ArrayUtil().convertArray(gs.getUser().getUserByID(current.variables.requested_by).getMyGroups())+'^parentISEMPTY';

 

Hope this helps.

View solution in original post

3 REPLIES 3

Zach Koch
Giga Sage
Giga Sage

In the case that is ALL your reference qualifier needs now, you could use the condition builder in a Simple reference qualifier. In the case that you still need the rest of the functionality in this reference qualifier, you will need to create a Script include or change what you currently have and change your query to look for groups where parent is empty.

If this information helped resolve your issue, please remember to mark response correct and thumbs up to help future community members on this information, thanks!

sonali panda1
Kilo Sage

Hi,

 

If it just need to be filtered by Parent is empty, You can remove the reference qualifier and add it is as a simple reference qualifier and add the filter condition. If you need both the conditions to be applicable, update the script include to pass the data for parent is empty + requested by is manager , that should do teh work.

Sandeep Rajput
Tera Patron
Tera Patron

@rafaelalves4337 Please update your reference qualifier as follows. Add the '^parentISEMPTY' at the end of your reference qualifier string

 

 

javascript: 'sys_idIN' + new global.ArrayUtil().convertArray(gs.getUser().getUserByID(current.variables.requested_by).getMyGroups())+'^parentISEMPTY';

 

Hope this helps.