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 / Checking if value exis...
Power Apps
Answered

Checking if value exists in another gallery

(0) ShareShare
ReportReport
Posted on by 364

Morning all,

 

So I'm scratching my head a little on this. This is the problem:

 

Capture5.PNG

 

I have two galleries. I want the background of the Staff Name box on the left to turn red if the name of the person appears in the gallery on the right. The gallery on the right is from a collection called staffListForGR, so i'm running the condition against that. It doesn't matter that the ID's are wrong, only that the same name appears. But whatever permutation of the above code i try, it doesn't work, even if it doesn't throw up any errors.

 

Any ideas?

Categories:
I have the same question (0)
  • EpicTriffid Profile Picture
    364 on at

    I have also tried this to no avail. Once again, no errors, it just doesn't work:

     

    If(
     CountRows(
     Filter(
     staffListForGR,
     'Staff Name' = Self.Text))>0,
     Color.Red, ColorValue(textboxColour))
  • Verified answer
    EpicTriffid Profile Picture
    364 on at

    Ignore this. It was set to disabled.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @EpicTriffid ,
    I think what you suppose to do is collecting all the items in the first gallery in a collection. Then, do the same for the second one and have a condition to check if it exists or not.
    Find the screenshot below:

    Screenshot (26).png

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

  • jaanihsm Profile Picture
    300 on at

    Hi @EpicTriffid! What did you mean by it was set to disabled? I am trying to compare parseJSON text value in a gallery vs a SharePoint list and get a delegation warning...Maybe I can count rows in SharePoint list instead if >0 then change color to red.

     

    jaanihsm_0-1714606088772.png

     

     

  • EpicTriffid Profile Picture
    364 on at

    Hi @jaanihsm 

     

    This is an old post, so I had to wrack my brains for what I was talking about back then. I meant that the control's displaymode was set to disabled, so even though i was correctly altering the fill, it was only showing me the disabledfill.

     

    As for you, it might be worth pulling the sharepoint list into a collection and running your check against that. I believe ISBLANK is not delegable to the datasource. This page contains a solution for that in case you want to stay directly connected to the datasource: https://www.matthewdevaney.com/sharepoint-delegation-cheat-sheet-for-power-apps/

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 547

#2
WarrenBelz Profile Picture

WarrenBelz 444 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard