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 / Gallery filter not fil...
Power Apps
Unanswered

Gallery filter not filtering when 2 fields are added

(0) ShareShare
ReportReport
Posted on by

The filter works fine without Dropdown3.Selected.Value=Blank() || 'CHAPTER 7' =Dropdown3.Selected.Value ||
lblIncludeUnarchiveSearchFormula.Text=Blank() || 'Number of unarchived chapters'= Value(lblIncludeUnarchiveSearchFormula.Text)

But once those two criteria are added nothing works. 

 

Sort(
Filter(
Training,
IsBlank(ddCh7StatusSearch.Selected.Ch7StatusSearch) ||'CHAPTER STATUS 7' = ddCh7StatusSearch.Selected.Ch7StatusSearch ||
IsBlank(ddCh11StatusSearch.Selected.Ch11StatusSearch) || 'CHAPTER STATUS 11'= ddCh11StatusSearch.Selected.Ch11StatusSearch ||
IsBlank(ddCh12StatusSearch.Selected.Ch1213StatusSearch) || 'CHAPTER STATUS 12' = ddCh12StatusSearch.Selected.Ch1213StatusSearch ||
IsBlank(ddCh13StatusSearch_1.Selected.Ch13StatusSearch) || 'CHAPTER STATUS 13' = ddCh13StatusSearch_1.Selected.Ch13StatusSearch ||
ddRegionSearch_home_1.Selected.Region= Blank() || REGION= ddRegionSearch_home_1.Selected.Region ||
IsBlank(txtLastNameSearch_home_1.Text) || LAST_NAME = txtLastNameSearch_home_1.Text ||
IsBlank(txtFirstNameSearch_home_1.Text) || FIRST_NAME = txtFirstNameSearch_home_1.Text ||
Dropdown3.Selected.Value=Blank() || 'CHAPTER 7' =Dropdown3.Selected.Value ||
lblIncludeUnarchiveSearchFormula.Text=Blank() || 'Number of unarchived chapters'= Value(lblIncludeUnarchiveSearchFormula.Text)
),ID,SortOrder.Descending)

Categories:
I have the same question (0)
  • jrletner Profile Picture
    720 Moderator on at

    Hi @mjackson122 ,

     

    For the dropdown being blank...try this instead

     

    isBlank(Dropdown3.Selected.Value)

     

    Hope that helps resolve your issue!

     

  • WarrenBelz Profile Picture
    154,974 Most Valuable Professional on at

    Hi @mjackson122 .

    A couple of fundamental things here that may assist you for the future - Blank() does not address empty strings (which is different to a null value) and is why you often see IsEmpty() tests.
    Len(. . . .) = 0 addresses both. Also for number fields the IsNumeric test is a better option.
    But I believe you have another structure issue and need And() between the Or() sets as below (put back to Or() if you are trying to get anything that matches anything rather than "drilling down" on the data)

    Sort(
     Filter(
     Training,
     (
     Len(ddCh7StatusSearch.Selected.Ch7StatusSearch) = 0 ||
     'CHAPTER STATUS 7' = ddCh7StatusSearch.Selected.Ch7StatusSearch
     ) &&
     (
     Len(ddCh11StatusSearch.Selected.Ch11StatusSearch) = 0 || 
     'CHAPTER STATUS 11'= ddCh11StatusSearch.Selected.Ch11StatusSearch
     ) &&
     (
     Len(ddCh12StatusSearch.Selected.Ch1213StatusSearch) = 0 || 
     'CHAPTER STATUS 12' = ddCh12StatusSearch.Selected.Ch1213StatusSearch
     ) &&
     (
     Len(ddCh13StatusSearch_1.Selected.Ch13StatusSearch) = 0 ||
     'CHAPTER STATUS 13' = ddCh13StatusSearch_1.Selected.Ch13StatusSearch
     ) &&
     (
     Len(ddRegionSearch_home_1.Selected.Region) = 0 || 
     REGION = ddRegionSearch_home_1.Selected.Region
     ) &&
     (
     Len(txtLastNameSearch_home_1.Text) = 0 || 
     LAST_NAME = txtLastNameSearch_home_1.Text
     ) &&
     (
     Len(txtFirstNameSearch_home_1.Text) = 0 || 
     FIRST_NAME = txtFirstNameSearch_home_1.Text
     ) &&
     (
     Len(Dropdown3.Selected.Value) = 0 || 
     'CHAPTER 7' = Dropdown3.Selected.Value
     ) &&
     (
     IsNumeric(lblIncludeUnarchiveSearchFormula.Text) || 
     'Number of unarchived chapters' = Value(lblIncludeUnarchiveSearchFormula.Text)
     )
     ),
     ID,
     SortOrder.Descending
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • mjackson122 Profile Picture
    on at

    This works only if all of those fields are populated. However, there are several values in the SQl database that are NULL so as-is when I run it with the fields that are NULL by selecting the blank value from the dropdowns the gallery returns nothing. Also when I tried the OR method it looks like it gallery just filters to whatever the new value selected is.. is that correct?

    I am under the impression I would have to make several && and || statements like first && last && region is one query then another last && region and another that maybe just || for region. Because the drill down is not working for the expression as-is when there are nulls, open to any suggestions because I don't know the fields that will be selected to search on, it maybe all of them or it may be four.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 462

#2
WarrenBelz Profile Picture

WarrenBelz 425 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 291

Last 30 days Overall leaderboard