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 / Adding a Sort to a Gal...
Power Apps
Answered

Adding a Sort to a Gallery already filtered multiple times

(0) ShareShare
ReportReport
Posted on by 27

Hi there,

 

I am attempting to sort the following function but can't quite seem to get the syntax right. Its a couple of dropdowns with a couple of StartsWith:

 

Filter('Invoice Certification',(Status.Value=Dropdown1.Selected.Value||If(Dropdown1.Selected.Value="- Filter by Status -", true , false ))&&('KC POC'.Value=Dropdown4.Selected.Value||If(Dropdown4.Selected.Value="- Filter by KC POC -", true , false ))&&(StartsWith('Invoice Number',SearchInput1.Text)||StartsWith(Title,SearchInput1.Text)))

 

Thanks so much!

Ben

Categories:
I have the same question (0)
  • Verified answer
    BhaskarDhone Profile Picture
    1,398 Super User 2026 Season 1 on at

    always format the code to read it right.

    Try this

     

    SortByColumns(
     Filter(
     'Invoice Certification',
     (Status.Value = Dropdown1.Selected.Value || Dropdown1.Selected.Value = "- Filter by Status -"),
     ('KC POC'.Value = Dropdown4.Selected.Value || Dropdown4.Selected.Value = "- Filter by KC POC -"),
     (StartsWith('Invoice Number', SearchInput1.Text) || StartsWith(Title, SearchInput1.Text))
     ),
     "Invoice Number",
     SortOrder.Ascending
    )

     

  • bdransf1 Profile Picture
    27 on at

    Thank you so much! That did it. I was missing 1 comma... 🙄

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 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard