Create an HTML table from Knack

Hello
I am looking for a way to create an html table from data coming from a knack search module (several bundles).
I use a text aggregator with predefind fillable html code in it ; the result seems promising, but not satisfactory : problem with repeating headers, and spaces between lines.

Is there a better way to obtain a clean table please ?

image

image

In this example the knack module generetes two bundles.

Thanks a lot

Hi @Fanch,

This is because you are repeating your header. Your text aggregator should just output the actual rows, not the header.

Then in a subsequent step, you can combine the header and the rows:

{{html_header} (static)
{{html_rows}} (generated by your text aggregator)


wiseflow.co
Our Blog
Need Make expert support quickly? Book a session

1 Like

Thank you Loic
Works fine, except the space created between two records:

image

Do you have any tips to solve this ?
Thanks

Can you copy paste the html that you have in your aggregator?

The current code looks like this:
Thanks



<body lang=FR-FR style='tab-interval:35.4pt;word-wrap:break-word'>

<div class=WordSection1>

<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
 style='border-collapse:collapse;border:none;mso-border-alt:solid windowtext .5pt;
 mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 5.4pt'>
 <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
  height:20.85pt'>
  <td width=97 valign=top style='width:73.0pt;border:solid windowtext 1.0pt;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:20.85pt'>
  <p class=MsoNormal style='margin-bottom:0cm;line-height:normal'>{{129.field_645_raw}}</p>
  </td>
  <td width=100 valign=top style='width:74.7pt;border:solid windowtext 1.0pt;
  border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
  solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:20.85pt'>
  <p class=MsoNormal style='margin-bottom:0cm;line-height:normal'>{{129.field_791_raw}}</p>
  </td>
  <td width=102 valign=top style='width:76.85pt;border:solid windowtext 1.0pt;
  border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
  solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:20.85pt'>
  <p class=MsoNormal style='margin-bottom:0cm;line-height:normal'>{{129.field_646_raw}}</p>
  </td>
  <td width=100 valign=top style='width:75.05pt;border:solid windowtext 1.0pt;
  border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
  solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:20.85pt'>
  <p class=MsoNormal style='margin-bottom:0cm;line-height:normal'>{{129.field_647_raw.date_formatted}}</p>
  </td>
  <td width=112 valign=top style='width:84.35pt;border:solid windowtext 1.0pt;
  border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
  solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:20.85pt'>
  <p class=MsoNormal style='margin-bottom:0cm;line-height:normal'>{{129.field_649_raw[].identifier}}</p>
  </td>
  <td width=92 valign=top style='width:69.15pt;border:solid windowtext 1.0pt;
  border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
  solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:20.85pt'>
  <p class=MsoNormal style='margin-bottom:0cm;line-height:normal'>{{129.field_664_raw[]}}</p>
  </td>
 </tr>
</table>

</div>

</body>

</html>

In your aggregator you should just have the html from the …, all the rest needs to be added on your subsequent steps

1 Like

Thank you ! It works fine

1 Like