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 ๐ช
๐ท๏ธ 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, using their key (here |
| Shows all sub-fields except the ones whose key you list (here |
| Targets a specific piece of data on the 1st selected entry: your report's Reference list field โ the 1st entry selected in your report (the 1st team member) โ a sub-field defined in your list (here the name) |
| Automatically adds column headers (your sub-fields' names) โ place it right above |
๐ก The $with and $without tags are there to lighten the horizontal display when your list has a lot of fields ๐ฏ Use your reference list's sub-field keys (here nom, metier, coordonnees), found in your list's configuration ๐
๐ก Tip โ get a data point without adding a Linked data field
Just need one specific piece of data on export?
$with()isolates it (e.g.##collaborateurs$with(nom)##), but the output stays in table mode, even reduced to a single columnNeed plain text, no table? In single choice mode,
##collaborateurs__1__nom##is enough. In multiple choice mode, add a List linked data field instead: only that field guarantees plain text (with numbering if needed)The Linked data field is also useful if you want to display this info directly in the filled-in report ๐
๐ 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)
๐งฉ 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 Reference list or table field tag inside a table cell in your template: it can cause an export error. Keep them as plain text, outside your formatting tables ๐
The
##collaborateurs__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!
