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 / Conditional Formatting...
Power Apps
Answered

Conditional Formatting on Two Different Collections Using ForAll/Patch

(0) ShareShare
ReportReport
Posted on by 17

Hello - I am trying to change the color of a label in one gallery to green after it finds a match in another gallery (all matches). In the screenshot below, you can see how this app works. The top button gallery acts as a filtering mechanism for the 2 galleries beneath. The bottom left gallery has its own collection, the bottom right gallery has its own collection, and the buttons above filter the galleries based on the team name.

 

Currently, only one of the Approved Games list games is recognized as a match even if there clearly multiple matches. I'm guessing I need to setup a loop to record multiple matches in the Sponsored Games collection after each button is selected, but I can't seem to figure that out. I have a match boolean column ready to go in the Sponsored Games collection; I just need to figure out the loop/patch formula.

 

Any guidance would be much appreciated. Thanks!

PowerAppCapture.PNG

 

Categories:
  • jpmarcy Profile Picture
    17 on at

    Here is the ForAll loop I cannot get working due to "Invalid Argument type" on the = operator.

     

    ForAll(colApprovedGames,
     If(
     colApprovedGames.Game=colSponsoredGames.Display,
     Patch(colSponsoredGames,
     Defaults(colSponsoredGames),
     {Match:true})
     ) 
     )
  • Verified answer
    jpmarcy Profile Picture
    17 on at

    This ended up working for me. On the Color property of the Sponsored Games label: 

     

    If(lbl_SponsoredGame.Text in Gal_ApprovedGames.AllItems.Game,Green,Red)

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard