cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
KQ
Level: Powered On

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
Community Support Team
Community Support Team

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
Community Support Team
Community Support Team

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

KQ
Level: Powered On

Re: FILTER & SORT HTML TABLE IN POWERAPPS

Excellent!  Thank you very much 🙂

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,671)