logo
search
Others

How to Create a Power Automate Formula with Prefix and Padded SharePoint ID

Khadija KhanKhadija Khan Sep 30, 2026 868 views

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.

Create a Power Automate Formula with a Prefix and Padded SharePoint 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).
Before you start

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.

Solution 1Recommended

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.

1
Add a Compose Action

In your Power Automate flow, click on 'New step' and search for 'Compose'. Add the 'Data Operations - Compose' action to your workflow.

2
Enter the Concatenation Expression

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.

3
Save and Test the Flow

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.

Use Concat and FormatNumber Expressions
Expression Tip: Always double-check your dynamic content references. If your trigger is different from a standard SharePoint trigger, you may need to adjust the triggerBody() portion to match your specific action output.
Free Microsoft Office alternative

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. 1. Download the Installer: Visit the official WPS Office website and click the free download button for your operating system.
  2. 2. Install WPS Office: Run the downloaded installation file and follow the quick on-screen instructions to set up the software.
  3. 3. Open Your Office Documents: Launch WPS Office and directly open your existing .docx, .xlsx, or .pptx files with full formatting compatibility.
Free and lightweight Office suite for everyday tasksFully compatible with Microsoft Excel, Word, and PowerPoint formatsFamiliar user interface for seamless migration and zero learning curvePowerful built-in tools for analyzing workflow data and reports
microsoft office alternative - wps office

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.