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 / Gallery Filter (contains)
Power Apps
Answered

Gallery Filter (contains)

(0) ShareShare
ReportReport
Posted on by 185

Hi all,

 

I am filtering a Gallery using the following:

 

If(
 IsBlank(txtSearch.Text),
 Filter(
 Jobs,
 Status.Value = galleryFilter.Text
 ),
 Filter(
 Jobs,
 //Status.Value = galleryFilter.Text &&
 (StartsWith(Title, txtSearch.Text) ||
 StartsWith(Contact, txtSearch.Text) ||
 StartsWith(Address, txtSearch.Text) ||
 StartsWith(AddressStreet, txtSearch.Text))
 )
)

 

So basically the gallery has a default filter based on the value in "galleryFilter". Then if text in entered into "txtSearch" then the second filter rule kicks in. The problem I am facing though is I would like to search the SharePoint list columns with any text not just the starting text.

 

So for example I would like to search for "extension" in Title or "Johnson" in Contact or maybe "abc.net" in Email

 

da1vea_0-1713827048513.png

 

I don't believe there is a "contains" but that is effectively what I am after

 

Thanks,
David

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    154,797 Most Valuable Professional on at

    Hi @da1vea ,

    You did not state your data source, so this may have Delegation issues

    Filter(
     Jobs,
     Status.Value = galleryFilter.Text &&
     (
     Len(txtSearch.Text) = 0 ||
     txtSearch.Text in Title
     )
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • da1vea Profile Picture
    185 on at

    Thanks @WarrenBelz ,

     

    I did specify my source as a SharePoint list? So thanks for pointing me in the right direction, this is what I ended up with

     

    If(
     IsBlank(txtSearch.Text),
     Filter(
     Jobs,
     Status.Value = galleryFilter.Text
     ),
     Filter(
     Jobs,
     Len(txtSearch.Text) = 0 || txtSearch.Text in Title || txtSearch.Text in Contact || txtSearch.Text in Address || txtSearch.Text in AddressStreet || txtSearch.Text in Email
     )
    )

     

    Thanks,
    David

     

  • WarrenBelz Profile Picture
    154,797 Most Valuable Professional on at

    Hi @da1vea ,

    Spotted that now (SharePoint) - you can get a bit more Delegation control with

    With(
     {
     _Data:
     Filter(
     Jobs,
     Status.Value = galleryFilter.Text
     )
     },
     Search(
     _Data,
     txtSearch.Text,
     Title,
     Contact,
     Address,
     AddressStreet,
     EMail
     )
    )

    Depending on your location, you may need quotes "" around the fields at the bottom.

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard