Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Filter 2nd datasource inside a gallery

(1) ShareShare
ReportReport
Posted on by 75
Hi guys,
 
I have a icon control within a gallery that I would like to LookUp() to another data source. The 2nd data source "GS_Briefcase", has a column called "Email". If the result matches, the color of the icon should apply purple, if not result found, apply black.
 
Below is the filter query
If(
    !IsBlank(
        LookUp(
            GS_Briefcase,
            Email = User().Email
        )
    ),
    Color.Purple,
    Color.Black
)
 
However, in the gallery, all of the icon control color got changed to purple if a single result matches.
 
So I am expecting the star icon highlighted in GREEN to be purple, and the one highlighted in RED, to be black because the Email column does not contain my email.
 
 
Am I doing something wrong here?
Categories:
  • WarrenBelz Profile Picture
    WarrenBelz 145,422 on at
    Filter 2nd datasource inside a gallery
    That is exactly what you are asking it to do if you are looking up a data source other than the gallery Items - every icon will be either Purple or Black depending on if the User's Email is in the Email column of GS_Briefcase. Are you expecting different colours for different records in the gallery ?  Your code would only work if the Email field was in the same data source as the gallery Items.
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

     

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