Filter users on catalogue variable

sujan0119
Tera Expert

We have a variable called Please select the user on the catalogue item which is a reference variable referring to sys_user table. The requirement is if the user with email id ends with (@abc.com) is the loggedin user. The user should only be able to see user list with email id ending with @abc.com and if the user with email id ends with (@xyz.com) is the logged in user should able to see user list with email id ending with @XYZ.com. companies are  different abc and xyz. Please help.

1 REPLY 1

Chaitanya ILCR
Giga Patron

Hi @sujan0119 ,

 

You can put this in the advanced reference qualifier of the variable 

javascript: var userEmail = gs.getUser().getEmail(); var domain = userEmail.split('@')[1]; domain ? 'emailENDSWITH@' + domain : '';

 

Regards 

Chaitanya