cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IAQG
Advocate I
Advocate I

How to concatenate on to a single line in Power Automate Desktop

Hi all,

 

I think I'm missing something simple, but I was wondering what the best way to concatenate two strings in to single line string is in Power Automate Desktop? I see that there's a step to append two strings together, but that adds the second string in to a new line instead of a single one. So as an example, if I wanted to concat "dollar" and "bill" to "dollar bill", using the append function I get
"dollar

bill"

 

The way I found around this is to split the new variable in to a list delimited by new line and then join the list delimited by a space, but that seems like a roundabout way to what I would think is a simple concat.
Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
CFernandes
Super User
Super User

Hey Mate @IAQG ,

 

You can use + operator to concat -

 

Have a look at -  https://docs.microsoft.com/en-us/power-automate/desktop-flows/variable-manipulation#basic-arithmetic

 

CFernandes_0-1619549911668.png

 

Note in set variable % symbols are the start and end- %VarDollar + VarThis% 

 

Option 2 - As suggested by @BrenainnBot 

 

CFernandes_1-1619549962795.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

View solution in original post

5 REPLIES 5
BrenainnBot
New Member

Hi! Are dollar and bill stored in separate text variables? I’m new to PAD, but I was playing around. I have 2 text variables—%NewVar% and %NewVar2%—where the first stores dollar and the second stores bill. I used a Display Message action to concatenate them with a space by typing %NewVar% %NewVar2% just as shown, and it displayed dollar bill. Will that work?

CFernandes
Super User
Super User

Hey Mate @IAQG ,

 

You can use + operator to concat -

 

Have a look at -  https://docs.microsoft.com/en-us/power-automate/desktop-flows/variable-manipulation#basic-arithmetic

 

CFernandes_0-1619549911668.png

 

Note in set variable % symbols are the start and end- %VarDollar + VarThis% 

 

Option 2 - As suggested by @BrenainnBot 

 

CFernandes_1-1619549962795.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

burque505
Helper V
Helper V

And if you want to do it by setting variables, you can try this:

flow.PNG

Setting var 1 (has a space you can't see at the end):

1stString.PNG

Setting var 2:

2ndString.PNG

Setting var 3 to concatenate vars 1 and 2:

3rdString.PNG

And the result ( you can see the double percent signs from var 2 have been converted to single percent signs):

message.PNG

IAQG
Advocate I
Advocate I

Ah, there it is. Thanks, all, I knew there had to be something easier than what I was doing.

@IAQG I am glad our inputs helped!! 

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,407)