How to Create a Power Automate Formula with Prefix and Padded SharePoint ID
Question details
The user needs to create a Power Automate flow expression that combines a static text prefix, a dynamic value from a SharePoint list column, and a two-digit, zero-padded SharePoint item ID.

- Product
- Power Automate
- Device & OS
- not provided
- Scenario
- Generating a formatted custom string identifier in a Power Automate workflow.
- Observed behavior
- The goal is to automatically format single-digit SharePoint IDs with a leading zero (e.g., 01, 09) and concatenate them with a static prefix and another column's value (e.g., CMNEM_Y_01).
Ensure you have an active Power Automate flow connected to your SharePoint list, and verify the exact internal names of the columns (such as Column1 and ID) that you intend to use in your expression.
Use Concat and FormatNumber Expressions
This is the primary method to combine strings and enforce a two-digit format for your SharePoint item ID.
By utilizing the concat() function, you can join multiple strings together. The formatNumber() function ensures that any single-digit SharePoint ID is padded with a leading zero.
In your Power Automate flow, click on 'New step' and search for 'Compose'. Add the 'Data Operations - Compose' action to your workflow.
Click inside the Inputs field of the Compose action, switch to the 'Expression' tab, and paste the following formula: concat('CMNEM_', triggerBody()?['Column1'], '_', formatNumber(triggerBody()?['ID'], '00')). Replace 'Column1' with your actual internal column name.
Click 'OK' to save the expression, then save your flow. Run a test by triggering the flow with a SharePoint list item to verify that it correctly outputs a value like CMNEM_R_09.

Troubleshooting Missing Column Values and UI Issues
Use this approach if your flow results in incomplete strings (e.g., CMNEM_09) or if the Power Automate designer is glitching.
Boost Your Productivity with WPS Office
While Power Automate handles your complex SharePoint workflows, WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office for all your daily document, spreadsheet, and presentation needs.
- 1. Download the Installer: Visit the official WPS Office website and click the free download button for your operating system.
- 2. Install WPS Office: Run the downloaded installation file and follow the quick on-screen instructions to set up the software.
- 3. Open Your Office Documents: Launch WPS Office and directly open your existing .docx, .xlsx, or .pptx files with full formatting compatibility.

Frequently Asked Questions
Why is the SharePoint column value missing from my formatted string?
If your result looks like 'CMNEM_09' instead of 'CMNEM_R_09', it usually means the dynamic content field (like Classification or Column1) was empty or referenced incorrectly in the expression. Ensure the column contains data and that you are using the correct internal column name.
How do I pad a SharePoint ID with three leading zeros in Power Automate?
To pad an ID with three digits, you can adjust the formatNumber function in your expression to use three zero placeholders. For example, use formatNumber(triggerBody()?['ID'], '000') to produce results like 001 or 045.
What should I do if my flow editor behaves unexpectedly while saving expressions?
Sometimes the modern flow designer experiences temporary glitches. You can switch to the classic designer by changing the end of the flow URL from 'true' to 'false'. Reload the page, and try running or saving the flow again.




