Hi all,
I found a nice solution for my problem. I need to create a breakline in my variable and this works fine.
I use this solution but i can't remove the - in the concat code. Here is my code, it looks my join is not correct?
Compose -
join(variables('Test'))
Compose2 with concat
concat(outputs('Compose'),'</br>')
Solved! Go to Solution.
@Anonymous,
As written above your first Compose action for the join() only has one value and not a separator. In reviewing the original solution you linked, your second Compose action is missing the "replace" function.
Are you trying to use "- </br>" as in the example, or do you just want the line break? In either case, this is how I would do it instead:
Note that I initialized "test" as a string variable and used the Append to String Variable action in my Apply to each. I used concat() to build the string for each line, with the </br> at the end. If you also want the "-" at the beginning, simply add it to the concat function.
Let us know how it goes!
Ashley
If this response provided an answer to your question please mark it as a solution so that others can find it.
If you found this helpful, consider giving it a thumbs up!
Hi @Anonymous - Try the below without /
concat(outputs('Compose'),'<br>')
-----------------------------------------------
If this was helpful, please give a thumbs up or accept as solution
I get an error with the first compose:
InvalidTemplate. Unable to process template language expressions in action 'Compose' inputs at line '1' and column '2657': 'The template language function 'join' expects two parameters: the array of elements to join as the first parameter, and the element separator as the second parameter. The function was invoked with '1' parameter(s). Please see https://aka.ms/logicexpressions#join for usage details.'.
@Anonymous,
As written above your first Compose action for the join() only has one value and not a separator. In reviewing the original solution you linked, your second Compose action is missing the "replace" function.
Are you trying to use "- </br>" as in the example, or do you just want the line break? In either case, this is how I would do it instead:
Note that I initialized "test" as a string variable and used the Append to String Variable action in my Apply to each. I used concat() to build the string for each line, with the </br> at the end. If you also want the "-" at the beginning, simply add it to the concat function.
Let us know how it goes!
Ashley
If this response provided an answer to your question please mark it as a solution so that others can find it.
If you found this helpful, consider giving it a thumbs up!
Wow! @AKRogers You made flow setup much more cleaner! I was using two times the compose options and now i only need the variable and the Append to string variable. |
I have one more question and then i'm done. I use almost the same flow, so again Get items and after that i need to multiple two columns. In PowerApps + SharePoint its very easy but what is the best way to do this?
I have to values Count + Price = total price. Whice method/directing should you advice to use?
@Anonymous So glad I could help!
To do math functions, use expressions inside your Compose actions. There are a bunch of math functions that you can use right inside the expression builder as well!
Hope that helps!
Ashley
If you found this helpful, consider giving it a thumbs up!
Really awesome! That will do the trick, thank you very much.
Have a nice day 😄
Can you please have an extra look. I got the mul syntax now but i didnt't get it with the concat option.
concat(items('Apply_to_each')?['Count'], '</br>')
concat(items('Apply_to_each')?['Pice'], '</br>')
This code works fine when i use create new item and then get item but how can i translate it to the concat?
mul(body('Get_item')?['Count'],body('Get_item')?['Price'])
I tried this: concat(mul(items('Apply_to_each')['Count'],(?['Pice'], '</br>')))
But it doenst work. Do you have a site or editor where i can learn to combine this syntax together?
@Anonymous, I think you're just missing a couple of things, so you're really close!
First, in your example you wrote "pice" instead of "Price." Please double check the spelling of the fields in your expression just to make sure that's not interfering.
Second, when using a field in an expression you need to use the entire "reference" to the field, which is what Power Automate so nicely hides from us when using Dynamic Content! So, anywhere you want "Count" or "Price" in an expression, use the entire reference to the field:
If you found this helpful, consider giving it a thumbs up!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
12 | |
11 | |
9 | |
9 | |
6 |
User | Count |
---|---|
26 | |
20 | |
12 | |
10 | |
7 |