- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2022 11:41 AM
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?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2022 09:37 PM
Hi,
you can use field level READ ACLs on those fields and hide those on list view
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2022 11:32 PM
Yes

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2022 11:40 PM
Hi Renu,
ACLs will help you in restricting the fields in the reporting. Kindly select report_view ACL instead of record ACL.
For hiding the field from the form kindly create a onLoad client script with the below code.
if(g_user.hasRole('itil') && "Your condition"){
g_form.setDisplay('field1',false);
g_form.setDisplay('field2',false);
g_form.setDisplay('field3',false);
}
else{
g_form.setDisplay('field1',true);
g_form.setDisplay('field2',true);
g_form.setDisplay('field3',true);
}
Regards,
Deepankar Mathur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2022 11:22 PM
since you have 20 fields I won't suggest field level READ ACLs
use onLoad client script and hide those 20 on form
For those 3 fields you can use field level READ ACLs
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2022 01:00 AM
Hi Ankur,
My requirement is reverse actually.
I need to hide 3 fields on the form as per reporting purpose, they contains confidential information.
But the other 20 fields are to be visible by ITIL user.
Instead of writing 20 read ACL's for each field for ITIL user, is there any other option?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2022 01:09 AM
Hi,
you can use script for hiding large number of fields
you can use ACL for limited fields
regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader