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 / Highlight duplicate em...
Power Apps
Unanswered

Highlight duplicate email ID's

(0) ShareShare
ReportReport
Posted on by 27

Hello,

 

I am new to PowerApps, and I am building a referral application. I have a gallery (sorted/filtered) with all the referral information. I would like to have a checkbox above the gallery and on checking it should display any duplicate Candidate email id's in the gallery (data stored in SP)

 

Code in the gallery items property

LastN(
FirstN(
Sort(
Filter(
Employee_Input,
SearchBox_4.Text in Emp_Name||SearchBox_4.Text in Dept||SearchBox_4.Text in Employee_Mail_ID||SearchBox_4.Text in Candidate_Name
), ID, SortOrder.Descending),
drpDownPagi_ES_1.SelectedText.Value * varPageNumberES),
drpDownPagi_ES_1.SelectedText.Value * 1)

 

CandidateEmail is a new column in SP. When someone sends a referral, they will add the Candidate's Email. Selecting the checkbox will highlight if 2 people have referred the same candidate. I don't know how to achieve this. Appreciate the help.

 

powerapp.jpg
Categories:
  • Clue Profile Picture
    187 on at

    Maybe this is what you want to achieve:

    Clue_0-1682066961629.png

     

    This gallery is a flexible height gallery that hides the item that appears twice in the gallery. It uses the Visible property of a container within the gallery that in turn shows all the values for the item. if the checkbox is selected it will check if ThisItem can be found within the items of the gallery (filtered so that ThisItem is not in it because then it will always be true).

     

    Please get back if something is unclear!

     

    Sample code:

    If(
     CheckboxCanvas1,
     ThisItem.SampleHeading in Filter(
     CustomGallerySample,
     SampleHeading = ThisItem.SampleHeading
     ).SampleHeading,
     true
    )
  • prithvi1418 Profile Picture
    27 on at

    Thank you for your response. I will try this code.

     

    I am trying to achieve this: If I click on the Show Duplicate Record CheckBox (my screenshot), it will list the records in the gallery with the email Candidate@gmail.com. I am trying to see if I can implement it without disturbing much of the existing code/layout

  • Clue Profile Picture
    187 on at

    I didn't see your image at first. But yes, I think my proposal is the simplest and best for performance. 

     

    Please get back if you encounter any problems or want support in any way! 😊

  • prithvi1418 Profile Picture
    27 on at

    Apologies for the late reply. Could you help me integrate your code with my existing code? I have a search and pagination. Will your code work with a gallery without flexible height?

     

    LastN(
    FirstN(
    Sort(
    Filter(
    Employee_Input,
    SearchBox_4.Text in Employee_Name||SearchBox_4.Text in Department||SearchBox_4.Text in Employee_Mail_ID||SearchBox_4.Text in Candidate_Name
    ),
    ID,
    SortOrder.Descending
    ),
    drpDownPagi_ES_1.SelectedText.Value * varPageNumberES
    ),
    drpDownPagi_ES_1.SelectedText.Value * 1
    )

  • Clue Profile Picture
    187 on at

    No problem. The code doesn't need to be integrated to the gallery's Item property but the controls within the gallery through the Visible property. I'll share screenshots below that hopefully illustrate my point better!

     

    Here's a screenshot of the item property of the Gallery:

    Clue_0-1682325702648.png

     

    Here's a screenshot of the Visible property of the container that has the gallery's labels in it. The Width property of which is Parent.Width and Height Property is Max(Label1.Height,Label2.Height) (gets the max height of the labels in the container). The labels have AutoHeight set to true.

    Clue_1-1682325847587.png

     

    The "Get records" button is just set up for the test so that the items of the gallery actually has duplicate items.

    Clue_2-1682325956285.png

     

    Note that the gallery is a flexible height gallery. For this method to work this MUST be the case.

  • prithvi1418 Profile Picture
    27 on at

    Thanks much. I will check and respond soon.

  • prithvi1418 Profile Picture
    27 on at

    I am replicating the steps, but I'm unable to understand why it isn't working. Instead of having text (loremipsum4), I am trying to retrieve data from a SharePoint column (CandidateEmail) which will have duplicate values.

    BTN Code:

    Btn CodeBtn Code

    Container Code:

    ContainerContainer

    Gallery Code:

    Gallery codeGallery code

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 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard