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 / Startswith Function On...
Power Apps
Answered

Startswith Function Only Sorting on the First of Three Filter Criteria In My Gallery

(0) ShareShare
ReportReport
Posted on by 237

I have a gallery that pulls in data from my SharePoint List if a record is in one of 3 different "Quote Status". From there I am attempting to give the user the ability to further search those results by  "ATI Freight PO#".

 

The problem is, my search function only works on the first "Quote Status" that I have in my code, which in this case is "In Transit".

 

Here is what I have in my Items Property, what am I doing wrong?

 

SortByColumns(Filter('Air Freight: Request & Tracking Log', (StartsWith('ATI Freight PO#', FreightPOSearchInput.Text)) && 'Quote Status'.Value = "In Transit" || 'Quote Status'.Value = "Pending Pickup" || 'Quote Status'.Value = "Quoting"),"Title", Descending)

Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @mkusler 

    Your punctuation is messed up.  Try

    SortByColumns(
     Filter(
     'Air Freight: Request & Tracking Log', 
     StartsWith(
     'ATI Freight PO#', FreightPOSearchInput.Text
     ),
     Or(
     'Quote Status'.Value = "In Transit",
     'Quote Status'.Value = "Pending Pickup",
     'Quote Status'.Value = "Quoting"
     )
     ),"Title", Descending
    )
  • mkusler Profile Picture
    237 on at

    Thank you so much! That worked perfectly. 

     

    If in the future I wanted to add more "StartsWith" functions to give the user the ability to search by other criteria, is that possible or does having multiple functions like that cause confusion?

     

    For example, if I wanted them to be able to search by "Quote #"? 

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @mkusler 

    It is a bit more complicated but it can be done.  Think of it as starting will a big table and filtering it down to a smaller one using the "And" operator to add additional criteria.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @mkusler 

    It is a bit more complicated but it can be done.  Think of it as starting will a big table and filtering it down to a smaller one using the "And" operator to add additional criteria.

  • mkusler Profile Picture
    237 on at

    Awesome! I will see if I can figure it out on my own, now that I have a functioning gallery now.

     

    Appreciate the proofreading! 

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 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard