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 ๐Ÿ’ช


๐Ÿท๏ธ 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, using their key (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__1__nom##

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)

##collaborateur__headers##

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

๐Ÿ’ก 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 column

  • Need 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

##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 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


๐Ÿ’ฌ Need help?

If you have any questions, Contact us!

Did this answer your question?