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 / I can filter and searc...
Power Apps
Answered

I can filter and search text and date but adding ComboBox breaks the gallery

(0) ShareShare
ReportReport
Posted on by 18

I am using a gallery to show data. I can use these two codes separate and the gallery works. 

 

Search(Filter(SortByColumns('Production Reporting',"Created"),Created>=DatePickerStart.SelectedDate, Created<=DatePickerEnd.SelectedDate),InputEmployee.Text,"Employee","Employee2","Employee3","PartNumber")


Filter('Production Reporting','Work Center'.Value = ComboBox1.Selected.Value)

 


However when I combine them, the Gallery comes up empty (as seen below):

 

Search(Filter(Filter(SortByColumns('Production Reporting',"Created"),Created>=DatePickerStart.SelectedDate, Created<=DatePickerEnd.SelectedDate),'Work Center'.Value = ComboBox1.Selected.Value),InputEmployee.Text,"Employee","Employee2","Employee3","PartNumber")

 

Any help would be appreciated! 
gallery broke.png

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ingallspw 

    Please consider changing your Formula to the following:

    SortByColumns('Production Reporting'
     Search(
     Filter(
     Created>=DatePickerStart.SelectedDate, 
     Created<=DatePickerEnd.SelectedDate,
     'Work Center'.Value = ComboBox1.Selected.Value || IsBlank(ComboBox1.Selected.Value)
     ),
     InputEmployee.Text,"Employee", "Employee2","Employee3","PartNumber"
     ),
     "Created"
    )

     

    I hope this is helpful for you.

  • ingallspw Profile Picture
    18 on at

    Thanks!! I tried this but sorry to say it fails. Then I just added the || or statement and it works better but only pulls up the second item on the list when nothing is selected? 

     

    I see you combined the filter function... I couldn't get that to work the first time and that's why I had it twice. 

    (By the way... I subbed to your YouTube channel!)

  • ingallspw Profile Picture
    18 on at

    Nevermind... I had duplicated the form and changed the datepicker name but not the formula. The "Or" || statment worked! 

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard