cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KQ
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
v-monli-msft
Community Support
Community Support

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
v-monli-msft
Community Support
Community Support

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
Frequent Visitor

Excellent!  Thank you very much 🙂

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (56,832)