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 / Gallery sort by new en...
Power Apps
Answered

Gallery sort by new entries

(0) ShareShare
ReportReport
Posted on by 156

Hello Community,

 

How can i sort my gallery to show new entries to show at the top instead of at the bottom. The current item property of my gallery is this

 

Filter(
    'ONBOARDING FORM',
    Or(
        IsBlank(Dropdown2.Selected),
        Status.Value = Dropdown2.Selected.Value

    ),
    Or(
        gblIsCurrentUserAdmin,
        'Submitted by'.Email = gblCurrentUser
    )
)
Categories:
  • Verified answer
    AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    Hi @JonathanL82 

     

    Wrap your current formula inside a Sort function:

     

    Sort(
     Filter(
     'ONBOARDING FORM',
     Or(
     IsBlank(Dropdown2.Selected),
     Status.Value = Dropdown2.Selected.Value
     ),
     Or(
     gblIsCurrentUserAdmin,
     'Submitted by'.Email = gblCurrentUser
     )
     ),
     'Created On',
     SortOrder.Descending
    )

     

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

  • JL82 Profile Picture
    156 on at

    @AARON_C i get multiple errors for this.

  • AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    @JonathanL82 

     

    What are the errors you are getting?

  • JL82 Profile Picture
    156 on at

    @AARON_C mostly for the formulas on the top.

  • AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    @JonathanL82 

     

    Okay so your initial Filter formula is not working? What are the errors?

  • JL82 Profile Picture
    156 on at

    @AARON_C yes after i put the sort formula, the filter formula starts to get errors . 

  • AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    @JonathanL82 

     

    Please share what the errors are. Can you show me what you have in the Items property of your gallery.

  • JL82 Profile Picture
    156 on at

    hi @AARON_C  This is what i have on my items property

     

    Sort(
      Filter(
        'ONBOARDING FORM',
        Or(
          IsBlank(Dropdown2.Selected),
          Status.Value = Dropdown2.Selected.Value
        ),
        Or(
          gblIsCurrentUserAdmin,
          'Submitted by'.Email = gblCurrentUser
        )
      ),
      'galOnboardingForm',
      SortOrder.Descending
    )
     
    The error i get is "cannot sort on expression type"
  • JL82 Profile Picture
    156 on at

    @AARON_C  this one worked

     

    Sort(
      Filter(
        'ONBOARDING FORM',
        Or(
          IsBlank(Dropdown2.Selected),
          Status.Value = Dropdown2.Selected.Value
        ),
        Or(
          gblIsCurrentUserAdmin,
          'Submitted by'.Email = gblCurrentUser
        )
      ),
      Created,
      SortOrder.Descending
    )
  • AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    @JonathanL82 

     

    Isn't this what you wanted to achieve? (Using 'Created On' to filter new records to be displayed at the top of the gallery)

     

    What is galOnboardingForm? Is this the name of your gallery?

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard