Joining two reference qualifiers

ijtm89
Tera Contributor

Hello experts.

I have a requirement on which on a catalog item I have two reference type variables on the first one I have to filter the users by the ones that have Itil role, and on the other one once selected the user on the first variable I have to display the groups the user belongs to, but it only has to show the groups that are certain type which I saved the sys_id of on a system property, I have two different reference qualifiers for each of those requirements, and I want to join them in one to solve both things at the same time, but I can't seem to find the way to make it work.

Can anyone please try and provide guidance on this, any helps is appreciated.

Regards!

First ref qual: solves the part on which we have to show groups that the user belongs to

javascript: 'sys_idIN' + j2js(gs.getUser().getUserByID('' + current.variables.assigned_toRTOff).getMyGroups()).join(',');

second ref qual: filters the groups by the type specified within that system property

javascript: "typeLIKE"+gs.getProperty('nut.group.type.support');
1 ACCEPTED SOLUTION

Aman Kumar S
Kilo Patron

Try this:

javascript: "typeLIKE"+gs.getProperty('nut.group.type.support')+'^sys_idIN' + j2js(gs.getUser().getUserByID('' + current.variables.assigned_toRTOff).getMyGroups()).join(',');
Best Regards
Aman Kumar

View solution in original post

7 REPLIES 7

Aman Kumar S
Kilo Patron

Try this:

javascript: "typeLIKE"+gs.getProperty('nut.group.type.support')+'^sys_idIN' + j2js(gs.getUser().getUserByID('' + current.variables.assigned_toRTOff).getMyGroups()).join(',');
Best Regards
Aman Kumar

Hi Aman, thank you for the quick answer, it does work for the second part, but it's not applying the filter by "type" to the groups shown

What value does your system property contains?

Best Regards
Aman Kumar

The sys_id of the type I want to use to filter the groups by