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 Platform Community / Forums / Power Apps / my attempt at Duplicat...
Power Apps
Answered

my attempt at Duplicate detection from a Sharepoint list

(0) ShareShare
ReportReport
Posted on by 1,168

Hi,

 

I am trying to prevent duplicates based on 2 columns in a Sahrepoint List. The 1st column is the Title column and the 2nd is a Text column.

 

The 2 datacards in the form are text fields.

 

It is possible for the 2nd Sharepoint column to be never have anything in it or even had data that has been backspaced out.

 

Both fields must match for it to be a duplicate. 

 

My attempt so far has been 

 

If(IsBlank(LookUp(SharpeointList, ColA=DataCardValue37.Text And 'Col B'=DataCardValue64.Text)),Notify("Duplicate Detected. Unable to add", NotificationType.Error,3000),
SubmitForm(form1);
ResetForm(form1))

 

Problem is it is saving

 

Any assistance is greatly appreciated.

 

Thanks

 

Todd

Categories:
  • v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @Tango 

     

    Please try:

    If(IsBlank(LookUp(SharpeointList, ColA=DataCardValue37.Text && 'Col B'=DataCardValue64.Text)),SubmitForm(Form3)&&ResetForm(Form3),Notify("Duplicate Detected. Unable to add", NotificationType.Error,3000))

     

    Best Regards,

    Levi

  • Tango Profile Picture
    1,168 on at

    Thank you @v-liwei-msft,

    if I wanted to add the following where would I put it

    IsBlank(DataCardValue69.Text),Notify("The Required field could not be blank, please add Phone Number", NotificationType.Error,3000)
  • Verified answer
    v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @Tango 

     

    You can modify the overall formula to be:

     

    If(IsBlank(DataCardValue69.Text),Notify("The Required field could not be blank, please add Phone Number", NotificationType.Error,3000),If(IsBlank(LookUp(SharpeointList,DataCardValue37.Text=ColA&&DataCardValue64.Text='Col B'))&&!IsBlank(DataCardValue69.Text),SubmitForm(form1)&&ResetForm(form1),Notify("Duplicate Detected. Unable to add", NotificationType.Error,3000)))
    

     

     

    Best Regards,

    Levi 

  • Tango Profile Picture
    1,168 on at

    Thanks @v-liwei-msft But the form saved (duplicate wasn't detected )

  • v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @Tango 

     

    According to my test, this problem does not occur, please provide the formula you are using now.

     

    Best Regards,

    Levi

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard