Skip to main content

Notifications

Power Apps - Microsoft Dataverse
Answered

Dataverse for Teams - Handling Duplicates In Canvas Apps

(0) ShareShare
ReportReport
Posted on by 716

Hello Power Platform Community,

I hope you can help please. I have a question about how people are dealing with duplicates in Dataverse for Teams, as I don't believe it has duplicate detection rules like Dataverse does.


I have a Canvas App sitting on top of Dataverse for Teams. 

On my child table "Metrics", I have two columns:

  • Platform Team (which is a lookup column to the parent table called, "Platform Team")
  • Metrics Date (which is a Date and Time column)

If the user changes the value in Platform Team and the value Metrics Date to values that exist already on a record in my table "Metrics",

then I want to disable the save button and offer a notify message telling the user the record is a duplicate.

 

Example:

So a user is creating or editing a record.

In the column "Platform Team" a user adds "Dynamics"

In the "Metrics Date" a user adds "31/07/2021"

The app will throw an error and disable the save button as there is already a record in the database which has "Platform Team" = "Dynamics" and "Metrics Date" = "31/07/2021".

 

Any thoughts would be greatly appreciated.

Thanks very much,

Garry

Categories:
  • codevenkat Profile Picture
    codevenkat 126 on at
    Re: Dataverse for Teams - Handling Duplicates In Canvas Apps

    You can open that record by navigating to make.powerapps.com and select your table and select record and if it shows as read only then install Level up extension in Chrome browser and select option of God mode and you can edit the existing record.

     

  • CU01081947-0 Profile Picture
    CU01081947-0 716 on at
    Re: Dataverse for Teams - Handling Duplicates In Canvas Apps

    Hello @ChrisPiasecki,

    Thanks so much for the reply. This is great. May I please ask a follow up question?


    I did try doing that last night, but found that I was then unable to edit the newly created record. 

    So once it was created the record saved on the database, all good there, but if I'd made a mistake and wanted to edit the record it would not allow me to do it, as it kept saying, of course, the record is a duplicate because it does exist. 

     

    Any idea how I'd get around the edit issue so it allows me to edit existing records?

    Thanks so much,

    Garry 

  • Verified answer
    ChrisPiasecki Profile Picture
    ChrisPiasecki 6,389 on at
    Re: Dataverse for Teams - Handling Duplicates In Canvas Apps

    Hi @GarryPope,

     

    You can leverage CountRows and Filter to look for an existing record that matches the values. You would run this formula whenever the value changes in either of those 2 fields. 

    Example:

     

    If(CountRows(Filter(DataSource,"Platform Team" = "Value1" && "Metrics Date" = "Date1")) > 0,"Exist","Does Not Exist")

     

    You can set this to a boolean variable and use that variable to to enable/disable the button and show/clear an error notification 

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,422

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,711

Leaderboard

Featured topics