Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Auto-sequence number field in list or document library



I need to create a document library where we can store our controlled documents with the following additional columns like Fiscal Year, Team, Document Type and Sequence Number.

The fields except for the Sequence Number field will be manually filled up by the user however I want the Sequence Number field to be automatically filled up so the user won't have to look at the current contents of the library to determine what should be the sequence number of the file. This Sequence number cannot be based on the ID field because the number will depend on the other fields I mentioned earlier. For example, there could be many documents that has the same sequence number, 001 for example, because they are the first one from a specific combination of Fiscal Year, Team and Document Type. See example below:


I was able to automate the sequence number field using a flow that triggers when a document is created/uploaded however this won't work for a library that requires check-in/out because the flow can't edit a checked out item (at least as far as I know).


How can I implement this? Are there other means aside from Flow? PS: Workflows are currently not an option.

Community Support Team
Community Support Team

Re: Auto-sequence number field in list or document library

Hi @ PetersonBriones,

What is the specific combination rule of Fiscal Year, Team and Document Type for the “sequence number” column in sharepoint library?


I have made a test on my side, the flow could edit a checked out item in sharepoint library.


I have created a sharepoint library with an checked out item as screenshots below:


A flow to update the checked out item in sharepoint library as screenshots below:


The flow would run successfully as below:


And the checked out item would be updated as below:





Alice Zhang

Level: Powered On

Re: Auto-sequence number field in list or document library

Hi Alice


Thanks for your reply.

Was this document checked out to you? If so, then the flow should work. However, the problem would be when the document was created and checked out by another user because the credentials used by the flow are mine (flow creator) and not his/hers.

Level: Powered On

Re: Auto-sequence number field in list or document library

What's the best practice for auto-generating the next number purely from a list?

Level 8

Re: Auto-sequence number field in list or document library

Store the NextNum in a separate single record list (SystemList or whatever), get this value, apply to document record, increment variable, update SystemList.

Helpful resources


Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!


Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users online (5,585)