In this Power Automate Desktop tutorial, we will see how we can concatenate strings using different methods in Power Automate Desktop. Also, we will see how we can concatenate list of strings into one in Power Automate Desktop
In this tutorial, we will go through the below topics
- Concatenate string using the + operator
- Concatenate using the % symbol
- Concatenate list of strings
How to concatenate strings in Power Automate Desktop [Using + operator]
Here we will see how to concatenate strings in Power Automate Desktop using the + operator.
For example, we will take two variables i.e. String 1 and String 2, stores values ‘Power’ and ‘Automate’ respectively. To concatenate two strings we will use +operator, in Power Automate Desktop.
Step 1: Open Power Automate Desktop, then provide the flow name and click on the Create button.
Step 2: Now we will set a variable that contains the string ‘Power’, for this expand the Variable section, and then drag and drop the Set variable action. Then provide the below information:
- Change the variable name to String1.
- Value: Provide the value as Power.
Similarly set another set variable like above and provide the string as Automate.
Step 3: Now we will concatenate the string using the + operator, For this, expand the Message box section, and drag and drop the Display message action. Then provide the below information:
- Message box title: Provide the title like below.
- Message to display: Provide the below code:
%String1 + String2%
Step 4: Now run the flow by clicking on the Run button. You can see the Message box will pop up and the result string.
This is how to concatenate strings in Power Automate Desktop using + operator.
Concatenate strings in Power Automate Desktop [Using %]
Here we will see how to concatenate strings in Power Automate Desktop using %.
For example, we will take two variables i.e. String 1 and String 2, stores values ‘Power’ and ‘Automate’ respectively. To concatenate two strings we will pass the 2 variables containing the % symbol e.g. %String1% %String2%, in Power Automate Desktop.
Step 1: Open Power Automate Desktop, then provide the flow name and click on the Create button.
Step 2: Now we will set a variable that contains the string ‘Power’, For this expand the Variable section, and then drag and drop the Set variable action. Then provide the below information:
- Change the variable name to String1
- Value: Provide the value as Power.
Similarly set another set variable like above and give the string as Automate.
Step 3: Now we will concatenate the string, for this, expand the Message box section, then drag and drop the Display message action. Then provide the below information:
- Message box title: Provide the title like below.
- Message to display: Provide the below code:
%String1% %String2%
Step 4: Now run the flow by clicking on the Run button. You can see the Message box will pop up and the result string.
This is how to concatenate strings in Power Automate Desktop using % operator.
Concatenate a list of strings in Power Automate Desktop
Here we will see how to concatenate list of strings using the Join action in Power Automate Desktop.
For example, we have lists of strings i.e. Power, Automate, and Desktop, so we will concatenate the strings using the Join action. Then join action will join the string with the delimiter you have provided. If the delimiter is space, the result will be Power Automate Desktop.
Step 1: Open Power Automate Desktop, click on +New flow -> provide the flow name. Click on the Create button.
Step 2: Now we will create a List variable called Names, so, expand the variable section. Then drag and drop the Create new list action to Canvas and provide the below information:
- Now provide the new list name as Product, then click on Save.
Step 3: Next we will add names to the list, for this expand the variable section, then drag and drop the ‘Add item to list ‘ action to canvas. Then provide the below information:
- Add item: Provide the item name ‘Alex’.
- Into List: Click on the variable icon {x} -> select Names, then click Save.
Similarly, add the other items/names to the list of Names, then we will concatenate the string.
Step 4: Now we will concatenate the string, so, expand the Text section, drag and drop the Join action. Then provide the below information:
- Specify the list to join: Click on the variable icon {x} -> select ListOfString, then click on save
- The delimiter to separate list items: Select Standard delimiter
- Standard delimiter: Select Space.
- Times: 1 time.
Step 5: Next we will display the result, so expand the Message box section and then drag and drop the Display Message action to the canvas. Then provide the below information:
- Message box title: Provide the title like below.
- Message to display: Provide the message to display like below.
Step 6: Now run the flow by clicking on the Run button. You can see the Message box will pop up and the result string.
This is how to concatenate a list of strings in Power Automate Desktop.
Conclusion
In this Power Automate Desktop tutorial, we saw how to concatenate strings in different ways in Power Automate Desktop.
You may like the following tutorials:
- Send an Email with Attachments from Local Folder using Power Automate
- How to Send an Email with Attachments in Power Automate?
- Convert XML to string in Power Automate
- Convert an array to a string using Power Automate
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com