Field Should be visible if user is a member of Assignment Group

himanshu07
Tera Contributor

If the user changes the Assignment group, and the user is a member of the newly selected group, the "Confidential" (field name) remains hidden until the Incident is saved because of an Read ACL which has a lot of condition.

 

Requirement

Confidential field should be displayed on change of the Assignment group and the user is a member of the newly selected group.

This can be achieved with OnChange Client script without altering/modifying the existing ACL. Please help me with the code, so I can complete this.

if user is a member of newly selected group //what code should I write in if Statement, I know we cannot use "ismemberof" in client script 

{

g_form.setVisible('u_confidential', true);

}

 

4 REPLIES 4

Omkar Mone
Mega Sage

Hi 

You mean logged in user or selected user?

Hi

 

I mean logged in user.

Hi 

You need to pass true/false from script incllude and then get it in the client script. 

 gs.getUser.isMemberOf('your_group name');

 

Please go through the below link .

https://community.servicenow.com/community?id=community_question&sys_id=33fef229db58dbc01dcaf3231f96...

 

Mark correct if it helps.

 

Regards,

Omkar Mone

www.dxsherpa.com

Shashi Bhushan
Kilo Guru

Hi Himanshu,

you can refer the below link

Hide field for specific group

Please mark answer as correct or helpful if solves your problem.

Thanks