cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kbarber
Advocate II
Advocate II

For each record, copy (multi-select) column value(s) and paste value(s) into single-line text column

Say we have a SharePoint List with 2 columns, a multi-select Choice column and a single-line Text column.  How might we construct a Flow that, for each record/item, copies the value(s) of the multi-select Choice column and pastes as a single (concatenated) string into the Text column?

Note that the trigger for this Flow would be a recurrence.

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

@v-yuazh-msft@Pieter_Veenstra

Got it!

2018-06-04_15h01_Solution.png

 

The quirk, which i don't understand is this:

in the Select action, entering the expression item()?['Value'] gets the value from the choice field without automatically creating an Apply to Each.  If I choose the dynamic field [State Value], then another Apply to Each gets created and it messes up the Flow.  

I also got this to work for a Person field by changing the expression to item()?['DisplayName'].

 

- Kurt

 

View solution in original post

15 REPLIES 15
v-yuazh-msft
Community Support
Community Support

Hi @ kbarber,

 

I have made a test on my side and I have created a sharepoint list as below:

Capture.PNG

 

Please refer to screenshot below to create the flow:

Capture.PNG

Capture.PNG

 

The flow would run successfully as below:

Capture.PNG

 

The items in the sharepoint list would be updated as below:

Capture.PNG

 

Please let me know if your problem could be solved.

 

 

Regards,
Alice Zhang

Thanks so much for sharing your solution @v-yuazh-msft.

I used your prescribed method but didn't quite get the desired result.  For some reason the Flow only "pasted" the last value from the choice column:

2018-06-04_10h22_19 doc library.png

Here's the Flow (note that this is actually a doc library (sorry! I mistakenly called it a List in my initial post!)):

2018-06-04_10h17_55.png

What do I have wrong???

 

Thanks again,

- Kurt

You could optimize this quite a lot.

 

If you first get all of the items using get items.

 

Then run them through a select so that you are building up the REST API calls to update all of the items. 

 

Then finally run an apply to each on each of the REST API calls. That avoids the multiple apply to each steps in your flow.

@Pieter_Veenstra - perhaps a good example to work through for the SharePains blog?Smiley Happy

@v-yuazh-msft@Pieter_Veenstra

Got it!

2018-06-04_15h01_Solution.png

 

The quirk, which i don't understand is this:

in the Select action, entering the expression item()?['Value'] gets the value from the choice field without automatically creating an Apply to Each.  If I choose the dynamic field [State Value], then another Apply to Each gets created and it messes up the Flow.  

I also got this to work for a Person field by changing the expression to item()?['DisplayName'].

 

- Kurt

 

View solution in original post

Hi @v-yuazh-msft ,

 

I know this is an old post, however, I just recently encountered a similar problem and your solution worked perfectly for me. The only thing I might add is that the solution initially provoked a flow loop continuously modifying / creating new versions of my list item. I resolved this by adding a condition to the flow.

 

Thanks!

Anonymous
Not applicable

Hi @kbarber @v-yuazh-msft ,

I have an issue similar to the above one.

I am trying to insert records into sql. I have 10 columns and out of those 10 columns i have 3 columns where we can give multi selected values.

With the  reference of above solution i am able to do it for 1 column i.e., i can able to concatenate multivalues of col1 into single text but i am unable to do it for the rest of the 2 columns. 

Do i need to build a parallel action? How to do this for 3 columns? If i try for another column then it is creating another "Apply to Each" inside "Apply to Each".

 

Thanks in advance

 

Regards,

Prakash M

 

can you simply add 2 more Select actions and 2 more Join actions? 

The quirk I discovered is:

in the Select action, typing the expression item()?['Value'] gets the value from the choice field without automatically creating an Apply to Each.  If I choose the dynamic field [State Value], then another Apply to Each gets created and it messes up the Flow.  

Anonymous
Not applicable

Hi @kbarber ,

 

Where i need to add those 2 more add and join actions? I tried to add a parallel action but didn't worked.

Then i tried to add at the bottom of select operation but that also didn't worked.

 

Can you please let me know where to perform those 2 additional select and join operation? That would be really helpful to me.

 

Thanks

Prakash M

 

Flow Select.PNG

sorry @Anonymous  - i would think you could add 2 more select actions below your current one, and also 2 more join actions below your current join action.  if that doesn't work hopefully someone else can help you...

Anonymous
Not applicable

Hi @kbarber , @v-yuazh-msft ,

 

Unfortunately i am unable to add multiple select and join operation in this scenario.

 

Unable to do this for multiple columns. Please let me know in case of any solutions.

 

Thanks

Prakash

Hi,

 

This worked perfectly, except I lost the commas distinctly separating my choices. Is there something I missed? I followed the above to a tee.

 

Thanks

Anonymous
Not applicable

Hi @kbarber ,

I got a solution for the question which i asked.

Multiple Select join.PNG

 

Thanks for your help on this !!

 

Regards,

Prakash

Anonymous
Not applicable

Hi @jldodge ,

 

Have you tried adding a Comma (,) in your Join With field in Join Operation?

 

Thanks,

Prakash

I cannot like your solution enough. This is the easiest way I have found to merge multiple choice options together! Thank you! It is so much better than creating a variable and concatenating them together.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,983)