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 Automate / Number items in a Shar...
Power Automate
Unanswered

Number items in a SharePoint list based on sort order

(0) ShareShare
ReportReport
Posted on by

Bit of an unusual one; but I am looking at a solution to manage physical records, which are ordered in a specific way.

I have the sort order set, but I'm looking for the SharePoint list to also show a 'position number' of each item - so that when browsing the data you can easily find the corresponding physical item.

 

My thinking is a Flow that looks at the SharePoint data, and applies a number to a 'position' column in each record in sequence based on the sort order I set - if that makes sense?

 

i.e with an alphabetical sort...

Apples, Pears, Bananas

...would become...

1 Apples, 2 Bananas, 3 Pears

 

Add in another record and the Flow would re-number the list:

1 Apples, 2 Bananas, 3 Kiwis, 4 Pears

 

Would appreciate any ideas as to how I could achieve this. Thanks!

Categories:
I have the same question (0)
  • efialttes Profile Picture
    14,756 on at
    Hi!
    Let's assume you have a single line of text called 'myCurrentColumn' in your Sharepoint List, with all the items you wanna order in alphabetical order
    So you nned to do a 'Get items', get response ordered by means of assigning the following expression to 'Order by' input:
    myCurrentColumn asc

    Now, add an initialize variable, let's call it counter, type integer, value 1
    Next, add an 'Apply to each', assign as its input 'Get items' output.
    Inside 'Apply to each':
    -add an Update item action block, assign to you target column variable 'counter', you can add also content of 'myCurrentColumn'
    -add an Increment variable action block, name 'counter', value 1

    Hope this makes sense

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 Automate

#1
Valantis Profile Picture

Valantis 460

#2
Vish WR Profile Picture

Vish WR 343

#3
David_MA Profile Picture

David_MA 249 Super User 2026 Season 1

Last 30 days Overall leaderboard