cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,424)