Skip to main content

πŸ“€ Export reference list fields

You're using reference lists in your Kraaft reports and want to pull that data into your Word and Excel exports πŸ“? Here are all the tags you need!

⚠️ Never heard of tags before? Start with 🎨 Report tags before continuing πŸ’ͺ


🧭 3 types of tags β€” don't mix them up

A reference list in a report gives you access to 3 different export tags β€” each with a specific use:

  1. The Reference list field's tag (e.g. ##collaborateur##) β†’ exports a table with all the info for each selected entry πŸ“‹

  2. A tag targeting a specific sub-field (e.g. ##collaborateur__1__nom##) β†’ instead of the full table, it targets a single sub-field of your list (here nom) on the selected entry, and displays it as plain text, no table β€” useful in single choice mode πŸ“ The sub-field's key (here nom) comes from your reference list's structure, found in the List tab

  3. The List linked data field's tag (e.g. ##metier##) β†’ key advantage: this field also shows up directly in the filled-in report πŸ‘€ It also gives you its own dedicated export tag, in plain text, which also works in multiple choice mode (with numbering) 🎯

The rest of the article details each of these 3 tags.


🏷️ Reference list field tag

Use your Reference list field's key to automatically export the selected entries as a table:

πŸ“Œ Example: your sign-in report uses a Reference list field with the key collaborateur (auto-generated in your report), connected to your team members reference list πŸ‘· Keys like nom or metier come from your reference list's own structure β€” find them in your list's configuration (List tab) πŸ—‚οΈ

Tag

Effect

##collaborateur##

A mini-table per selected entry, with all its related info (email, contact details, reference number...) πŸ“‹ If several entries are selected, you get one mini-table per entry, one after another in your reference list's order

##collaborateur$horizontal##

Horizontal display (one row per entry) ⚠️ If your list has many sub-fields, that's a lot of columns on export: the table might get cut off or overflow the page

##collaborateur$with(nom, metier)##

Shows only the listed sub-fields' columns (here nom and metier) β€” handy to keep just the essentials

##collaborateur$without(coordonnees)##

Shows all sub-fields except the ones whose key you list (here coordonnees)

##collaborateur__headers##

Automatically adds column headers (your sub-fields' names) β€” place it right above ##collaborateur## in your Excel template. Headers update on their own if you rename a sub-field in Kraaft πŸ’‘ Excel only, doesn't work in Word

πŸ”— These are almost the same tags as for a regular table field β€” find them all in detail in 🏷️ Tags for table fields πŸ”§


🏷️ List linked data field tag

The List linked data field targets a single, specific sub-field of your reference list (for example just the job, just the contact details, or just the name) 🎯 Simply use its key to export it anywhere in your template, not just where the Reference list field sits πŸ“

The export result depends on your source Reference list field's selection mode:

  • πŸ”’ Multiple choice β€” each selected entry is numbered (1, 2, 3...), in your reference list's order. For example, if you selected 4 team members, you get their 4 jobs numbered 1 to 4, so you know which is which

  • 1️⃣ Single choice β€” no numbering: the data shows up as-is, since only one entry is selected (for example the selected team member's name)


πŸ’‘ πŸ”‘ Good to know: 2 levels of keys β€” don't mix them up

  • The field in the report (e.g. collaborateur) β€” to the right of the field, in the report template editor

  • The sub-field in the list (e.g. nom, metier, coordonnees) β€” Reports β†’ Reference lists β†’ your list β†’ List tab

⚠️ $with() and $without() only take keys from the 2nd level (your list's sub-fields), never report field keys. Using a report field key in a $with()/$without() won't work.


πŸ“ Plain text: display a single piece of info without a table

This is the most common need: no table, just one specific piece of info, displayed simply in your export.

In single choice mode β€” combine 2 keys in a single tag:

  • your Reference list field's key in the report (1st level)

  • the sub-field's key in your reference list (2nd level)

##collaborateur__1__nom## β†’ displays only the name of the selected team member, in plain text, no table βœ…

πŸ’‘ This also works with your list's title field (the one shown in the dropdown menu): it also has its own key, found in the List tab, right alongside the other sub-fields. In our example, that's exactly the case for nom: ##collaborateur__1__nom## (used above) therefore displays the selected entry's title directly.

In multiple choice mode β€” there's no equivalent with __1__ (which only targets a single entry). For plain text with several selected entries, add a List linked data field instead: only that field guarantees plain text (with numbering 1, 2, 3... if there are several entries), and you can place it anywhere in your template, not just where the Reference list field sits πŸ“


🧩 Combined case: a reference list inside a table field

Let's take the example of a site report showing today's on-site attendance πŸ‘· The table field presences holds one entry per person present, with a Reference list sub-field with the key collaborateur to select who's there (and, if needed, a List linked data sub-field to display related info).

Tag

Effect

##presences##

A mini-table per entry, merging all the table field's sub-fields one after another: a regular date field, the selected entry/entries (the title) from your Reference list sub-field, the related linked data if you added one, and the table's other sub-fields

##presences$horizontal##

Same idea, horizontally (one row per entry)

πŸ’‘ Same rule as for a regular Linked data field: if your Reference list sub-field is in multiple choice mode, the selected entries (and their linked data) show up numbered (1, 2, 3...) in list order. In single choice mode, only one result shows up, with no numbering.


⚠️ πŸ“„ Word vs Excel: 2 things to know

  • In Word, never place a tag that generates a table (##collaborateur##, ##collaborateur$horizontal##, ##collaborateur$with(...)##, ##collaborateur$without(...)##) inside a table cell in your template πŸ“ It creates a mini-table per entry β†’ that makes a table inside a table, and the export fails with "A server error occurred". Keep these tags as plain text, outside your formatting tables.

  • βœ… Need to keep your layout in a table? Use ##collaborateur__1__nom## or a Linked data field: they output plain text and go into a cell without any issue.

  • The ##collaborateur__headers## tag (column headers) only works in Excel exports, not in Word πŸ“Š


πŸ”— Go further


πŸ’¬ Need help?

If you have any questions, Contact us!

Did this answer your question?