cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
amitlathia
Frequent Visitor

Flow: get multiple values from sharepoint column for CSV table

I have created a flow using the following options:

Get Items (Sharepoint List)

Fiter Array

Select

Create CSV Table

Send Email.

 

For the select option - I have selected various fields from my sharepoint list including one which is a multiple selection field.

 

The flow works and exports to CSV - however the output for the multi-selct field is a long string which includes the value retrieved i.e

 

[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":0,"Value":"Main Hall"},{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":1,"Value":"Dining Room"},{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":3,"Value":"Kitchen"}]

 

What I would like is to receive the values seperated by a comma or semi colon to make this more user friendly. for example in the output above it should ideally read: Main Hall; Dining Room; Kitchen

 

Any suggestions as to how I can do this by either manipulating the output string as an additional step in the flow or changing the way I collect the data for this column.

 

Thanks in advance

 

Amit

22 REPLIES 22

Hi All, an extra tip on how to remove the brackets and the double quotes for this amazing solution from Microsoft staff.  You can simply put the xpath expression into a Join data operation with any delimiter such as a comma and space. The output will now be a, b, c  instead of ["a","b","c"]. Hope this helps others!!

Xpath Join Pic 01.png.jpgXpath Join Pic 02.png.jpg

I have a flow that gets items from a Sharepoint list view and outputs the value columns to CSV. One of the columns is a multiple choice lookup column where I want to output all values selected in a list like Project1,Project2, etc. I have followed the example flows here and am unable to get it to output successfully - right now it outputs empty [ ] in that column. I have tried many different solutions posted to the community for the same issue -- outputting multiple values in a singular cell within a CSV -- all with no success.

I got the same error and couldn't find any solution on the internet, but I found the root cause & solution now: your multiple-value column may be coded with a different name than how it's displayed in the SharePoint list.

 

As an example, my column showed in the SP list as "column 1" but it turned out to be coded as "column1" (without space). To know what the real name of the column is, do the following: 1. remove the error multi-value column from your step (Select action or Create CSV action), 2. then, just do a test run and make sure that the flow will run through this step successfully (steps after it can be errored, that's fine), 3. Go to the result of that test run and examine the step, then you'll see what's your real column name is.

 

Screenshot: Step3

john307_0-1667432054078.png

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (2,905)