cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
marney
Helper II
Helper II

Filter Gallery based on column values

Afternoon fellow Powerappers!

Say you have a SP list with a list of items. You have 15 or so columns and for each item, the column has either a Yes or No value (text value, not Choice).

In a Gallery, you are showing the list of items and when you select an item, in another Gallery it should show all the column names that have a Yes value.

For example:

 

 Column 1Column 2Column 3
Item 1YesNoYes
Item 2YesYesYes

Item 3

NoNoNo

 

So Gallery 1 would be displaying Item 1, Item 2 and Item 3. When you click on Item 1, in another Gallery, you would see two entries - Column 1 and Column 3.

Clicking on Item 2, you would see Column 1, 2 and 3 and clicking on Item 3, you wouldn't see anything because all columns have a value of No.

I don't need to know how to connect the galleries together, just the logic to achieve the above.

 

Thanks as always!

3 REPLIES 3
Matren
Responsive Resident
Responsive Resident

Hi @marney,

 

Here is a suggestion:

 

1. Build the first Gallery1

2. Copy and paste Gallery1 so it creates a mirror image Gallery2

3. In the Items Property for Gallery2 use Gallery1.Selected

4. For all the columns in Gallery2, go to their OnVisible property and put ThisItem.ApplicableColumnName = "Yes"

 

Let me know how it goes.

 

Best Wishes,

Matren

 

--------------------------------------------------------------------------------------------

Find this post helpful, give it a Thumbs Up

Solved your problem, click Accept as Solution so others can find it

@Matren Thanks so much for the response.

I had already done that but of course, you end up with multiple "Yes" in the one section of the gallery.

What I'm trying to acheive is that if there is a Yes, it should show the column name in the 2nd Gallery so in the above example, Gallery 2 would show Column 1, Column 2, Column 3 as individual entries.

 

Thanks again

Matren
Responsive Resident
Responsive Resident

Hi @marney,

 

If you don't want to display "Yes" for the column values and only want to show the column name for the value, here's a suggestion:

 

For the labels that you are using in Gallery2 to display the column names, I am guessing that their Text Property contains something like:

 

"Column Name" & ThisItem.ColumnName

 

If you change it to an If Statement, then you can display the column name:

 

"Column Name" & If(ThisItem.ColumnName="Yes","ColumnName")

 

If this isn't what you're after, can you provide a mockup of what you are looking for? Also, if you could share what you have for the text property for the columns in Gallery2, that would also be helpful.

 

Best Wishes,

Matren

 

--------------------------------------------------------------------------------------------

Find this post helpful, give it a Thumbs Up

Solved your problem, click Accept as Solution so others can find it

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,060)