cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Filtering a Dependent Gallery

Hello,

I'm attempting to filter a gallery with a SharePoint list as its source that looks like this:

Item1Item1Data1

Item1Data2

Item2Item2Data1Item2Data2
Item3Item3Data1Item3Data2
Item4Item4Data1

Item4Data2

Item5Item5Data1

Item5Data2

etc. (there's ~50 items) This is the dependent gallery.

based off of another gallery whose source is a SharePoint list that looks like this:

ItemAItem1   

ItemB

Item 2Item3Item5 
ItemCItem1Item4  
ItemDItem3Item6Item7Item8
ItemEItem2Item8  

etc. (there's also ~50 items) This is the independent gallery.

What I'm looking for is that when I select ItemD in the first gallery, I want the second gallery to show:

Item3Item3Data1Item3Data2
Item6Item6Data1Item6Data2
Item7Item7Data1Item7Data2
Item8Item8Data1Item8Data2

and when I select ItemA in the first gallery, I want the second gallery to show:

Item1Item1Data1Item1Data2

This seems like it should be a really basic filtering line in the items of the 2nd gallery, but I can't figure it out. Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Advocate I
Advocate I

@mdevaney,

It turns out the solution to this problem was a series of or operators:

Filter(WCTable,WCTState=Gallery1.Selected.LSCTState1 || WCTState=Gallery1.Selected.LSCTState2 || WCTState=Gallery1.Selected.LSCTState3 || WCTState=Gallery1.Selected.LSCTState4 || WCTState=Gallery.Selected.LSCTState5)

 

View solution in original post

3 REPLIES 3
Highlighted
Super User III
Super User III

@cweaver 
This question should be pretty straight-forward for me to give a suggestion, however, there are no column names here.  I'm just going to make up a column called ItemNumber. If you can provide column names please edit your original ost.

 

Use this code in the Items property of Gallery2.

Filter(Datasource2, ItemNumber=Gallery1.Selected.ItemNumber)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted

Hi @mdevaney, thanks for jumping on this so quickly. Looking back at my OP, the tables were not explained well, so here are some edited screengrabs. This is the SP list for the first gallery where the user will choose an L number.

image.png

In the above list, the columns go up to LSCTState5ID that could have data

This is the 2nd SP list, the dependent one, that I am attempting to filter.

cweaver_0-1600383307269.png

What I am looking for is for when a user selects, lets say L-154 from the first gallery, the dependent gallery shows

WCTStateIDWCTOSWCTIS
OHOHData1OHData2
PAPAData1PAData2
WVWVData1WVData2

or when they select L-13, they get

WCTStateIDWCTOSWCTIS
DE0.18820.0502
PAPAData1PAData2

instead of the entire list from the 2nd screengrab. I'm subbing in "Data1" and "Data2" for the values that aren't visible in the above screengrab. If I need to convert the dependent gallery to a form or table to more easily accomplish what I'm after, I'm definitely open to that.

Highlighted
Advocate I
Advocate I

@mdevaney,

It turns out the solution to this problem was a series of or operators:

Filter(WCTable,WCTState=Gallery1.Selected.LSCTState1 || WCTState=Gallery1.Selected.LSCTState2 || WCTState=Gallery1.Selected.LSCTState3 || WCTState=Gallery1.Selected.LSCTState4 || WCTState=Gallery.Selected.LSCTState5)

 

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,721)