Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Filtering a gallery using cascading filters

(1) ShareShare
ReportReport
Posted on by

Hi,

 

I'm using cascding filters where the options of a combobox are dependent on the value selected in another combobox.

 

E.g., if the options for combobox 1 are [Dog, Cat... etc], and I selected dog, then combobox 2 would display [Golden retriever, labrador, etc...] and if cat was selected then it would show cat breeds (I am a dog person if you can't tell).

 

I'm having trouble filtering the gallery however, where I'm basically get errors on combobox 2 (the filter which has conditional options) where it says:

"Invalid Argument type: cannot use text values in this context"

 

Please see the code I have used in the gallery

 (HubFilter is combobox 2 in this instance)

Sort(
 Filter( 
 'CVs Library',
 (Grade in GradeFilter.SelectedItems || IsBlank(GradeFilter.SelectedItems))
 && ('Base Location' in BaseLocationFilter.SelectedItems || IsBlank(BaseLocationFilter.SelectedItems))
 && ('Security Clearance'.Value = SCFilter.Selected.Value || IsBlank(SCFilter.Selected.Value))
 && ('Capability Hub' in HubFilter.Selected.Value || IsBlank(HubFilter.SelectedItems))
 && ('Capability Team' in CTFilterCV.SelectedItems || IsBlank(CTFilterCV.Selected.Value))
 ), 
 Name, 
 SortOrder.Ascending
)

 

PS any advice on optimising the query as I am getting delegation warnings on the ANDs is also appreciated 

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

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,700 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard