Skip to main content

Notifications

Power Apps - Building Power Apps
Suggested answer

Display records in gallery in the same order as in SP list

(1) ShareShare
ReportReport
Posted on by 158
Hello!
 
I have a SP list with records where I can move a record by dragging it down or up - change it's position in a list. All of orders have it's ID number and I noticed that when I view my list on the app, the gallery is displaying my SP list in order by ID number. How do I view this list in gallery in the same order as it is in SP list, please? 
 
 
Categories:
  • WarrenBelz Profile Picture
    WarrenBelz 145,567 on at
    Display records in gallery in the same order as in SP list
    Hi @MP-13011217-0​​​​​​​
    SharePoint "order" is by default sorted by the ID. I suspect your SharePoint view is sorted by another field and you need to sort in Power Apps by the same field/s
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee
  • Suggested answer
    Mitanshu Profile Picture
    Mitanshu 1,609 on at
    Display records in gallery in the same order as in SP list

    If your SharePoint list does not already have a field to track the custom order (since users can drag and drop), you should add a "Position" or "Order" column to your SharePoint list. This column can be a Number field where you manually or programmatically set the order for each record.

    If you allow users to drag and drop records, you’ll need to update the "Position" column to reflect the new order. 

    You need to modify the Items property of the gallery to order the records based on the "Position" column instead of the default ID.

    SortByColumns(YourSharePointListName, "Position", 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