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 / Relative Ordering - Dy...
Power Automate
Answered

Relative Ordering - Dynamic Priority Column

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I'm trying to create a flow that is connected to a SharePoint List. 

List Columns and Data Types

  1. Priority (Required): Integer
  2. Domain (Required): Choice
  3. ID (Required): Auto
  4. Title (Required): Single Line Text
  5. Primary Owner (Required): Person
  6. Secondary Owner (Required): Person

Objective: Automatically update the Priority field based on user modifications

 

Example:

 

PriorityDomainIDTitlePrimary OwnerSecondary Owner
1Writing1Task AJoeSally
2Reading2Task BJonJane
3Listening3Task CSallyJoe

 

  • User adds a new task, Task D, with Priority value "1"
    • List automatically increments the priority values of Tasks A, B, and C to 2, 3, and 4. (The current priority values shift down in priority)
  • User completes Task B and it is removed from the list
    • List automatically decrements the priority value of Task C to replace Task B. (The current priority values shift up in priority when an item is removed)
  • User changes the priority value of Task C to value "1"
    • List automatically increments Tasks A and B to be 2 and 3, respectively. (The current priority values shift down when an item is modified to be a higher priority)

I have been using variables, and controls [Condition and Do until] to create a flow. But the main two problems I am running into are the flow continuously running and seemingly disregarding the condition [I refresh the list and priority values are all above 50], and that the flow changes the created item's priority along with all of the existing items. If a user creates an item and sets the priority to 1, it should remain 1 after the list has run through the flow. 

 

Any help or suggestions is greatly appreciated! Thank you!

Categories:
I have the same question (0)
  • Verified answer
    v-litu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    What is the basis for prioritizing the first few tasks, such as tasks A, B, C? If it is based create time, it is easy to do, in order them and increases their Priority.

    For the first requirement that new item created, give its Priority value "1" and automatically increments the priority values of Tasks A, B, and C, use Get items and Update item actions could do.

    But the second and third requirements are too complex. It involves at least two very complex sorting algorithms. At present, it is not supported to implement your requirements in a simple way in Flow.

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • acbcallahan Profile Picture
    4 on at

    Does anyone have any other ideas on accomplishing tasks B and C as explained above? We also need this exact functionality. If it's not possible to do this automatically, is it possible to do this through a few different manually-triggered automations? I find it hard to imagine that nobody has implemented something like this. 

     

    In our use case, we have a column that tracks priority. Initially we populate this column according to a few different variables, but we need to be able to manually adjust the relative priorities after the initial values are input, and we need all the other values to adjust accordingly (i.e. values that are equal to or greater than the input value increment up by one). 

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 Automate

#1
Haque Profile Picture

Haque 541

#2
Valantis Profile Picture

Valantis 479

#3
Vish WR Profile Picture

Vish WR 470

Last 30 days Overall leaderboard