How do I hide variables on a RITM or SC task if a user is not apart of specific group?

KB30
Tera Expert

I have a requirement that after catalog item "a" is submitted that if you are not apart of assignment group "test" then you can no view the variables on the ritm or sc task. I created the script below on a catalog ui policy but it is not working

 

4 REPLIES 4

sushantmalsure
Mega Sage
Mega Sage

Write a client script onLoad() on catalog item make sure that too run only for RITM and catalog task (select check box Applies to Catalog item and task).

In this onLoad client script write a logic to check group membership of logged in user then based on the result hide the variables using setVisible() function 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

Thank you, I am new to coding. Do you mind helping me write out this logic?

Here is one similar example to check the membership and based on that you can hide the variables

https://www.trylearngrowrepeat.com/check-if-member-is-already-in-group/

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

Thank you but this may be a little vague for me to understand