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

FILTER & SORT HTML TABLE IN POWERAPPS

Good afternoon!  I have jumped ahead of my skill base here, but I am trying to filter and sort a html table.

Here is the code of the html table:

"<h3>Equipment History This Job</h3>" &

"<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" &
"<tr style='background-color:#efefef'>
<th>Job No</th>
<th> Status </th>
<th> Equip ID </th>
<th>Date </th>
<th>Appt ID</th>
</tr>
<tr>" &
Concat(Equipment,
"<td>" & JOB_NO & " </td>
<td>" & EQUIP_STATUS & " </td>
<td>" & EQUIP_ID & " </td>
<td>" & DATE & " </td>
<td>" & APPT_ID & " </td>","</tr><tr>") &


"</table>"

 

This produces a lovely table, just what I need, except I need to apply the following sort/filter:

SortByColumns(
Filter(Equipment,JOB_NO=DataCardValue12.Text),"APPT_ID",Descending)

 

I have applied this to a DataTable, which displays perfectly, but as I want to include this exact data table into an email, I need to recreate it as HTML code but do not know where/how to put the sort/filter function.

 

Hoping you can help?  🙂

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: FILTER & SORT HTML TABLE IN POWERAPPS

Hi @KQ ,

 

Try to replace the Equipment with this formula in HTML table:

"<h3>Equipment History This Job</h3>" &

"<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" &
"<tr style='background-color:#efefef'>
<th>Job No</th>
<th> Status </th>
<th> Equip ID </th>
<th>Date </th>
<th>Appt ID</th>
</tr>
<tr>" &
Concat(SortByColumns(
Filter(Equipment,JOB_NO=DataCardValue12.Text),"APPT_ID",Descending),
"<td>" & JOB_NO & " </td>
<td>" & EQUIP_STATUS & " </td>
<td>" & EQUIP_ID & " </td>
<td>" & DATE & " </td>
<td>" & APPT_ID & " </td>","</tr><tr>") &


"</table>"

 

Regards,

Mona

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: FILTER & SORT HTML TABLE IN POWERAPPS

Hi @KQ ,

 

Try to replace the Equipment with this formula in HTML table:

"<h3>Equipment History This Job</h3>" &

"<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" &
"<tr style='background-color:#efefef'>
<th>Job No</th>
<th> Status </th>
<th> Equip ID </th>
<th>Date </th>
<th>Appt ID</th>
</tr>
<tr>" &
Concat(SortByColumns(
Filter(Equipment,JOB_NO=DataCardValue12.Text),"APPT_ID",Descending),
"<td>" & JOB_NO & " </td>
<td>" & EQUIP_STATUS & " </td>
<td>" & EQUIP_ID & " </td>
<td>" & DATE & " </td>
<td>" & APPT_ID & " </td>","</tr><tr>") &


"</table>"

 

Regards,

Mona

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Frequent Visitor

Re: FILTER & SORT HTML TABLE IN POWERAPPS

Excellent!  Thank you very much 🙂

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,808)