Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

How to set visible status for gallery item based on if that item is a record in a collection

(1) ShareShare
ReportReport
Posted on by 364

Hi all,

 

Sorry if the title is confusing. I am trying to make a rectangle I have inserted into a gallery become visible if 2 conditions are met. 

Aurora_0-1682343714048.png

Clicking the "Confirm Part Quantity" adds a row to my collection "colCount". This collection contains the "Part Number" and "Location" for every record. 

 

What I would like to do is, make a rectangle become visible in the second gallery (the gallery on the right) if the part number and location for each record are inside the collection. The second gallery uses the DataSource "Part_Stock" and has the same columns for part number and location.

 

I have tried writing something along the lines of:

 

If(LookUp(colCount, Text(Location) = ThisItem.STK_06).Location && LookUp(colCount, Text('Part Number') = ThisItem.PRT_06).'Part Number', true, false)

 

but obviously this does not work. If anyone has any suggestions for what I can do in this scenario, I would greatly appreciate it. Thanks.

 

 

Categories:
  • Verified answer
    Ash13 Profile Picture
    576 on at
    Re: How to set visible status for gallery item based on if that item is a record in a collection

    Try using the "in" operator by setting the Visibility of this rectangle to:

     

    ThisItem.STK_06 in colCount.Location && ThisItem.PRT_06 in colCount.'Part Number'

     

    This will return true if both conditions are satisfied and therefore the rectangle will be visible

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,594 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,928 Most Valuable Professional

Leaderboard