cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Community Champion
Community Champion

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
Highlighted
Community Support
Community Support

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.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

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.

View solution in original post

Highlighted
Community Champion
Community Champion

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (7,110)