How to Fix JSON Formatting in SharePoint File That Needs Attention View
Question details
The user needs to apply JSON command-bar formatting to the SharePoint 'Files that need attention' view but encounters an error saving the view format.
- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Attempting to customize the command bar using JSON formatting in a built-in, system-generated SharePoint document library view.
- Observed behavior
- The JSON formatting works in custom SharePoint views but fails in the built-in 'File That Needs Attention' view, triggering an 'Error saving view format' message and a 400 Bad Request response.
Ensure you have site owner or designer permissions to create and modify SharePoint list views, and back up your original JSON code in a local text editor before making changes.
Create a Custom View with Equivalent Filters
Since the 'Files that need attention' view is a restricted system-generated view, creating a custom view is the best workaround to apply JSON formatting successfully.
The 'Files that need attention' view is a built-in system view designed to automatically appear when required metadata is missing. Because it is system-managed, SharePoint restricts certain customizations, including command-bar JSON formatting, which causes the 400 Bad Request error.
To bypass this limitation, you can recreate the view manually and apply your formatting there.
Navigate to your SharePoint document library, click the 'View options' drop-down menu in the top right corner, and select 'Save view as'. Give your new custom view a recognizable name, such as 'Custom Attention View'.
Go to 'Edit current view' from the view drop-down menu. Scroll down to the 'Filter' section and set the criteria to show items where your required metadata columns are equal to empty or null. Save the view.
With your new custom view selected, click the 'View options' drop-down menu again, select 'Format current view', navigate to the command bar customization section, and paste your JSON code.
Verify JSON Syntax and Schema Compatibility
Ensure that your JSON code strictly adheres to the schema supported by SharePoint document libraries to rule out underlying code errors.
Enhance Your Productivity with WPS Office
While troubleshooting complex SharePoint and Microsoft Office formatting issues, you might need a more straightforward solution for your daily document needs. WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office, letting you seamlessly edit Word, Excel, and PowerPoint files without the complexity of heavy system restrictions.
- 1. Download the Installer: Visit the official WPS Office website to download the free installation package for your operating system.
- 2. Open Your Documents: Launch WPS Office and directly open your existing Microsoft Office files. Your formatting and layouts will remain intact.
- 3. Edit and Collaborate: Use WPS Office's streamlined tools to edit, save, and share your documents effortlessly as a lightweight alternative to complex SharePoint workflows.

Frequently Asked Questions
Why does the 'File That Needs Attention' view restrict JSON formatting?
This view is system-generated by SharePoint to automatically flag files with missing required metadata. Because it is a built-in default system view, Microsoft restricts certain structural customizations, including advanced command-bar formatting, which leads to a 400 Bad Request error when saving.
How do I filter a custom view to act like the 'Needs Attention' view?
Edit your custom view and navigate to the Filter section. Set the filter criteria to show items where the required metadata columns are left blank (e.g., 'YourColumnName' is equal to 'null' or empty). This replicates the behavior of the built-in view while allowing you to apply JSON formatting.
Where can I find more help for SharePoint JSON formatting errors?
If your JSON works in standard views but still throws errors during advanced customizations, it is recommended to consult the official Microsoft SharePoint Developer Community forums (TechCommunity) or contact Microsoft Developer Support for specialized debugging assistance.




