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

If system property has single group you can use

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

If it has multiple group you can use

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

 

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

 

Best Regards
Aman Kumar

Thank you so much Aman

Great!

Glad it worked out for you 🙂

Best Regards
Aman Kumar