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 / Build a workflow that ...
Power Automate
Suggested Answer

Build a workflow that auto assigns the next number in a predefined list

(1) ShareShare
ReportReport
Posted on by 28
In a SharePoint list or excel file a range of specific numbers is listed ( see example below).
1) assign each number once in another sharepoint list with metadata
2) identify that number now as been used.
3) the next request use the next unassigned number and so on.

 
998463100
998463101
998463102
998463103
 
Would i start with a take?
I have the same question (0)
  • Suggested answer
    Kalathiya Profile Picture
    1,862 Super User 2026 Season 1 on at
    Hello @CU03101928-1
     
    You can achieve this using a SharePoint list and a flow:
    #1. Create one more column in that number list to indetify that number is used or not.
    #2. Keep all numbers in a list with a Status column (Available/Used)
    #3. Get items where Status = Available and Sort by number
    #4. Pick the first item (next available number)
    #5. After assigning, update that item to mark it as Used.
     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
    ---------------------------------------------------------------------------------

    📩 Need more help? Just mention @Kalathiya and I’ll be happy to assist.

    ✔️ If this answer helped you, please tick “Does this answer your question?” so it can be marked as the Verified Answer.

    💛 A Like always motivates me to keep contributing!

    ​​​​​​​
  • Vish WR Profile Picture
    1,212 on at
     

    Store all numbers in a SharePoint list with a Status (Available/Used). When a request comes in, the flow picks the first available number, assigns it, and marks it as Used so the next one is picked next time.

    High-level flow:

    1. Trigger (new request)
    2. Get items → filter Available, sort ascending
    3. Pick the first item
    4. Update it → mark as Used + add metadata

    Enable concurrency control (1) to avoid duplicates.

    Vishnu WR
     
    Please  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 answering Yes to Was this reply helpful? or give it a Like 


     
  • Suggested answer
    Haque Profile Picture
    2,008 on at
     
     
    You can follow these steps:
     
    1. Store numbers in a sharpoint list. Possible columns ( Number, Assigned(yes/no), AssignedTo (Person/Text) and Metadata fields as needed.
    2. Set the trigger - when a new request comes in - Get Items (retrieve first unassined nimber (filter where Assigned = NO), also use Top Count =1 to get only one item.
    3. Assign the number - update that item in the list (created earlier) and mark it Assigned = Yes. Also add metadata or assign to the requester.
    4. We can record the assignment in another SP list (e.g Assignments) with assigned number and metadata.
    5. Next request repeats the process.
     
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
     
     
  • CU03101928-1 Profile Picture
    28 on at
    @Kalathiya
     
    Pick the first item (next available number)???
    1) I have the two items
     
    2) i have items pulled from the list
     
    },
      "body": {
        "value": [
          {
            "@odata.etag": "\"2\"",
            "ItemInternalId": "1",
            "ID": 1,
            "Title": "998463100",
            "status": "available",
            "Modified": "2026-04-22T15:12:38Z",
            "Created": "2026-04-22T15:11:46Z",
            "Author": {
              "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    {
            "@odata.etag": "\"2\"",
            "ItemInternalId": "2",
            "ID": 2,
            "Title": "998463101",
            "status": "available",
            "Modified": "2026-04-22T15:12:42Z",
            "Created": "2026-04-22T15:11:54Z",
            "Author": {
              "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    {
            "@odata.etag": "\"2\"",
            "ItemInternalId": "3",
            "ID": 3,
            "Title": "998463102",
            "status": "available",
            "Modified": "2026-04-22T15:12:42Z",
            "Created": "2026-04-22T15:11:59Z",
            "Author": {
              "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     
    How do i pick the first one?
    thank you
  • CU03101928-1 Profile Picture
    28 on at
    also use Top Count =1 to get only one item
    AAAAAAAAAAAAHHHHHH that works
  • Kalathiya Profile Picture
    1,862 Super User 2026 Season 1 on at
    Hello @CU03101928-1
     
    You can use index to get the record.
     
    Request Number - Title
    - Add compose action and write below expression - It will store the request number. 
    outputs('Get_items')?['body/value']?[0]?['Title']
    We will use ID for update item after number is assigned so add one more compose to store the ID:
    outputs('Get_items')?['body/value']?[0]?['ID']
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
     
     
     
  • CU03101928-1 Profile Picture
    28 on at
     
    Thank you , you have hit on a topic that i struggle with.
    why wont the following work? 
    outputs('Get_items')?['body/value/Title'] or outputs('Get_items')?['body/Title']
    i struggle with syntax....
    thank you.
  • CU03101928-1 Profile Picture
    28 on at
    you have been so helpful.....
     
    1) at each fill of numbers there will be between 1000 to 1200 numbers added.
    2) is there a way when the number if available numbers reach x amount or less 
    ( say 500) i can send a reminder to an administrator that we need more numbers from the state?
    thank you.
     
  • Vish WR Profile Picture
    1,212 on at
     
    Thanks for the update. If you have the issues, update the response a verified 
     
    Thanks
    Vishnu

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 516

#2
Valantis Profile Picture

Valantis 477

#3
Vish WR Profile Picture

Vish WR 470

Last 30 days Overall leaderboard