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 / How to find duplicate ...
Power Apps
Answered

How to find duplicate values in Repeating Gallery

(0) ShareShare
ReportReport
Posted on by 527

Hi

I have a repeating table gallery & need to find and display duplicate values in Textinput out side gallery.

 

I have used following formula

 

TextInput15 Default = If(RepeattingTable_5.Selected.ComboBox2_6=ComboBox2_6,"Duplicate","No Duplicate")

 

knsrinath_1-1681312837676.png

Request you help me to resolve.

 

Thanks & Regards

 

 

Categories:
I have the same question (0)
  • mmollet Profile Picture
    3,187 on at

    So I belive that you are getting an evaluation of true due to the fact that you are saying the following:

    If(ComboBox = ComboBox,"Duplicate","No Duplicate") which will always evaluate to true and therefor "Duplicate". What you want to do is compare the values in the label there I am assuming. I.E. If(A+4 = A, "Duplicate","No Duplicate"). 

  • knsrinath Profile Picture
    527 on at

    @mmollet 

     

    Yes,

    I am comparing repeating gallery inside Combobox, But result is required in TextInput Out side gallery.

     

    Thanks & Regards 

  • mmollet Profile Picture
    3,187 on at

    Ok so how are you choosing what to search through? Or do you just want to know if there are any duplicates in the entire list/gallery? Also do you care what the duplicates are or just that there are duplicates?

  • mmollet Profile Picture
    3,187 on at

    Here are some examples of ways this could be done:

    Screenshot 2023-04-12 at 11.29.00 AM.png

    Button At top: ClearCollect(test, ["mike","john","jake","ron","sam","blake","mike","adam","ron"])

    OG List: test

    Distinct List: Distinct(test,Value)

    Duplicates List: Filter(GroupBy(test,"Value","Duplicate"),CountRows(Duplicate)>1)

  • knsrinath Profile Picture
    527 on at

    @mmollet 

     

    Required in one combobox (Combobox2_6) only, to just warning to user do not enter duplicate value again in repeating gallery.

     

    Thanks & Regards

     

     

  • mmollet Profile Picture
    3,187 on at

    So I would try to use my code from duplicates example. If the user enters a value that is in that list then you can be sure that what they entered is already in the list and will therefor create a duplicate. This is my test for this: 

    Screenshot 2023-04-12 at 11.41.50 AM.png

     

    Screenshot 2023-04-12 at 11.42.04 AM.png

     Code for label: If(TextInput3.Text in Gallery2_2.AllItems.Value, "Duplicate", "Not Duplicate")

  • knsrinath Profile Picture
    527 on at

    Hi @mmollet 

     

    User enter first row and if user enter same value in same Combobox of second row, required display warning information automatically inside the gallery or out side galley to prevent duplicate entries.

     

    Thanks & Regards

  • Verified answer
    knsrinath Profile Picture
    527 on at

    Hi All

    The below formula is working fine

     

    Label1 Text Property = If(CountRows(Distinct(RepeattingTable_5.AllItems, ComboBox2_6)) < CountRows(RepeattingTable_5.AllItems), "Duplicate", "No duplicate")

     

     

    Thanks & Regards

     

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 337 Most Valuable Professional

#2
11manish Profile Picture

11manish 173

#3
Valantis Profile Picture

Valantis 86

Last 30 days Overall leaderboard