Skip to main content

Notifications

Power Pages - General Discussions
Unanswered

Issue with filtering a gallery - cannot understand the issue

Posted on 29 Nov 2024 14:38:58 by 45
I'm trying to introduce a new filter menu to an App of mine - I wanted to use hierarchical checkboxes a bit like you'd find in PowerBI slicers.
I've got the foundations in place the expand/collapse is working, as is the selection of sub-categories.
Whilst I was going along the way, I created two collections. ColStagesExpanding and ColStatusExpanding
 
Oncheck property for the higher checkbox is
 
Collect(
    colStagesExpanding,
    ThisItem
);
Collect(
    colStatusExpanding,
    ShowColumns(
        Filter(
            colStatusLookup,
            Stage in colStagesExpanding
        ),
        Status
    )
)
 
Where colStatusLookup is a table that lists the status and it's corresponding stage
This works - I have 2 collections with the checked items (and it removes when unchecked) - all good so far
Now I want to apply the collections as filters to a Gallery, i.e. if the Stage in ColStagesExpanding then show those records (and/or/instead of - Status in ColStatusExpanding)
 
Filter(
    ColSearchRequests,
Status.Value in colStatusExpanding
//Stage in colStageswithExpanding
)
 
You can see I've commented out the Stage - I'll come to that
 
Using this for the items property of the gallery, it doesn't work - it just shows all records like the Filter doesn't match. But the collection is correct:
 
For reference, the ColSearchRequests is just a collection of ALL requests from a sharepoint list where I have done some tidying up (removing and renaming columns) which has a Status column which is an option column (hence the status.value)
 
Am I missing something really obvious? BTW - if I remove the status filter and include the stage filter it works perfectly
 
Thanks
Categories:

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,168

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,851

Leaderboard

Featured topics