cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Meneghino
Level 10

Referencing variables in Flow expressions

How do you reference a variable in a Flow expression?

I have tried many variants and failed.

For example I set a VariableA and VariableB as strings and want to set VariableC as the concatenation.

The following did not work:

concat(VariableA,VariableB)

Capture.JPG

 

Maybe @v-micsh-msft can help on this one too, please?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Referencing variables in Flow expressions

Hi @Meneghino,

 

The expression should be as below:

concat(variables('VariableA'),variables('VariableB'))

To work with variables, we need first add Variables() to get the Variable output, then within the brackets we need to take use of single quotes to quote the variable name.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Community Support Team
Community Support Team

Re: Referencing variables in Flow expressions

Hi @Meneghino,

 

The expression should be as below:

concat(variables('VariableA'),variables('VariableB'))

To work with variables, we need first add Variables() to get the Variable output, then within the brackets we need to take use of single quotes to quote the variable name.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Meneghino
Level 10

Re: Referencing variables in Flow expressions

Hi @v-micsh-msft, brilliant, it works!

I did think about that, but in the editor it did not change colour as it would for a recognised function, so I thought it was not.

Please see below, recognised functions become bold and blue, whereas variables does not change.  But no error is given on update and all works.

Capture.JPG

Helpful resources

Announcements
firstImage

Microsoft Flow Online Conference

Join us for a FULL day of FREE Microsoft Flow Sessions from some of the best minds in the industry!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 41 members 4,409 guests
Please welcome our newest community members: