Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

sort by ascending order in gallery

(0) ShareShare
ReportReport
Posted on by 395

Hi, having some issues trying to get my gallery to sort a field by ascending order. I currently have my galley filtered,

Filter(ProcedureCollect, Arrangement = Label77.Text && Engine = Label86.Text)

but would also like to have it show the gallery results in ascending order from a field in the gallery called 'Sequence', something like below.
Filter(ProcedureCollect, Arrangement = Label77.Text && Engine = Label86.Text),Sort(Sequence,SortOrder.Ascending)
(The collection is from a sharepoint library and the sequence field is a number field). I have tried a few variations without luck, any assistance would be much appreciated 

 

Categories:
  • Matt383 Profile Picture
    Matt383 395 on at
    Re: sort by ascending order in gallery

    Thanks turnerj3, i missed that 😉 Added the missing sort and worked with Sequence,SortOrder.Ascending

  • Verified answer
    turnerj3 Profile Picture
    turnerj3 2,039 on at
    Re: sort by ascending order in gallery

    @Matt383 , 

    Make sure you put the filter inside of Sort().

    See @zmansuri response as well. It should work also.

  • Matt383 Profile Picture
    Matt383 395 on at
    Re: sort by ascending order in gallery

    Matt383_0-1682566961093.pngMatt383_1-1682566991659.pngMatt383_2-1682567022241.png

    Thanks for getting back to me turnerj3, results above

  • turnerj3 Profile Picture
    turnerj3 2,039 on at
    Re: sort by ascending order in gallery

    Try this:

    Sort(Filter(ProcedureCollect, Arrangement = Label77.Text && Engine = Label86.Text),Sequence,Ascending)

  • zmansuri Profile Picture
    zmansuri 6,048 on at
    Re: sort by ascending order in gallery

    SortByColumn(Filter(ProcedureCollect, Arrangement = Label77.Text && Engine = Label86.Text),"Sequence",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,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard