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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Error - Gallery filter...
Power Apps
Answered

Error - Gallery filter using multiple choice comboboxes

(0) ShareShare
ReportReport
Posted on by 9

Hi,

 

After much troubleshooting, research and YouTube videos, I am unable to resolve an issue with my gallery. Simply put, the gallery is filtered using a search box and comboboxes with multiple selections. When loading the app, the gallery is blank until I select and then deselect an item in each combobox, then the gallery and filtering works fine.

 

I am not overly experienced with PowerApps, however based on a lot of searching and Reza's video's, I pieced together the following code: 

 

 

Filter(
 DataSource,
 StartsWith(
 Title,
 ListSearch.Text
 )
&& (IsBlank(ComboBox1.Selected.Value) || IsEmpty(ComboBox1.SelectedItems) || Column1 in ComboBox1.SelectedItems),

If(IsBlank(ComboBox2.Selected.Value),IsEmpty(ComboBox2.SelectedItems),"yes" in ForAll(ComboBox2.SelectedItems,If(Value in Column2.Value,"yes","no"))),

If(IsBlank(ComboBox3.Selected.Value),IsEmpty(ComboBox3.SelectedItems),"yes" in ForAll(ComboBox3.SelectedItems,If(Value in Column3.Value,"yes","no"))),

If(IsBlank(ComboBox4.Selected.Value),IsEmpty(ComboBox4.SelectedItems),"yes" in ForAll(ComboBox4.SelectedItems,If(Value in Column4.Value,"yes","no"))),

If( IsEmpty(ComboBox5.SelectedItems),IsBlank(ComboBox5.Selected.Value),"yes" in ForAll(ComboBox5.SelectedItems,If(Value in Column5.Value,"yes","no")))
)

 

 

As mentioned, this does allow the gallery to be filtered, but only after I select an item and then deselect it in ComboBoxes 2-5.

 

For context, ComboBox1 is linked to a choice column with a single-selected item, ComboBox2, 3, 4 & 5 are linked to a choice column with multiple selections. Every ComboBox Items is set to the following, where "RelevantColumn" is either columns 1-5 depending on the ComboBox:

 

 

Choices(DataSource.RelevantColumn)

 

 

I have been scratching my head on what the issue is, it appears IsBlank is producing an error similar to what someone else reported - IsBlank gave a value of "False" when starting the app, when it should be "True" (Solved: Unselected combobox shows false in isEmpty - Power Platform Community (microsoft.com)). Unfortunately the solution in that thread does not work for me as it only allows ComboBox.Selected.Value or ComboBox.SelectedItems to be entered into the code. Their solution was:

 

 

IsBlank(Combobox.Selected.ColumnName)

 

 

Default on the gallery and ComboBoxes is set to "Blank()", the DefaultSelectedItems on them is empty.

 

Edit to add - the ComboBoxes work fine and the gallery filters as expected after I do the select/deselect method mentioned above. The IsBlank also displays as "True" after doing this, hence why everything works after.

 

Any help would be greatly appreciated. Thanks in advance

Categories:
I have the same question (0)
  • Verified answer
    JoeBUK Profile Picture
    9 on at

    From further research it appears the IsEmpty relates to the contents within the source table rather than the ComboBox being empty (although I am not 100% sure).

     

    I cannot explain how or why, but by removing the IsEmpty and initial If statements and amending the code to the following, the below appears to have fixed the issue:

     

    Filter(
     DataSource,
     StartsWith(
     Title,
     ListSearch.Text
     )
    && (IsBlank(ComboBox1.Selected.Value) || IsEmpty(ComboBox1.SelectedItems) || Column1 in ComboBox1.SelectedItems),
    
    (IsBlank(ComboBox2.Selected.Value) || "yes" in ForAll(ComboBox2.SelectedItems,If(Value in Column2.Value,"yes","no"))),
    
    (IsBlank(ComboBox3.Selected.Value) || "yes" in ForAll(ComboBox3.SelectedItems,If(Value in Column3.Value,"yes","no"))),
    
    (IsBlank(ComboBox4.Selected.Value) || "yes" in ForAll(ComboBox4.SelectedItems,If(Value in Column4.Value,"yes","no"))),
    
    IsEmpty(ComboBox5.SelectedItems) || "yes" in ForAll(ComboBox5.SelectedItems,If(Value in Column5.Value,"yes","no")))
    )

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 414

#2
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 315 Super User 2026 Season 1

Last 30 days Overall leaderboard