cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gantonopoulos
Frequent Visitor

Append values from multiple choice column to string variable // troubleshooting

Hello community!

 

I have built a flow that sends an email containing the contents of a sharepoint column which is a multiple selection.

pa5.PNG

 

In order to get the individual values of the selections, the flow does:

 

-a compose of the cell dynamic value, which give out a table in table in json format 

pa1.PNG

 

-uses an apply to each to the outputs of the compose (which essentially runs for as many rows there are in the json formatted table)

pa2.PNG

-uses a compose to discern the value of the selection by means of the expression: item()?['COLUMNNAME'}?['Value']

pa3.PNG

-Append the outputs of the compose to a string variable with a <br> at the end so each item added is in a new row

pa4.PNG

-finally uses a compose outside of the apply to each to loop with input the string variable 

 

 

The problem is that even if the apply to each runs for the correct number of loops (depending on the number of the selections of the column), periodically the string variable (and corresponding output of the final compose action) contains more selections than the ones appended and some times with repeating items e.g. i may have selected 6 options out of 12, the apply to each runs 6 times each time appending a selection to the string variable, and my final compose gives out an output containing more than 20 selections (some duplicates).

 

Help would be appreciated as i do not understand the behaviour of this flow. Thank you!

 

1 ACCEPTED SOLUTION

Accepted Solutions
tom_riha
Super User
Super User

Hello @gantonopoulos ,

I'd try to do it in a more efficient way using the 'Select' action to build the array with the desired values, and then join(...) expression to convert the array into a string separated by the <br> string as described here.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

1 REPLY 1
tom_riha
Super User
Super User

Hello @gantonopoulos ,

I'd try to do it in a more efficient way using the 'Select' action to build the array with the desired values, and then join(...) expression to convert the array into a string separated by the <br> string as described here.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (4,137)