web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Suggested Answer

isDuplicate

(0) ShareShare
ReportReport
Posted on by
I
I have an existing SP List that has had data imported from Excel. 
 
I have an Agreement ID and isDuplicate column, plus many others, but these are the ones that are important.
 
I want to update the list so where there are duplicate Agreement IDs the isDuplicate is true, (yes/no) format. 
 
The Agreement ID is in number format, but due to the strange way SPLists deals with numbers it has been set to text.
 
Duplicates are allowed, but they need to be flagged. 
 
Using Copilot I have managed to create a power flow that picks up when a new Forms is submitted it checks to see if there is already an Agreement and marks them all ad duplicates. 
 
But I just can’t get it working to run a flow that will update all existing data, oh and it mustn’t change any other data just the isDuplicate.
 
can anyone help?
 
I’ve attached a copy of the code I have been working on. 
definition.json

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

Categories:
I have the same question (0)
  • Suggested answer
    Vish WR Profile Picture
    3,748 on at
     
    You could try

    Use Get items (SharePoint) with pagination enabled to fetch all records.
    Store Agreement IDs in an array.
    Identify duplicates using a count check (if Agreement ID appears more than once).
    Loop through each item and set:
          isDuplicate = true if count > 1
          otherwise false
    Use Update item, but ensure you map all required fields and only change isDuplicate.
     
    Vishnu WR
     
    Please âœ… Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥
  • David_MA Profile Picture
    14,956 Super User 2026 Season 1 on at
    You could do this:
    1. Create a flow that runs when a new item is created.
    2. Use the SharePoint Get items action with a filter query of AgreementID eq 'triggerBody()?['AgreementID']'
    3. Add a condition with the length(body('Get_items')?['value'] is greater than 1 to check if more than 1 item has the same Agreement ID, which would indicate duplicates.
    4. On the yes side, use an Apply to each with an update item action to set the isDuplicate value to true
      1. If you know how, you can use an SharePoint HTTP request to update the one field so you do not need to worry about accidentally updating anything other fields. You can refer to this for how to do that: REST API Calls in Power Automate - How to Use
  • Vish WR Profile Picture
    3,748 on at
     
     

    Just wanted to check in and see if everything is working now. If you still need any help, feel free to let me know.

    Vishnu WR
     
    Please âœ… Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard