Blog

Hide or Restrict Field Data

This article discusses various methods to hide or restrict field data in ServiceNow.

Method 1: Field Deletion

The ultimate way to hide a field is to delete it.  Use this method when you are absolutely sure you no longer need the field or the field's data.

To delete an user-defined field, follow these steps.

1. Login as system administrator
2. Open the Form where the field is shown.
3. Right click the Field's label > Personalize > Dictionary
4. Click "Delete Column"

More detailed information on deleting fields can also found in these pages

Method 2: Restrict Access

If you want to keep the existing field's data and want to hide a system-defined field, you can use access controls to restrict access to the field.  

This will restrict access to be able to read any data in the field, however it doesn't remove it from the Personalize List or Personalize Form Layout functionality.

To Hide a field using access controls

1.  Login as an admin with the security_admin role
2. Elevate your privilege to security_admin
3. Go to form you want to restrict a field
4. Right click Header Bar > Personalize > Security Rules
5. Click New
6. Add Security Rule:

Type: Record
Operation: read
Admin Overrides: false

Name: <your table>.<your field>
Script: false;

Note: I also see people use the script: gs.hasRole("nobody"); but I prefer to just use false;

More information on access controls can be found here: ServiceNow Wiki - Access Controls

Method 3: Deactivate Field

Note: This method no longer works in Fuji and Geneva versions.

You can also deactivate a field, which will remove the field from the Personalize List and Personalize Form functionality.  However it doesn't restrict access to the field if already exists on a form or list.  Deactivating a field isn't conditional either, it a global change for all users.

To deactivate a field, follow these steps.

1. Login as system administrator
2. Open the Form where the field is shown.
3. Right click the Header Bar > Personalize > Dictionary
4. Click the Personalize List Gear
5. Add the "Active" Column
6. Find the column you want to deactivate
7. Edit the "Active" list column to deactivate the field