cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
meganpay149
Helper I
Helper I

Filter a Gallery Help - PowerApps

I am trying to create a search bar in my gallery where it shows all rows without an out time if there isnt anything in the search box, else I would like it to show all records with the title in the search box.

 

I have tried multiple ways but always end up with an error.

 

Here is the original formula I used which only shows records which have no out time, I would like it to show me all records when the search bar is typed in - for example, If i have 2 sign in records, both of them named test, one has an out time and one doesn't, if i use the below formula, only the one with no out time will appear when i search.

 

SortByColumns(Filter([@'Airdrie Sign In Log'], TextSearchBox1.Text in Title, IsBlank('Sign Out Time')), "Title", If(SortDescending1, Descending, Ascending))

 

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User
Super User

@meganpay149 

SortByColumns(
   If(
      IsBlank(
              Filter([@'Airdrie Sign In Log'],TextSearchBox1.Text in Title
       ),
                  Filter(
                         [@'Airdrie Sign In Log'],IsBlank('Sign Out Time')                                        
                  ),
                  Filter(
                          [@'Airdrie Sign In Log'],TextSearchBox1.Text in Title 
                 )
   ),"Title", If(SortDescending1, Descending, Ascending)
)

View solution in original post

2 REPLIES 2
Drrickryp
Super User
Super User

@meganpay149 

SortByColumns(
   If(
      IsBlank(
              Filter([@'Airdrie Sign In Log'],TextSearchBox1.Text in Title
       ),
                  Filter(
                         [@'Airdrie Sign In Log'],IsBlank('Sign Out Time')                                        
                  ),
                  Filter(
                          [@'Airdrie Sign In Log'],TextSearchBox1.Text in Title 
                 )
   ),"Title", If(SortDescending1, Descending, Ascending)
)
Drrickryp
Super User
Super User

@meganpay149 

If it answered your question, please mark it as solved so others can find it.

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (2,608)