Skip to main content

Notifications

Community site session details

Community site session details

Session Id : KelrDwdA/4oYQqVzOItGI2
Power Apps - Building Power Apps
Answered

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

Like (0) ShareShare
ReportReport
Posted on 21 Sep 2022 15:02:09 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

  • ingallspw Profile Picture
    18 on 21 Sep 2022 at 17:27:11
    Re: I can filter and search text and date but adding ComboBox breaks the gallery

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

  • ingallspw Profile Picture
    18 on 21 Sep 2022 at 17:11:11
    Re: I can filter and search text and date but adding ComboBox breaks the gallery

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

  • Verified answer
    RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 21 Sep 2022 at 15:06:05
    Re: I can filter and search text and date but adding ComboBox breaks the gallery

    @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.

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 134

#3
stampcoin Profile Picture

stampcoin 123

Overall leaderboard
Loading started