SharePoint Document Issues

How to Generate a Unique Project Number in SharePoint with Power Automate

Steven ParkerSteven Parker Oct 28, 2026 870 views

Question details

The user wants to create an automated process to generate custom, unique project identifiers (e.g., P220001) in a SharePoint list.

How to Generate a Unique Project Number in SharePoint with Power Automate
Product
SharePoint and Power Automate
Device & OS
not provided
Scenario
Setting up a SharePoint list where each new project entry requires a strictly unique, formatted ID containing a prefix, the current year, and a sequential number.
Observed behavior
The user needs a reliable method to construct and assign this unique project number without encountering concurrency issues common with standard calculated columns.
Before you start

Ensure you have the necessary permissions to edit the target SharePoint list and create flows in Power Automate. It is recommended to create a dedicated 'ProjectNumber' column in your list before building the flow.

Solution 1Recommended

Build a Power Automate Flow to Generate Sequential Identifiers

Use Power Automate to extract the current year, format a sequential number, and combine them into a custom ProjectNumber field.

Relying solely on the default SharePoint ID in calculated columns can lead to duplication errors if multiple users create items simultaneously. A dedicated Power Automate flow offers a more robust solution for strict uniqueness.

1
Create a trigger

In Power Automate, create an automated cloud flow that triggers 'When an item is created' in your target SharePoint list.

2
Get the current year

Add a 'Compose' action and use the expression formatDateTime(utcNow(),'yy') to extract the two-digit current year.

3
Format the sequential number

Retrieve the item's unique SharePoint ID or a custom sequence number, and use an expression or a formatting action to pad it with leading zeros (e.g., creating a 5-digit number).

4
Combine the identifier elements

Add another 'Compose' action to concatenate the prefix, the year, and the sequential number. For example: P@{outputs('Compose')}@{body('Format_number')}.

5
Update the SharePoint item

Add an 'Update item' action to write the newly generated unique string back into the 'ProjectNumber' column of the SharePoint list.

Build a Power Automate Flow to Generate Sequential Identifiers
Concurrency Control: For highly active lists, consider using a separate tracking list to lock and assign sequence numbers securely to avoid duplication during simultaneous entries.
Free Microsoft Office alternative

Manage Project Documents Efficiently with WPS Office

While Power Automate and SharePoint handle list automation, you still need a reliable suite for your project documentation. WPS Office is a lightweight, highly compatible alternative to Microsoft Office, perfect for creating project proposals, reports, and spreadsheets without the heavy subscription costs.

  1. 1. Download and install: Visit the official WPS Office website and download the free installation package for your operating system.
  2. 2. Open your project files: Launch WPS Office and open your existing Microsoft Office project documents directly without any format conversion.
  3. 3. Edit and collaborate: Use the built-in Writer, Spreadsheet, and Presentation tools to manage your project workflows and save them in standard Office formats.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx).Free and lightweight suite, consuming minimal system resources.Built-in PDF editing tools for securing and sharing project deliverables.Familiar tabbed user interface ensures a seamless transition for Microsoft Office users.
microsoft office alternative - wps office

Frequently Asked Questions

Can I use a SharePoint Calculated Column instead of Power Automate for unique IDs?

While you can use a Calculated Column to append prefixes to the default SharePoint ID, it is not recommended for strict uniqueness. The ID is only assigned after the item is created, which can cause calculation delays or errors during concurrent entries.

How do I add leading zeros to a number in Power Automate?

You can format numbers with leading zeros using the formatNumber function or by using string manipulation expressions like substring(concat('00000', triggerOutputs()?['body/ID']), sub(length(concat('00000', triggerOutputs()?['body/ID'])), 5), 5).

Will the flow trigger an infinite loop when updating the SharePoint item?

It can, if not configured properly. To prevent an infinite loop, add trigger conditions to your flow settings so it only runs when the 'ProjectNumber' column is empty.