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 / How to change alphabet...
Power Apps
Suggested Answer

How to change alphabetical order of collection in powerapps

(0) ShareShare
ReportReport
Posted on by 10
I am collecting data from gallery in collection "colstatus" with columns as "Name", "Current Status", "Role" and "Sr". Currently it is show in alphabetical order.
How can i change order so that it shows column in order as "Sr", "Name", "Current Status" and "Role"?
 
Thanks for helping. 
Categories:
I have the same question (0)
  • Suggested answer
    mmbr1606 Profile Picture
    14,615 Super User 2026 Season 1 on at
    hey
     
     
    can u try this:
    ClearCollect(
        colstatus,
        ForAll(
            colstatus,
            {
                Sr: ThisRecord.Sr,
                Name: ThisRecord.Name,
                'Current Status': ThisRecord.'Current Status',
                Role: ThisRecord.Role
            }
        )
    );
    
    if it helped please mark my answer as verified,
     
     
    cheers
  • nemo7512 Profile Picture
    10 on at
    @mmbr1606
    Thanks for you response but i have already tried this and it is not working for me.
  • mmbr1606 Profile Picture
    14,615 Super User 2026 Season 1 on at
    hey 
     
     
    thanks for replying. what is the use case to reorder the columns in the collection?
    i guess this is not really possible, the below code was the only idea i had on this topic
     
     
    cheers
  • Suggested answer
    timl Profile Picture
    36,774 Super User 2026 Season 1 on at
    Hi nemo7512 
     
    Rather than reorder the items in the collection, the typical approach is to sort the collection in the place where you want to use it.
     
    For example, let's assume that you want to show colstatus in a gallery. You would set the Items property of the gallery to the following:

     
    SortByColumns(
      colstatus,
      "Sr", SortOrder.Ascending, 
      "Name", SortOrder.Ascending, 
      "Current Status", SortOrder.Ascending,
      "Role" SortOrder.Ascending
    )
     
    If you actually want to reorder the collection, it would look like this:
     
    ClearCollect(
       colstatus,
       SortByColumns(
          colstatus,
          "Sr", SortOrder.Ascending, 
          "Name", SortOrder.Ascending, 
          "Current Status", SortOrder.Ascending,
          "Role" SortOrder.Ascending
        )
    )
     
     
  • Suggested answer
    SebS Profile Picture
    4,803 Super User 2026 Season 1 on at
    I'm not sure why You want to reorder Columns in the collection but if You want to do that You need to use ShowColumns:
    ClearCollect(
        colStatusReordered,
        ShowColumns(
            colstatus,
            "Sr",
            "Name",
            "Current Status",
            "Role"
        )
    )

     
  • RBoneck Profile Picture
    415 on at
    I'm sorry that I don't have an answer for you. I've been trying to figure out the same thing!

    To those wondering about a use case for this, I'm trying to send collections from an app to a flow that will turn whatever collection is sent into a csv file to be emailed. Except that all the fields are in the wrong order no matter how I make the collection in the app. The fields can't be reordered in the flow because I very specifically do not want to hardcode field names, since this same flow is being used for multiple different collections. But I guess I never noticed before that collections made in powerapps always have their fields in alphabetical order instead of the order in which the fields were listed/added. It's driving me nuts because flow does not do that; it holds the order you added those fields in.

    At this point my only idea is to put numbers in my field names in the app so they sort themselves!
  • timl Profile Picture
    36,774 Super User 2026 Season 1 on at
     
    Have you tried re-collecting with a SortByColumns before calling your flow, as suggested below?

     
    ClearCollect(
       colstatus,
       SortByColumns(
          colstatus,
          "Sr", SortOrder.Ascending, 
          "Name", SortOrder.Ascending, 
          "Current Status", SortOrder.Ascending,
          "Role" SortOrder.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

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 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard