web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filtering a gallery us...
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 

Categories:
I have the same question (0)

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard