Permission & Access Issues

How to Show or Hide SharePoint Fields Based on the Current User

Natalie TaylorNatalie Taylor Nov 4, 2026 869 views

Question details

The user wants to dynamically show or hide specific SharePoint list fields depending on the currently logged-in user.

How to Show or Hide SharePoint Fields Based on the Current User
Product
Microsoft SharePoint
Device & OS
not provided
Scenario
Attempting to use JSON conditional formatting expressions like [$CurrentUser] or @Me to restrict or display list fields automatically.
Observed behavior
SharePoint's built-in conditional formatting does not reliably identify the current user automatically to execute the field visibility rules.
Before you start

Ensure you have Site Owner or Full Control permissions on your SharePoint list to edit column settings and apply custom JSON conditional formatting.

Solution 1Recommended

Use a Person or Group Column for Comparison

Since SharePoint struggles with dynamic user tags like @Me in field-level formatting, a reliable workaround is to compare the current user against a dedicated user column.

Native SharePoint JSON conditional formatting often fails to process expressions like [$CurrentUser] directly for hiding fields in forms. By referencing a specific column that contains the permitted users, you can create a 'contains' condition to manage visibility effectively.

1
Create a User Column

Navigate to your SharePoint list and click on 'Add column' to create a new 'Person or Group' column.

2
Populate the User Data

Add the specific users or groups who are authorized to view the fields into this new column.

3
Open Conditional Formatting

Go to the list settings, select the form or field you want to format, and open the 'Conditional formatting' pane.

4
Apply JSON Logic

Apply a JSON formula that checks if your newly created user column contains the current user's email or display name to toggle the visibility of the field.

Use a Person or Group Column for Comparison
Avoid Password Fields: Using a generic text field as a 'password' workaround to reveal fields is highly insecure and should not be used as a security mechanism.
Free Microsoft Office alternative

Looking for a simpler way to manage your documents?

While SharePoint lists are powerful, managing complex permissions and custom JSON code can be frustrating. For your daily document, spreadsheet, and presentation needs, WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office.

Fully compatible with Microsoft Word, Excel, and PowerPoint formats.Free and lightweight, ensuring smooth performance on any PC or Mac.Familiar, user-friendly interface that requires zero learning curve.Built-in cloud features for easy document sharing and collaboration.
microsoft office alternative - wps office

Frequently Asked Questions

Can I use @Me in SharePoint JSON conditional formatting?

Natively, using @Me or [$CurrentUser] directly in list form conditional formatting to dynamically hide fields is often unreliable. Microsoft generally recommends utilizing filtered views or checking logic against a dedicated 'Person or Group' column instead.

How do I securely hide sensitive fields in a SharePoint list?

JSON conditional formatting only hides fields from the user interface; it does not restrict data at the database level. For true security, you must use item-level permissions or store sensitive data in a separate, restricted list.

Why does my SharePoint conditional formatting formula keep failing?

The most common reason for formula failure is referencing the column's display name rather than its internal name. Always check your list settings URL for the exact internal name and ensure your JSON syntax is strictly valid.

Is using a password text field a good workaround for hiding fields?

No. Requiring users to enter a password into a plain text field to reveal other fields is highly insecure. It does not encrypt the data and fails to protect the underlying list information from being accessed via APIs or standard list views.