UI policy to show fields to users of a particular group

saint
Tera Expert

Hi Experts,

 

I want to create a UI policy to show few fields to users from particular groups. Please suggest how should I approach it.

2 ACCEPTED SOLUTIONS

Manmohan K
Tera Sage

Hi @saint 

 

UI policy would not be the right choice for what you are trying to achieve if they are not stored in some field of the form

 

Please create a read ACL for those fields and you can write script in ACL to only allow users of particular groups as done below

 

 

if(gs.getUser().isMemberOf(group_name/group_sysid) || gs.getUser().isMemberOf(group2_name/group2_sysid))
{
answer= true;
}
else
{
answer=false;
}

 

  

View solution in original post

No, Not possible in ACL

 

An alternate approach would be to write a on load client script and it can work for a particular view.

You can use GlideAjax and call a script include from client script to check if logged in user is member of certain group .Based on the result returned by Script Include, you can show or hide fields on the form

View solution in original post

5 REPLIES 5

Alternatively I was thinking the same just of using the SI withing the UI action script. Let me give it a try with both the cases. Thanks