You are currently viewing How to combine strings in Power Automate

How to combine strings in Power Automate

When working with Power Automate, also known as Microsoft Flow, it is common to need to combine two or more strings together. Combining strings is a useful operation that can be used to create dynamic content, generate unique identifiers, or create file names, among other things.

Fortunately, Power Automate provides several functions that make it easy to combine strings. In this post, we’ll explore How to use Concat function to combine strings in Power Automate, and provide step-by-step instructions on how to use them. Whether you’re a beginner or an experienced Power Automate user, this guide will help you master the art of string concatenation in Power Automate.

How to Combine two columns in Power Automate
Combine strings in Power Automate

Combine strings in Power Automate

One common task in Power Automate is combining two or more strings together. This can be useful for generating unique identifiers, creating file names, or simply concatenating text for use in other parts of your workflow. In this post, we’ll explore how to combine strings in Power Automate using the Concatenate function.

Concatenate function in Power Automate

The Concatenate function is one of the simplest ways to combine two or more strings in Power Automate.

The syntax of Concat function in Power Automate

Concat function in Power Automate takes multiple text inputs and concatenates them together into a single output string.

concat(text 1, text 2. text 3)

How to use Concatenate function in Power Automate

In this example, consider we have the below SharePoint List that has three columns (First Name, Last Name, and Full Name), and you need to concatenate the First Name with the Last Name columns and set the result to the Full Name.

Combine Strings in Power Automate
Combine strings in Power Automate

To combine two columns in a SharePoint List on Item Adding, we have to use the Concat function in Power Automate by doing the following:

Steps

  1. Open your SharePoint List where you want to combine two columns.
  2. From the above toolbar, click on “Integrate” > “Power Automate” > “Create a flow“.
Create a flow to combine strings in Power Automate
  1. The suggested flow templates will be opened, click on “See More“, then select “When a new item is added in SharePoint, complete a custom action” template.
concat strings when an item added in Power Automate
  1. The Power Automate portal will be opened, and if you are not sign in, provide your credentials to create your flow.
  2. Now, review the flow connectors, and if everything is OK, click on “Continue” to proceed.
Create a flow when an item added in Power Automate
  1. The flow studio will be opened to build your flow, search for “Update Item“.
Update item action in Power Automate
  1. Great the “Update Item” action has been added, fill the required fields (Site Address, and List Name) from drop down list, then provide the required fields from “Dynamic Content“as stated below.
Concatenate two strings in Power Automate
Concatenate two strings in Power Automate
  1. Now, Click “Full Name” field, then click on expression, and just type “concat” function as below.
how to Concatenate two strings in Power Automate
Combine strings in Power Automate
  1. Switch back to “Dynamic Content” to select the “First Name”, and “Last Name” fields as shown below.
Use Column Value in Expression in Power Automate

The final formula should looks like

concat(triggerBody()?['Title'],' ',triggerBody()?['LastName'])

Note that in the above formula, you have to use the Internal Field Name, not the Field Display Name.

  1. Save your flow.
save a flow
  1. Check for errors using Flow Checker.
check flow errors in Power Automate
  1. Great, there is no errors.
flow checker in Power Automate
  1. Now, click on “Test” to test your flow.
test flow in power automate
  1. If it’s the first time that you test your flow, you will note that only manually option is available, so click on test to start the flow test.
test flow in power automate
  1. Go back to your list to Add a new list item, then click on “Save“.
How to Combine Strings in Power Automate
  1. Great, the flow is run successfully.
your flow ran successfully
  1. The new fields have been combined as stated below.
Combine Strings in Power Automate
Combine Strings in Power Automate

Conclusion

In conclusion, concatenating two columns in Power Automate is a simple process that can be achieved using the built-in “concat” function.

By concatenating columns, you can combine different values from your SharePoint list to create more meaningful and informative data. This can be particularly useful when generating reports or exporting data to external systems.

By following the steps outlined in this post, you should be able to easily concatenate two columns in Power Automate to achieve your desired outcome.

See Also

Mohamed El-Qassas

I'm Microsoft MVP, SharePoint StackExchange Moderator, Microsoft QnA Moderator, C# Corner MVP, Microsoft TechNet Wiki Judge, and Senior Technical Consultant with +12 years of experience in SharePoint, Project Server and Power Platform.