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
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,169)