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 / Multiple Search filter...
Power Apps
Unanswered

Multiple Search filter boxes for the same sharepoint gallery

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

 

I am trying to have a gallery that can be filtered by 2 seperate "search" boxes. The gallery is utalising sharepoint as a data source, so I have some deligation issues to work around.

 

This is what I am trying to do currenty with no luck: 

Filter( Projects_1, StartsWith( project_name, TextInput1.Text ), StartsWith(pm_name,TextInput1_2.Text))

 

I also tried what was in the learning material similar to this statment, which also did NOT work:

Filter( Customers, StartsWith( Name, SearchInput.Text ) || StartsWith( Company, SearchInput.Text ) )

 

 

I have a similar use case on most of my selction screens, where I need to filter a gallery by multiple conditions.

 

Any help would be much appreciated,

Thank you and Cheers!

Categories:
I have the same question (0)
  • hpkeong Profile Picture
    2,944 on at

    Hi

     

    I remember I have posted a Multi-Search example in the forum.

    Anyway, let me share the concept for Multi-Search or Filter:

     

    Typically, we used to have

    - Gallery.Items = TableX

     

    Please amend to:
    - Gallery.Items = collectionx (any name is OK), where collectionx is derived from several way, such as:

    Screen.OnVisible = ClearCollect(collectionx, TableX)

     

    Now, you can have multi-search or filter using

    - Search Box 1  TextInput1.Default = ClearCollect(collectionx, Filter(TableX, your formula 1)

    - Search Box 2   TextInput2.Default = ClearCollect(collectionx, Filter(TableX, your formula 2)

     

    You can even use

    - Dropdown (ClearCollect(collectionx, your field = Dropdown.Selected.Results)

    - Listbox

    - Another Gallery

    to trigger the same.

     

    Why use ClearCollect(collectionx,......) ?

    Whenever you perform any function (filter, drowdown,..), all the resultes will be collected temporarily into collectionx and

    collectionx is used a the items for Gallery.

     

    The above method can be widely used in many situations.

     

    Hope this helps.

     

    TQ

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @hpkeong

     

    Thank you for the reply, your help is very much appreciated!!

     

    I had been stearing clear of collections, but now is as good a time as any to use them. The amount of time to load my tables into memory is a little painful, but we will see how we go.

     

    I have tried your approach with some success, I can load collectionx (I used your naming for ease of writting) using the Screen.OnVisable property.

     

    However I cant get my text input(search box) to filter, the Defult is: 

    ClearCollect(collectionx,Filter( 'Resource Profile', StartsWith( display_name, SearchResourceName.Text ) ))

     

     

    Any suggestions?...

     

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 316 Most Valuable Professional

#2
11manish Profile Picture

11manish 242

#3
Valantis Profile Picture

Valantis 198

Last 30 days Overall leaderboard