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 / Custom order of items ...
Power Apps
Answered

Custom order of items in a gallery

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi everyone,
I'm struggling with this issue: i want to order my items in a customized way, not ascending or descending, but just in the order that I need... for example, I have to order the phases of a production process, and these (obviously) aren't in alphabetical order...
It is possible? How it can be done?

Thank you for your help!

Categories:
I have the same question (0)
  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Hi @Anonymous,

    You can use the addcolumn function in the item property of the gallery to add numeric values to the items.

    For example,

    Your items property could be (assuming Production is the datasource)

    SortByColumns(AddColumns( Production, "PhaseSortOrder", If(Phase = "PhaseA" , 1, If(Phase = "PhaseB", 2), If(Phase = "Phase3", 3))), "PhaseSortOrder", Ascending)

    Please let me know if this helps and mark this reply as the solution. Thanks!
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It works perfectly! On your advise, I preferred to add a column in my Sharepoint database which describes the priority of the phase and to patch it as you said.

    Thank you a lot!

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Perfect, that makes sense! Glad I could help!

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 491

#2
WarrenBelz Profile Picture

WarrenBelz 407 Most Valuable Professional

#3
11manish Profile Picture

11manish 331

Last 30 days Overall leaderboard