Home › Knowledgebase › KB-1852

Fix Conditional Formatting Errors In SharePoint Linked Data Lists

Summary

This guide helps you troubleshoot and resolve: Fix Conditional Formatting Errors In SharePoint Linked Data Lists. Follow the steps below to fix the issue.

Quick Tip: Need immediate assistance? 💻 Open a Ticket

Common Causes

Conditional formatting allows you to highlight important data in SharePoint list columns based on specific rules. When SharePoint lists are migrated from local network drives to SharePoint Online, formatting rules may fail because they reference columns that no longer exist or have been renamed. This can cause visual inconsistencies and errors in your list views.

Conditional formatting applies to the current list and view only. It does not create dependencies across different lists or site collections, and it cannot validate data in another SharePoint list.

Quick Fix Steps

  1. Open the SharePoint list containing the column with broken conditional formatting.
  2. Open the column settings and select Format this column.
  3. Choose Conditional formatting to review existing rules.
  4. Update any rules that reference deleted or renamed columns within the same list.
  5. Save your changes and refresh the list view to confirm the formatting displays correctly.

Detailed Instructions

Step 1: Access Column Settings

  1. Navigate to your SharePoint site and open the affected list.
  2. Select the column header for the column displaying the formatting error.
  3. Select Column settings from the dropdown menu, then choose Format this column.
  4. Select Conditional formatting to open the formatting rules panel.

Step 2: Review Formatting Rules

  1. Review each conditional formatting rule listed in the panel.
  2. Look for rules that reference column names which have been deleted or renamed during migration.
  3. Check for error messages such as "Reference not found" or "Invalid column reference."
  4. Identify the internal name of the column you want to reference. Internal names often differ from display names and may contain encoded characters.

Step 3: Update Column References in JSON

  1. Select the rule you need to edit to view its JSON formula syntax.
  2. Replace any invalid column references with the correct internal column name from the current list.
  3. Ensure all referenced columns exist in the same list. SharePoint Online column formatting does not support references to other lists.
  4. Example JSON condition checking a column named ProjectStatus:
{
  "elmType": "div",
  "txtContent": "@currentField",
  "style": {
    "background-color": "=if(@currentField == 'Completed', '#d4edda', if(@currentField == 'In Progress', '#fff3cd', '#f8d7da'))"
  }
}
  1. Select Save to apply the formatting changes to the column.

Step 4: Add Rules for Missing Data

  1. Create a new conditional formatting rule to handle blank or null values.
  2. Set the condition to check if the referenced column is empty.
  3. Apply a neutral colour or text style to indicate missing data rather than displaying an error.
  4. Position exception rules at the top of your rule list so they are evaluated before other conditions.

Step 5: Save and Validate

  1. Select Save to apply all formatting changes.
  2. Return to the list view and confirm the colours, icons, and text styles appear as expected.
  3. Test the view with different data entries to ensure the rules trigger correctly.

Troubleshooting

Formatting Does Not Appear After Saving

Rules Work in One View but Not Another

Column Reference Errors

Warning: Conditional formatting rules cannot reference columns in other SharePoint lists or site collections. If you need to display data from another list, consider using Microsoft Power Apps or a SharePoint modern page with web parts instead of column formatting.

If you continue to experience issues with SharePoint list formatting, you can Open a Ticket for assistance from our support team.

Still Having Issues?

Need more help? If the issue persists after trying these steps, please open a support ticket and our team will assist you.

💻 Open a Ticket