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

Sharepoint to Excel - Column allowing multiple selections

Hi there,

I'm exporting from a SharePoint list to Excel. The SharePoint list has a column that allows the user to select the weather condition. This column allows the user to select multiple answers e.g. Snow/Ice, Flood, Fog/Mist

 

When I export to Excel using Power Automate I get a string of data in a single cell:

[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":3,"Value":"Snow/Ice"},{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":5,"Value":"Flood"},{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":1,"Value":"Fog/Mist"}]

 

Is there a way in Power Automate to make it only show the values from the SharePoint list when it exports to Excel?

 

Any help greatly appreciated 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
Rhiassuring
Resident Rockstar
Resident Rockstar

Hi there!

I hope this isn't confusing, but, I decided to try a new way of doing this that I read about on @tom_riha's blog, here

In short, instead of appending to a string (which is still a valid method!) we're going to use Select, and then Join()

In my test, I had a multi-select duck column.:

 

Rhiassuring_0-1652400009932.png

 

 

I use the "Select" action to point at the Ducks column, and then put the "Ducks Value" into the Mapping. 

Rhiassuring_1-1652400043757.png

 

It's important to note that little yellow highlighted bit needs to be the little index card looking thing, instead of the icon that has a T in it. If it isn't, click on it, and it'll swap.

 

Then, we just use a Join() expression inside of a Compose action.

 

Rhiassuring_2-1652400108067.png

 

All it's saying is "hey, look at this array. Let's smash them all into a string and put a character between them - how about a comma."

 

join(body('Select'),', ')
 
Then, you can cram the output of that Compose into whereever you need it to go!
 
Cheers,

Rhia

 

 

View solution in original post

6 REPLIES 6
Rhiassuring
Resident Rockstar
Resident Rockstar

Hi there, you will need to build a string for each. For each line you add, have a txtChoices string, then, use an "Append to String" that is focused on the Value from your choice value. It will loop through each choice, and add it, for the item you're looking at. Then, just use the txtChoices as the input for your Excel row, rather than the SP data. Have a "set variable" at the beginning of your loop entry to clear it out. 

Let me know i fyou need a step by step.

Rob_Sims
Regular Visitor

Thank you that's great!

If you are able to provide a step-by-step it would be massively appreciated 🙂

Rhiassuring
Resident Rockstar
Resident Rockstar

Hi there!

I hope this isn't confusing, but, I decided to try a new way of doing this that I read about on @tom_riha's blog, here

In short, instead of appending to a string (which is still a valid method!) we're going to use Select, and then Join()

In my test, I had a multi-select duck column.:

 

Rhiassuring_0-1652400009932.png

 

 

I use the "Select" action to point at the Ducks column, and then put the "Ducks Value" into the Mapping. 

Rhiassuring_1-1652400043757.png

 

It's important to note that little yellow highlighted bit needs to be the little index card looking thing, instead of the icon that has a T in it. If it isn't, click on it, and it'll swap.

 

Then, we just use a Join() expression inside of a Compose action.

 

Rhiassuring_2-1652400108067.png

 

All it's saying is "hey, look at this array. Let's smash them all into a string and put a character between them - how about a comma."

 

join(body('Select'),', ')
 
Then, you can cram the output of that Compose into whereever you need it to go!
 
Cheers,

Rhia

 

 

Rob_Sims
Regular Visitor

That's awesome Rhia, I can't thank you enough!!!

Where exactly do you place the select & compose bits? As new step? between the get items and apply to each...or as nested within the apply to each?

I've placed mine after the get data (got 4 different ones).

I then have an update a row in excel, and have inserted the compose options in there.

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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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
Top Kudoed Authors
Users online (1,134)