Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Suggested answer

When a date is added to an item, create an incrementally numbered list

(1) ShareShare
ReportReport
Posted on by 4
I am new to Sharepoint Lists and Power Automate flows.  I have researched this issue, but I can't seem to find a flow that is what I'm looking for.  
 
I have a Sharepoint list for a client waiting list.  I have a column named "Date Cleared".  When I add the cleared date for the client, I would like a number to populate in the "Waitlist #" column.  When a client is removed from the client waiting list, the client who was #2 will become #1, and so forth.
 
I don't think this is possible with calculated columns, but is there a flow that will make this work?
 
 
  • MD-28072010-0 Profile Picture
    4 on at
    When a date is added to an item, create an incrementally numbered list
    Thank you for the suggestions.  The wait list is based on the date cleared column, and the earliest date cleared should be #1 on the waitlist.  
     
    I currently have dates in the Date Cleared column.  I deleted a date for one of the records, saved the list, and then readded the date.  I created the flow, but it isn't running when I add a date.  
     
    Here is my flow:
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
  • Nived_Nambiar Profile Picture
    17,705 Super User 2025 Season 1 on at
    When a date is added to an item, create an incrementally numbered list
     
    what logic we should use for determing the wait list ? is it based on Date Cleared column ? 
     
    Like the earliest date cleared should be given high priority ?
     
    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you! 

     
  • Suggested answer
    TomMoody Profile Picture
    113 on at
    When a date is added to an item, create an incrementally numbered list

    Objective

    1) Increment Waitlist by 1 when Date Cleared is added
    2) When item is deleted, reduce waitlist # for all remaining items by 1
     

    Solution

    Here is my example dataset:
     
    We need 2 separate flows to deal with objectives 1 and 2
     

    Flow 1 - Populate Waitlist #

    Use 1 trigger condition to only execute when Date Cleared contains data (because you will have just updated this).
    Use a 2nd trigger condition to make sure the flow doesn't execute if item already has a Waitlist #
     
    "
    @not(empty(triggerBody()?['Date Cleared']))
    @empty(triggerBody()?['Waitlist'])
    "
    This will ensure it only executes when an item is first given a Date Cleared, otherwise it will trigger anytime you update an item with a Date Cleared value.
     
     
    Then get we want to get all items in the list and find the highest waitlist number. Then increment it by 1 and update our trigger item with this value. This creates your queue logic.
     
    Use OrderBy and Top Count parameters in 'Get Items' to achieve this
     

    Use compose to increment (it will create an apply to each loop for you)


    Update Waitlist
    ​​​​​​​




    Flow 2 - De-Populate Waitlist

    I can't help you deal with this part without some more info.
     
    - Will you be deleting clients from the List once they've been seen or will you simply remove their waitlist value?
    - What order will you delete clients from the List? Will the lowest number always be the first seen i.e 1st in the queue always seen before 2nd?
     
    My suggested approach is to increment the Waitlist value of all rows where Waitlist > the one being deleted/removed from waitlist and this should work.

    Things to consider

    Don't check too regularly for updated items in the trigger action, this reduces the likelihood of the flow executing while you are in the middle of updating an item and triggering multiple times when you only want it to execute once.
     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    43,156 Super User 2025 Season 1 on at
    When a date is added to an item, create an incrementally numbered list
    Hi,
     
    Can you share please what you already tried? We want people to learn and there are zillions of examples if you look step by step versus us just writing it for you.
     
    But here is the Pseudo
     
    1. Create an Automated Flow for when an Item is Updated
    2. Use the Get Changes to see if your specific Field was changed or not
    3. Add a Condition to verify that from the Get Changes your Date Field is changed
    4. In the Yes side, check the value just so you are certain of whatever criteria you want to add the Date Cleared
     
    You said -  I would like a number to populate in the "Waitlist #" column
    I am going to stop there, as adding a number is easy
     
    5. Add an Update Item, in the Yes side of the Condition that verified that the column you wanted changed did change.
    In the Update Item, use the ID from the Trigger to update the date of the row you want to update
     
    And Done.
     
    Now you also asked
    When a client is removed from the client waiting list, the client who was #2 will become #1, and so forth
     
    I do not know how to help on this as there are no details. What waiting list, is this a Sharepoint list? is this a different list than the above list?
     
    So I'll make assumptions
    1. Create another automated Flow with a Trigger for when an item is update or added or deleted
    2. I have no idea if you actually want these rows deleted or what
    3. I am assuming you have some column that is a pure whole number??? I dont know its not stated
    4. But you would want to iterate through the Records and Update the Customers Number
     
    also is any of this in an app? Because it would be much easier and faster but seems only in SharePOint and Power Automate? 

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >