How to Create a Custom-Prefix Unique ID in Microsoft Lists
Question details
The user wants to generate a unique item ID with a custom text prefix and leading zeros (e.g., D&I-000001) when adding new items to a Microsoft List.

- Product
- Microsoft Lists / Power Automate
- Device & OS
- not provided
- Scenario
- Adding a new item to a Microsoft List and needing a formatted, easily recognizable unique identifier for tracking purposes.
- Observed behavior
- Microsoft Lists only generates a default numeric ID and lacks built-in support for custom text prefixes or zero-padded formatting.
Ensure you have the necessary permissions to create and edit Power Automate flows for your Microsoft List, and verify that your list contains a dedicated 'Single line of text' column to store the new custom ID.
Use Power Automate to Generate a Custom Prefix ID
Set up an automated cloud flow that triggers upon item creation to format the default numeric ID with leading zeros and your custom prefix.
Since Microsoft Lists does not natively support custom ID formatting, Power Automate is the standard method for taking the system-generated ID, padding it with zeros, and attaching a prefix.
This process involves creating a flow that triggers when a new item is added, calculates the formatted string, and updates the item with the final custom ID.
Open your Microsoft List, click 'Add column', select 'Single line of text', and name it 'Custom ID' (or your preferred name).
Log into Power Automate, click 'Create' in the left menu, and select 'Automated cloud flow'. Name your flow and choose the trigger 'When an item is created' (SharePoint).
In the trigger setup, select your Site Address and the specific List Name from the dropdown menus.
Add a 'Compose' action. In the Inputs field, use an expression to format the ID. For example: concat('D&I-', formatNumber(triggerOutputs()?['body/ID'], '000000')). This adds the prefix and pads the default ID to six digits.
Add an 'Update item' action. Select your Site Address and List Name again. Map the 'Id' field to the dynamic 'ID' from the trigger, and map your 'Custom ID' column to the 'Outputs' of the Compose action. Save and test your flow.

Manage Lists and Data Easily with WPS Office
If setting up Power Automate flows for simple formatting tasks feels too complex, try managing your structured data with WPS Spreadsheet. It is a free, lightweight alternative to Microsoft Office that lets you generate custom IDs instantly using basic formulas without relying on external automation tools.
- 1. Download WPS Office: Install the free WPS Office suite on your computer or mobile device.
- 2. Create a Data Tracker: Open WPS Spreadsheet and set up your columns for easy data entry.
- 3. Apply a Custom ID Formula: Use a formula like `="D&I-" & TEXT(ROW(A2)-1, "000000")` to automatically generate custom-prefix IDs as you type new rows.

Frequently Asked Questions
Can I change the default ID column format in Microsoft Lists directly?
No, the default ID column in Microsoft Lists is a read-only, system-generated numeric field. You cannot modify its format or add prefixes directly. You must use a separate column and populate it via Power Automate.
Will the Power Automate flow update existing items in my list?
A flow triggered by 'When an item is created' will only apply to new items added after the flow is turned on. To update existing items, you would need to build a separate manual or scheduled flow to loop through and update older entries.
Why does my custom ID show up blank right after creating an item?
Power Automate flows run asynchronously in the background. It may take a few moments for the flow to trigger, process the formatting, and update the list item. Refreshing the page after a few seconds will typically reveal the updated value.




