web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Pulling filtered row o...
Power Automate
Answered

Pulling filtered row of SharePoint list containing multiple choice columns and sending it via email using HTML table

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello Everyone,

 

I have created a PowerApps which is displaying list of items from a SharePoint List in a gallery. PowerApps page has multiple filters which the user can select to filter the SharePoint data. Now after filtering the data on PowerApps, user wants to send the data to their email from PowerApps itself as 

1. Filtered data in form of a HTML table in email body

2. Filtered data as a CSV attachment

 

I have successfully created the PowerApps and Flow to retrieve the filtered data from SharePoint directly using the following steps.

1. User clicks on "Email" button on PowerApps

2. PowerApps passes the "Odata query" along with "user email address" and "email subject" to PowerAutomate flow.

3. Flow retrieves the information based on Odata query, creates the HTML table containing multiple rows and columns, creates CSV file with same data, attaches the CSV and triggers the email.

 

Problem I am facing here is with multiple choice columns, which are a few in this list. For each row of the HTML table and CSV file, that multiple choice SharePoint column value appears with odata tag for each row of values. For e.g.

 

ID

Status

Application(s) Impacted

1

Medium

[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":9,"Value":"Value 1"}]

2

Critical

[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":2,"Value":"Value 2"}],[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":1,"Value":"Value 3"},{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":2,"Value":"Value 5"}],

 

 

and so on...

 

Ideally I would like the HTML email and CSV data to be displayed as 

ID

Status

Application(s) Impacted

1

Medium

Value 1

2

Critical

Value 2, Value 3, Value 5

 

Can someone help me how to achieve this?

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Just wanted to update that I found the solution to this piece from this blog. 

    Format multiple choice SharePoint column in .csv using Power Automate 

     

    This interesting piece of code worked perfectly!

    join(xpath(xml(json(concat('{"body":{"value":', item()?['COLUMN NAME'] , '}}'))), '/body/value/Value/text()'), ', ')

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 468

#2
Haque Profile Picture

Haque 370

#3
Valantis Profile Picture

Valantis 354

Last 30 days Overall leaderboard