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 / Composite Key duplicat...
Power Apps
Answered

Composite Key duplicate check

(0) ShareShare
ReportReport
Posted on by 254

Hello,

 

I'm trying to setup a composite key duplicat check on two datacardvalue fields of a sharepoint list. The check happens after I click on the submit button:

 

 

 

If ( IsBlank( Lookup(Table; ProductID = DataCardValue1.Text &&
 'Deparment ID' = DataCardValue2.Text .....

 

 

The duplicate check is not working for Department ID. Not even if I just check for duplicates of department ID without ProductID.

 

The sugguestion the system gives me is in 'Deparment ID' in single quotes. I also tried to change that, but seemingly it needs the quotes because of the space in the middle. 

The other difference the Department ID is different vs. the ProductID is that its a dropdown selection and not a free text field. 

Whatevery I do, the intellisense always marks the equal sign between 'Department ID' = DataCardValue2.Text with a red unterline. 

 

Thank you very much in advance 

 

Best. 

 

Categories:
I have the same question (0)
  • Applicable88 Profile Picture
    254 on at

    I now have basically made a double check and can confirm that if (IsBlank( Lookup .....

    is not working out on a drop down datacard. 

    What wonders me is that the lookup function is searching at the underlying content of the sharepoint list and why should a dropdown be different to a free text field?

     

    I hope someone has an solution to this. 

     

    Best. 

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Applicable88 

    What type of column is department id?

  • Verified answer
    Applicable88 Profile Picture
    254 on at

    Hello @Drrickryp,

    in Sharepoint List Department ID is a "Choice" column. When using a SharepointList as source, PowerApps automatically detect it as Dropdown menu. Here I got an example 

    Applicable88_0-1654201984686.png

     

     

    Is there a problem using Lookup function of that kind of column type?

     

    Best. 

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Applicable88 

    Try 'Department ID'.Value BTW, the screenshot appears to show a different column. 

  • Applicable88 Profile Picture
    254 on at

    @Drrickryp thanks for the quick response. The screenshot is just from a blog page reference, not my actual columm.

     

    Okay, I tried DataCardValue.Text not working.

    Now I tried Value, SelectedItems also not working. 

    What attributes could it else be?

     

    I just did an check with another column type which is a slider like boolean. 

    In this case using DataCardValue.Value it worked. 

     

    So a "choice" column must be classified as something different than .Text and .Value?

     

  • Verified answer
    Applicable88 Profile Picture
    254 on at

    I found it its apparently Columnname.Value = DataCardValue.Selected.Value

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 839

#2
Valantis Profile Picture

Valantis 533

#3
Haque Profile Picture

Haque 412

Last 30 days Overall leaderboard