cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
greenkg24
Regular Visitor

Split two multi select fields in sharepoint list that are multi line text fields into new list keeping row id integrity

Hi there,

 

I have a list like this:

COLUMN 1COLUMN 2COLUMN 3
item 1fruit | candyapples | snickers
item 2fruit | candypear | strawberry | kit-kat

 

And I'd like to take that list and create a new lookup table that looks like this:

COLUMN 4COLUMN 5
item 1fruit
item 1candy
item 1apples
item 1

snickers

item 2fruit
item 2candy
item 2 pear
item 2strawberry
item 2kit-kat

 

I am brand new to using flow. I'd like to first create a batch job to run the flow for the existing data. Afterward, I'd like it set up to run everytime an item is created or modified. Reason for that is during a users session they often upload a new item or edit an existing item. 

 

I can do this so quick using python and excel, but I can't even begin to conceptualize it in power automate and haven't been able to find a related post for this problem yet. 

 

Any help would be great!

1 REPLY 1
PrasadAthalye
Super User
Super User

Here is how you can do it...

 

 

My  Compose 2 expression is as below. Here we are splitting column 1 and column 2 on the separator and then making a union of the output arrays.--> 

union(split(items('Apply_to_each_2')?['Column1'], '|'), split(items('Apply_to_each_2')?['Column2'], '|')) ​

Then we are running loop on the compose output. Finally in the insert, I am adding trim so that it removes spaces. Expression is as below.. trim(items('Apply_to_each_3'))

 

 

PrasadAthalye_0-1634689413092.png

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

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!

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