Hide few fields for a specific role based on a condition

Renu9
Tera Contributor

Hi All,

I need to hide few fields on a form based on a condition and also for itil role. I am having 20+ fields on form and need to hide 3 fields.

Those 3 fields should not appear as per reporting purpose.

How can I proceed with this?

1 ACCEPTED SOLUTION

Hi,

you can use field level READ ACLs on those fields and hide those on list view

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

18 REPLIES 18

Hi,

you will require field level READ ACL and not add_to_list ACL

add_to_list ACL will just restrict the field from gear icon

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur, You meant along with onload client script field level read ACL for the description field which I need to hide it for ITIL users right. For the field level read ACL, what role I need to give. Could you please suggest

Hi,

you want to hide for itil users right

so use advanced script and use this

1) nothing in roles section

2) in script

answer = !gs.hasRole('itil');

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Renu 

Glad to know that it worked.

Would you mind marking appropriate response as correct and helpful to close the thread.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader