Skip to main content

🏷️ Tags for table fields

Want to export data from your table fields? Kraaft offers specific tags to automatically retrieve all entries in your Word and Excel export templates 🎉

👀 Hold on: if you have never heard of tags or table fields, read these articles first before continuing 💪


⏮️ Quick reminder about tags!

Find all your tags directly in the report creation and editing tab on your computer. Each field has its own tag key — and so does the table field! The sub-fields inside the table also have their own keys, automatically generated based on the name you gave them.

💡 The table field tag corresponds to the name given to the table field in the report template — exactly like regular tags.


1️⃣ Export all entries at once — ##table##

The simplest way to export your table field: use the table field tag. Kraaft automatically retrieves all entries and completed information, without any extra steps needed 🙌

Tag

Meaning

Output

Available on

##table##

Exports all entries from the table field

Full table with all rows

Word & Excel

##table$visible##

Displays the table only if the field is visible (Kraaft condition)

Based on the display conditions of the report

Word

##table$filled##

Displays the table only if at least one entry has been filled in

Full table with all rows

Word

##table$text##

Exports the table content as plain text, without table formatting

All entered values listed in sequence

Word & Excel

##table__count##

Total number of entries

3

Word & Excel

##table__headers##

Column headers

Field name, Responsible, Date…

Excel only

💡 IF/END-IF condition tags are compatible with the general ##table## tag — you can therefore condition the display of the entire table.

⚠️ The general ##table## tag retrieves the text values of your sub-fields, but not photos with their details: a photo sub-field does not export like a regular photo field (no date, no location) via this tag. To display a photo in detail, target it with a dedicated tag (section 2️⃣).


👀 Example with a construction site log

Here's what the table field on the report model looks like > the table field with its entries > and the detail of the first entry!

📄 In a Word export

Each table entry appears as a mini-table:

  • The 1st column shows the sub-field name (e.g. Responsible, Date, Signature)

  • The 2nd column shows the value entered in the report

All entries are exported automatically, one after another 👌

📊 In an Excel export

Each entry corresponds to one row, and each sub-field to one column. You can format your template (bold, cell color…) — the formatting is preserved in the export. If a cell is colored in your template, it stays as is: the table field simply fills the cells and keeps the layout you already defined.

💡 To handle row insertion in your Excel sheet properly, take a look at the Excel exceptions for report export.

⚠️ Column headers are not displayed automatically. Two options:

  • Option A — Add column names manually in your template (with your own formatting)

  • Option B — Use the ##table__headers## tag above the table tag → headers update automatically if you rename a field in Kraaft 💡

⚠️ Rows are inserted by overwriting content below. To avoid any issues, two recommended options:

  • Place the table at the end of the sheet, with no data below

  • Insert it on a dedicated sheet in your Excel file


🎛️ Choose your table layout in Kraaft

By default, each entry of your table field is displayed vertically, one below the other. You can change this display with two new layout tags — super handy when your table has many columns! 🎨

Tag

What it adds

Available on

##table$horizontal##

Switches the table to horizontal: each entry becomes a row and each sub-field a column

Word & Excel

##table$with(human_resources, equipment)##

Displays only the chosen columns (the sub-field keys you list)

Word & Excel

##table$without(subcontractor)##

Displays all columns except those you list

Word & Excel

↔️ Display your table horizontally — ##table$horizontal##

Add the $horizontal suffix to your table tag for a classic rows-and-columns layout. On Word, it gives you a real table directly, far more readable than the default vertical version!

⚠️ Careful with many sub-fields: on Word, the table may run off the page. Three useful reflexes:

  • Switch your Word template to landscape to widen the table

  • Reduce the displayed columns to lighten the table: $with to keep only some, $without to remove some (just below)

  • Run a test export to check the result before rolling it out

💡 In any case, there is a limit beyond a certain number of sub-fields 😉

🎯 Select the columns to display — ##table$with## / ##table$without##

To keep a clear table even with many sub-fields, you choose which columns to display using their sub-field key (for example human_resources, equipment, subcontractor).

  • ##table$with(human_resources, equipment)## → displays only the human_resources and equipment columns

  • ##table$without(subcontractor)## → displays all columns except subcontractor

💡 You can combine both tags: ##table$horizontal$with(human_resources, equipment)## displays a horizontal table with only the human_resources and equipment columns 🙌

⚠️ Reordering columns is not yet possible on export: columns keep their original order. An improvement is planned 🛠️


2️⃣ Target a specific entry or sub-field

Want to place data at a specific location in your template, or retrieve only certain information? Use the advanced tags.

The table field principle: your table field contains sub-fields (e.g. Name, Date, Signature…). These sub-fields are present in every entry — meaning every new row added to the table. When exporting, you can therefore:

  • Target a full entry (e.g. all info from the 1st row added) → ##table__1##

  • Target a specific sub-field of a specific entry (e.g. only the signature from the 2nd row) → ##table__2__signature##

The number follows the order of creation of entries in Kraaft.

Tag

Meaning

Output

##table__1##

All data from the 1st entry (all its sub-fields)

Word: Mini-table of entry 1

Excel: one row with all info from entry 1

##table__2##

All data from the 2nd entry

Word: Mini-table of entry 2
Excel: one row with all info from entry 2

##table__1__sub_field_key##

Value of a specific sub-field in the 1st entry

Word & Excel: entered value for the sub-field


🔗 Go further

Need help? Contact us via chat 💬

Did this answer your question?