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:
The Reference list field's tag (e.g.
##collaborateur##) β exports a table with all the info for each selected entry π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 (herenom) on the selected entry, and displays it as plain text, no table β useful in single choice mode π The sub-field's key (herenom) comes from your reference list's structure, found in the List tabThe 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 |
| 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 |
| 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 |
| Shows only the listed sub-fields' columns (here |
| Shows all sub-fields except the ones whose key you list (here |
| Automatically adds column headers (your sub-fields' names) β place it right above |
π 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 editorThe 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 |
| 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 |
| 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
π·οΈ Tags for table fields β all the tags to export your table fields
π Use a reference list in a report β connect your reference list to a report template
π¬ Need help?
If you have any questions, Contact us!
