How to use append to string variable action in Power Automate?

Are you need to use Append to string variable action in Power Automate? Then this Power Automate tutorial will show how to use append to string variable action in Power Automate. I will show how to append text onto an existing text string in flow.

I am in need to append the Last Name with the First Name. And I have successfully appended the values. If you also want to append values or work with Append to string variable action. Follow the below steps; surely, it will also work for you.

How to use append to string variable action in Power Automate

Let us see how to use append to string variable action in Power Automate.

Example-1:

The flow will trigger manually and requests the user to enter a First Name and Last Name value in a textbox. Then, we initialize a string variable to store the first name; using the Append to string variable action, we will append the last name with the first name and display the result in compose data operation.

Follow the below steps to achieve this:

Step-1: Log in to Power Automate flow using Microsoft credentials, Create an instant cloud flow, and add a text input value for First Name and Last Name like below:

power automate append to string variable

Step-2: Choose an initialize variable action to initialize the variable in a string format. Enter the Variable name and choose the Variable type as String. Pass the First Name from the dynamic content value in the value section.

Append to string variable action in Power Automate

Step-3: Select +new step and choose append to string variable action; from the dropdown, select the initialized variable, and in the value section, pass the Last Name from the dynamic content value.

Append to string variable action in Power Automate flow

Step-4: Add a compose data operation and pass the initialized variable that consists of the First name and the appended last name value.

How to use append to string variable action in Power Automate flow

Step-5: Save and Run the flow. Enter the First Name and Last Name and click on the run flow option.

Example to use Append to string variable action in Power Automate

Once the flow runs successfully, we can see that the last name value is appended with the first name by using the append to string variable action. We can see the expected output in the compose data operation.

Example to use Append to string variable action in Power Automate flow

This is how to append text onto an existing text string using the append to string variable action in Power Automate flow.

See also  Create Stacked Funnel Chart in Power BI

Example-2:

Here we will see how to append string value dynamically in Power Automate.

The flow will trigger manually and gets all items from the SharePoint list. Then, we initialize a string variable with an empty value, by using the Append to string variable action, we will append the Product Names and displays the output in compose data operation.

In this example, we will use the below displayed Product SharePoint List:

  • Product Name – default title column
  • ProductQuantity and ProductPrice – Number column
power automate append to string variable action

Step-1:

Create an instant cloud flow. Select +new step and add Get items action from the action triggers. Configure the SharePoint site address and list name. Here I have selected my SharePoint and list name called Products.

Append to string variable in Power Automate

Step-2:

  • Choose an initialize variable action to initialize the variable in a string format. Enter the Variable name and choose the Variable type as String. Leave the value section empty.
Append to string variable in Power Automate flow

Step-3:

  • Select +new step and choose append to string variable action; from the dropdown, select the initialized variable.
  • Pass the Title (ProductName column) in the value section from the dynamic content value.
  • It will automatically add, apply to each control loop, to loop through all the items presented in the SharePoint list.
Append to string variable action in the Power Automate flow

Add a compose data operation and pass the initialized variable with Product Names.

Append to string variable in Power Automate example

Step-4:

  • Save and Run the flow. Once the flow runs successfully, we can see it appends all the Product Names from the SharePoint list to the initialized string variable by using the append to string action.
  • And displays the expected output in the compose data operation.
Append to string variable in Power Automate flow example

This is how to append string values dynamically in Power Automate.

See also  How to find text in a string using Power Automate?

Conclusion

In this tutorial, I have explained how to append text onto an existing text string by using Append to string Variable action in Power Automate flow with different examples.

You may like the following tutorials:

>