Duplicates in Sharepoint

Elinor Poole 0 Reputation points
2025-07-07T13:54:16.08+00:00

How do conditionally format duplicates in a SharePoint list?

Microsoft 365 and Office | SharePoint | Development
{count} votes

1 answer

Sort by: Most helpful
  1. Teddie-D 9,680 Reputation points Microsoft External Staff Moderator
    2025-07-08T01:48:21.23+00:00

    Hi @Elinor Poole
    Thank you for posting your question in the Microsoft Q&A forum. 
    To conditionally format duplicates in a SharePoint list, you can use a combination of column formatting with JSON, Power Automate flows.  
    After testing, here are steps you may follow: 

    1.Using Power Automate to flag duplicates: 
    Go to Microsoft Power Automate | Home > Create > Automated cloud flow > Name your flow > Choose the trigger When an item is created or modified. 
    Use the following flows as a reference and customize them as needed for your situation. 
    User's image

    2.Using JSON Column formatting 
    You can apply JSON formatting to a column to visually highlight duplicates. 

    { 
    "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", 
    "elmType": "div", 
    "style": { 
    "background-color": "=if([$Duplicate] == true, '#fff4ce', '')", 
    "color": "=if([$Duplicate] == true, '#a80000', '')", 
    "font-weight": "=if([$Duplicate] == true, 'bold', '')", 
    "padding": "4px" 
    }, 
    "children": [ 
    { 
    "elmType": "span", 
    "txtContent": "=@currentField" 
    } 
    ] 
    }
    

    This is the result:
    User's image I hope this helps.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".   

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.