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

How to copy multiselect field values and paste as a concatenated string text field in single SP List

Hi,

 

I have a SP list (well, a doc library) with 3 metadata columns, all of which are multiselect dropdown fields - one is actually a multiselect person field.  I'd like to run a flow (say, once a day) that grabs the values from each of those 3 columns and pastes those values into 3 separate single line text columns.

For those that wonder why - I need these field values to appear on a document template for the doc library and Word's Quick Parts feature does not support multiple-value fields.

I know that I will need a recurrence, get file (properties only), and update file (properties) action to achieve the desired workflow, but I'm struggling with the converting of multiselect field values to a single text string.

Here's my current recipe - it's very close to working, however, notice the flow is only grabbing the last state instead of all selected states.  What do I have to tweak to get this to grab all the values rather than just the last one?

2018-05-24_16h45_18.pngproperties.png
Thanks in advance,

- Kurt

1 ACCEPTED SOLUTION

Accepted Solutions

@Anonymous - I reposted my question in a simpler way and also just came up with the solution; go here to see:

 

https://powerusers.microsoft.com/t5/Building-Flows/For-each-record-copy-multi-select-column-value-s-and-paste-value/m-p/120986#M11757

 

- Kurt

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Kurt, I have something similar where I need to display checkbox values from a choice column. Checkboxes, therefore multiple can be selected has been givin me grief.Tried join from the expressions but it returns the json for that column.

 

Although I believe there has to be a better way, I couldn't find one and this is what I was able to get working:

  1. Create string variable
  2. Create Apply to Each
    1. Output from previous step equal to your multi-select column
    2. Create a condition
      1. Eval Current Item value is not equal to "" (empty string)
      2. If Yes
        1. Append to string - column from dynamic content
        2. Append to string - ", " (comma then space)
      3. If No - do nothing

I am now at the point of trying to figure out how to remove the comma from the end of the string created.

Anonymous
Not applicable

Found and example of how to remove the last comma.

 

if(endsWith(variables('myVariable'),','),subString(variables('myVariable'),0,lastIndexOf(variables('myVariable'),',')),variables('myVariable'))

Thanks @Anonymous - I haven't tried your solution yet, but I have edited my post to include my current iteration.  It seems like a combination of Compose and Join should accomplish the needed task - it's almost working for me...I can't figure out what to tweak.

So I tried your recipe and at first I thought it worked, but I'm getting a wonky result for the 2nd record in the doc library.  Note the State field and View Only - State field match for the first row but not the second.

Screenshot_1.jpg

@Anonymous:

2018-05-31_16h21_43.png

@Anonymous - I reposted my question in a simpler way and also just came up with the solution; go here to see:

 

https://powerusers.microsoft.com/t5/Building-Flows/For-each-record-copy-multi-select-column-value-s-and-paste-value/m-p/120986#M11757

 

- Kurt

Anonymous
Not applicable

it didnt work for me: here what i have, i want to copy application :admin and past it to admin email 1 (text).

apfter append, it uptated @kbarber . help pls

 

 Capture33333333.PNGCapture11111.PNGCapture3333333333333.PNG

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 (3,456)