web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Gallery Filter (contains)
Power Apps
Unanswered

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
    153,040 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
    153,040 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard