cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DustinB
Advocate I
Advocate I

Filter independent search in Gallery

Hi everyone,

 

is it possible to build a "global" search for a collection? 

The search should be Filter independent, so if a Filter is selected the Search should find every item in the gallery.

 

I'm currently using this function for my gallery:

SortByColumns(Search(Filter([...]); Textinput.Text; [outsource column]); "Sortnumber"; Ascending)

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @DustinB ,

You need to use the in Filter (which is the same result as Search) and an Or() argument || as below - so it is looking for either your filter or what you are searching for

SortByColumns(
   Filter(
      YourDataSource,
      (YourCurrentFilterHere) ||
      TextInput.Text in YourSearchField
   )
)

 

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.

 

 

View solution in original post

3 REPLIES 3
Nogueira1306
Super User
Super User

Hey! Check this video:

 

https://www.youtube.com/watch?v=PsQhuX7WEbo&t=3s 

 

Basically:

 

If( IsBlank(TextInput1.Text = true; SortByColumns(Search(Filter([...]); Textinput.Text; [outsource column]); "Sortnumber"; Ascending); HERER USE THE FUNCTION FROM THE VIDEO WITH STARTSWITH)

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

WarrenBelz
Super User
Super User

Hi @DustinB ,

You need to use the in Filter (which is the same result as Search) and an Or() argument || as below - so it is looking for either your filter or what you are searching for

SortByColumns(
   Filter(
      YourDataSource,
      (YourCurrentFilterHere) ||
      TextInput.Text in YourSearchField
   )
)

 

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.

 

 

Thank you! 

Unfortunately it doesn't work for my case, because the gallery should only display the current Filter and should optional show the Item(s) when the searchbox is filled

 

I'm trying to realise this with a few if conditions... 🙂

 

 

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,248)