Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Filter gallery and search filter

(0) ShareShare
ReportReport
Posted on by 395

I have a gallery that is filtered by 2 values "Active" and "Pending" 

Filter ('SP Job Request',Status.Value="Active" || Status.Value="Pending")

I also want to be able to search by company name. This works on its own

SortByColumns(Filter([@'KBX Job Request'], StartsWith(Company, TextSearchBox1.Text)), "Company", If(SortDescending1, Descending, Ascending))

 

I am trying to combine the two formulas so that the gallery still only shows active and pending but also have the option to search by company name. Something like below  

 

Filter ('KBX Job Request',Status.Value="Active" || Status.Value="Pending");
SortByColumns(Filter([@'KBX Job Request'], StartsWith(Company, TextSearchBox1.Text)), "Company", If(SortDescending1, Descending, Ascending))

 

any assistance would be much appreciated

 

 

Categories:
  • Drrickryp Profile Picture
    Drrickryp on at
    Re: Filter gallery and search filter

    @Matt383 

    It is probably because Description is either a lookup or choice field.  

  • Matt383 Profile Picture
    Matt383 395 on at
    Re: Filter gallery and search filter

    I am also getting a delegation warning on another app with this 

    SortByColumns(Filter([@'KAS Reimbursement'], StartsWith(Description.Value, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))

     

    Is there another way to rewrite without delegation warning?

  • Verified answer
    Drrickryp Profile Picture
    Drrickryp on at
    Re: Filter gallery and search filter
    With({
     fltd: Filter (
     'KBX Job Request', OR(Status.Value="Active" , Status.Value="Pending"
     )
     ) 
     },
     SortByColumns(
     Filter(
     fltd, StartsWith(
     Company, TextSearchBox1.Text
     )
     ), "Company", If(SortDescending1, Descending, Ascending)
     )
    )

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard