Data tree and field picker
In short
The data tree is on the left in the “Data” area and shows everything you can bring into the template: the fields of your sources, their relationships, rules and your own variables. Dragging is the main way to bring a field into the template; what is created depends on what you drag and where you drop it. A click puts the field into the input box you were last in. The same selection opens as a field picker when a condition or a value needs a field: as “Choose field” with the whole tree and as “Choose a field of this row” with the part that belongs to one row. Nothing can be dragged in a field picker; a click chooses the field. Which sources there are and how you set them up is described under Data sources and relationships.
The data tree
On the left in the main window is the “Data” area with the sentence “Drag a field into a text box or onto a text element.”. Below it, “⚙ Manage data sources” opens the “Manage data sources” window (see Data sources and relationships: The “Manage data sources” window), and below that follows the data tree: everything you can bring into the template. Below the tree is the collapsed “Structure” (see Working on the canvas: The structure).
- You drag the width of the column at its right edge (mouse pointer: “Drag to change width”); narrower or wider is possible only up to a fixed limit. Your browser remembers the width.
- Without a source there are only “Custom variables” and the note “No data source yet. Click ‘⚙ Manage data sources’ above → set the primary source.”
- In the group designer and the cell designer the same tree is in their left column, with the sentence “Drag a field onto the canvas.” and without “⚙ Manage data sources”. What you have expanded stays open there.
- You find the same tree in many windows, for example when editing text, in conditions, when choosing the columns of a table and when choosing an image. It behaves a little differently in each; this is described in The “Edit text” window: Inserting fields, The field picker further down, Data tables: The row source and Images: Where the image comes from.
- What a building block brings along is in none of these trees: neither its fields nor its relationships or rules, not even as the row source of a table. From a building block you see only its variables, in the category “Building block »Name«” (see Building blocks: The variables of the building block).
What is in the tree
When you open a template, all top-level entries are collapsed. What you expand stays open, even when the designer redraws the tree.
- 1Opens the “Manage data sources” window.
- 2Header of the primary source. The ★ marks it; ƒ creates a rule directly on this source, the info sign explains it.
- 3A field: badge (here “123” for a number or amount), name and, on the right, a suffix, here where the decimal places come from.
- 4N:1 relationship (blue): a lookup to exactly one record. You insert its fields like the source’s own.
- 51:N relationship (violet): a list, here the invoice items. Its fields carry the suffix “per row”.
- 6A rule stands directly after the relationship it belongs to. The gear opens “Edit rule”.
| Entry | What it contains |
|---|---|
| “Custom variables” | Values you define yourself: a fixed value, text or if-then. They appear as @Name with their badge. The “+ New” button in the header creates a new one; “✎” on a variable edits it. Without variables it says “None yet — create one above with »+ New«.”. Custom variables need no data source (see Variables and Variables: Custom variables in the “Data” area). |
| “System variables” | Values the system inserts: “Current page”, “Total pages”, “Current date”, “Current time”, “Date & time” and “User” (see Variables: System variables). |
| Header of a source | The name of the source, the primary source with ★. After it, “ƒ” creates a rule directly on this source (“Create a rule / view on THIS data source (filter, calculate, selection…)”); the ⓘ next to it explains this. Below it are the fields of the source, then its relationships and rules. |
| Field | Badge, name and, where applicable, a suffix (see What the badges and suffixes mean). The fields are sorted by name; lookups that are almost never meant, such as Owner, Created by, Currency or Process stage, are at the end. When you point at one with the mouse, it shows what is created when you insert it and, for numbers and amounts, the decimal places Dynamics has stored. |
| Header of a relationship | ▸, the badge “1:N” or “N:1” and the name. A click expands it; after it, “ƒ” creates a rule on this relationship (“Add rule / view (filter, calculate, selection…)”). |
| Header of a rule | ▸, the badge “ƒ” and, in bold, “Table · rule name”. It stands directly after the relationship the rule belongs to. “⚙” opens the “Edit rule” window (see Rules: The “Edit rule” window). When expanded, at the top under “Calculated fields” are the results of the rule, such as sums, and its variables, followed by the fields. |
| Rule that summarizes rows | Below it are only the fields it summarizes by, or “(one summarized row)”, plus the lists below it. If there are lists or rules below it, a yellowish sentence says “Summarized — the individual fields no longer exist here, but the lists below still do.” (see Rules: Summarizing rows). |
If you point at a field with the mouse, the relationships up to the source are highlighted. That way you see where the field comes from.
What the badges and suffixes mean
| Badge | Meaning |
|---|---|
| “Abc” | Text, also everything without a type of its own |
| “123” | Number or amount |
| “Date” | Date, also with time; printed in the template’s date format if you do not give the field one of its own in the text (see Numbers, currency and dates: Date & time and Numbers, currency and dates: The date format of a single field) |
| “Yes/No” | Yes or no; a field from Dynamics prints its label in the language of the option labels, such as “Yes” or “Paid”, a custom variable prints “Yes” or “No” in the template language (see Numbers, currency and dates: Option label language) |
| “Selection” | A choice field with fixed values, such as a status; its label from Dynamics is printed in the language of the option labels, for example “Open”. This badge has nothing to do with the “Selection” tab of a rule (see Rules: The “Selection” tab: sorting and selecting). |
| “N:1” | On the header of a relationship: the way to all fields of the record the lookup points to. Its name is inserted by the field “… (Name)” with the badge “Abc”, its internal identifier by “… (ID)”. As a field, “N:1” appears only in the process editor under “Welcher verbundene Datensatz?”, because there you choose the lookup column itself. |
| “1:N” | On the header of a relationship: a list (see Data sources and relationships: Relationships) |
| “Image” | An image from the record; dragged onto the page it becomes an image (see Images: Images from the data) |
| “File” | A column with an attached file; dragged onto the page it also becomes an image. Image and file fields come with companion fields such as “… · URL (Link)” or “… · File name”. |
| “ƒ” | A rule (see Rules) |
Sometimes there is a suffix on the right of a field:
- “per row”: The field belongs in a table cell and shows the value of that row in each row there. What happens if you drag it onto the free page is described under Clicking and dragging.
- “first value”: The field belongs to a list but is outside a table, for example a field of an additional source or, in the “Edit text” window, a field under a 1:N relationship. The value from the first row of the list is printed, one value for the whole document. The designer inserts the same value when you drag a field with the suffix “per row” onto the free page (see A “per row” field outside a table cell).
- “2 decimals” (in general: a number and “decimals”): This many decimal places are provided for the field by Dynamics. If you drag a number field into a text, the designer takes over the number of decimal places as well; you cannot change it there. If you need different decimal places, insert the value through a custom variable (see Numbers, currency and dates: Decimal places and symbol for a single field). For money fields it does not take them over; the settings of the template apply there.
- “Decimals: currency”, “Decimals: organization”: For money fields the decimal places come from the currency of the record or from the settings of your organization in Dynamics. Nothing is taken over. The decimal places of the record’s currency are fetched by the checkbox “Take the currency from the record” in the template settings (see Numbers, currency and dates: Currency from the record).
- “missing” (red, the name pale and struck through): The field or the relationship no longer exists in Dynamics (see Fields that no longer exist in Dynamics).
Searching the data tree
| Search box | What it does |
|---|---|
| “🔍 Search fields & relationships…” | At the top of the tree, as soon as there is a source. Filters all loaded entries as you type by their text and their internal name; badges and suffixes count too, so “Date” finds all date fields. Hits expand their branches, entries without a hit disappear. When you type here, the small search boxes are cleared. |
| “🔍 Search in »…«…” | Under a category with at least six entries, such as a source. Searches only the fields and relationships of this level; a relationship counts as a hit, but is not searched inside. While you search here, the other categories step back. An empty box shows everything again. |
| “🔍 Search in this relationship…” | Under an expanded relationship with more than four fields. Works like the search box of a category, only for this relationship. |
The search covers only what is already loaded. A relationship you have never expanded is not searched. If it finds nothing, it says “Nothing found.” or, if relationships are still unloaded, “Nothing found — but the search only covers what has already been loaded, and a relationship has not been loaded yet. Expand the relationship with ▸; after that the search also finds its fields.”
Clicking and dragging
Dragging is the main way to bring data into the template. What is created depends on what you drag and where you drop it:
| What you drag | Where to | What is created |
|---|---|---|
| Field | free spot on the page | A new text with this field at the spot where you drop it. If the designer shows an insertion line between two objects while you drag, what is below it moves down for it (see Working on the canvas: The insertion line). Width and positioning behavior of the new text are described under Texts: Dragging a field onto the page. |
| Field | group, also in the group designer | A new text in this group. For a group that is directly on the page, only a part of its height counts for this; how much, and what happens if you drop outside it, is described under Groups: Which area of the group counts. Width and positioning behavior of the new text are described under Texts: Dragging a field onto the page. |
| Field | existing text in a group or table cell | The field is appended at the end, with a space before it; for a text with versions, into the version that currently applies (see Texts: Content depending on a condition). Which version applies if none matches is described under The “Edit text” window: Dragging a field onto an existing text. |
| Field | existing text directly on the page | The field is not appended: the drag goes through the text, and a new text with the field is created at the spot where you drop it. The existing text stays unchanged. If you want to put the field into this text, do it in the “Edit text” window (see The “Edit text” window: Dragging a field onto an existing text). |
| Field | table cell | The field goes into the cell. What happens in which cell is described under Cells, header row and page break: Dragging fields into cells. |
| Field | input box on the right under “Properties” | The field is inserted at the cursor position. |
| Image field | page or group | An image; before that the designer asks for the image quality. On an existing text in a group or table cell, an image field does not become an image but stays there as a field; the designer points this out. More under Images: Images from the data; for an image field from a list, the relation to the row is described under Images: The relation to the row. |
| File field | page or group | An image, without a question about the image quality. |
| List (“1:N”) | page or group | The designer creates a rule and opens “Edit rule”, then the column selection, and then the data table is created (if you drop it over the middle of a group, inside that group) with its top left corner where you drop it. If you cancel, nothing is left behind (see Data tables: Creating a data table). If the designer cannot find the list, it reports “Relationship not found — please expand it in the data tree.”; expand it once and drag again. |
| List under a list, such as “Chargen” under “Positionen”, or under “Per row · …” | the opened table cell in the cell designer | A nested table, again through a new rule (see Cells, header row and page break: Tables in groups and cells). If the designer finds no opened cell as the target, it reports “Nested table: first double-click to zoom into a table cell, then drag the sub-collection into it.” |
| Rule (“ƒ”) | page or group, in the cell designer also the opened cell | A data table on this rule (dropped over the middle of a group, inside that group at the drop spot; in the cell, a nested one), with the column selection right away; no new rule is created. Under an additional source, only the rules of the source itself can be dragged onto the page (see Data sources and relationships: Getting values from an additional source). |
- Clicking: A click on a field puts it into the input box you were last in, at the cursor position. If there is none, the designer reports “First click into a text field — or drag the item in with the mouse.”.
- Field with “per row” outside a table: The designer inserts the value of the first row or refuses if it does not know the list; the messages for this are right below under A “per row” field outside a table cell.
Caution
The fields of a rule that sits on a list, such as the sum of a rule on the items, carry the suffix “per row” and currently cannot be put into a text on the page; the designer refuses them with the second message below. Even when put into an input box with a click, such a field currently does not deliver a reliable value. This does not affect fields of rules on the primary source or on an additional source. Which way works today is described under Rules: Using the result.
A “per row” field outside a table cell
A field with the suffix “per row” belongs in a table cell, because only there is there a row whose value it can show. If you drag it onto the free page instead, the designer inserts the value of the first row or refuses the field. The same applies to a cell of a free-form table that sits directly on the page: it belongs to the main record, not to a row (see Cells, header row and page break: Dragging fields into cells). Two cases are possible:
- The designer knows the list: It inserts the field, for example the quantity of an item, with the value of the first row and reports: “… applies per row — on the free page there is no row. The value of the FIRST row is therefore inserted: …”.
- The designer does not know which list the field belongs to: It creates nothing and reports: “… applies per row and needs a table cell — on the free page the place would stay empty in the PDF. First drag the collection onto the page as a table, then the field into a cell.” How to create a table is described under Data tables: Creating a data table.
The same applies to an image field or file field from a list, also in a group that sits directly on the page: the designer binds the image to the first row of the list and reports it as above, or it creates nothing and reports why. For an image field it then asks for the quality. An image that is to be a different one in each row belongs in a table cell. The product image of an item, an image field behind a lookup of the row, is the image of the product of the first item. The details are under Images: Ways in tables, groups and cells, the relation to the row under Images: The relation to the row.
Expanding, loading, depth
- Under a relationship that has never been expanded it says “▸ expand to load”. When first expanded, the designer fetches its fields and sub-relationships from Dynamics (“loading fields…”), with a sample record also its data.
- Of a list, the canvas loads at most 20 sample rows. If it has more, it reports this once; the wording and what it means for rules, sums and conditions are under Problems and messages: Messages of the canvas.
- If loading fails, it says “Fields not loaded – click to try again.”, and the designer reports once “The fields of »…« could not be loaded (missing read permission, timeout or network). A click on the relationship tries again.”. If it stays that way, clarify your rights with your administrator (see Rights and roles).
- If the designer loads the fields of a relationship but not its sample data, it reports once “⚠ The sample data of the relationship »…« could not be loaded — the canvas shows no sample values there, the printed document does. …”. Only what the canvas calculates in the background is affected; the document fetches its data itself.
- From the sixth relationship level on, the tree no longer offers relationships and rules and says “This is as deep as it goes: relationships are printed up to the sixth level.”. A rule does not count as a level of its own.
Where such messages appear is described under Problems and messages: Where the messages appear.
Fields that no longer exist in Dynamics
When you open a template, the designer compares its sources with Dynamics. New fields and relationships are added, labels and types are refreshed. What no longer exists in Dynamics stays with the suffix “missing”, so that you can see what the template points to. Nothing is deleted. The comparison reports:
- “Data sources compared: … newly taken over from Dynamics.”: This note appears almost every time you open a template, because the template saves only the fields and relationships it uses, and the comparison fetches the rest again. It does not mean that something has changed in Dynamics. After an import it does not appear;
- “⚠ Caution: … no longer exists in Dynamics …” if the template uses such a field or relationship; depending on the case the message says that the places in the document stay empty, that what is fetched through the relationship stays empty, or that the field is in a custom variable, a rule filter or a sort order;
- “During the comparison with Dynamics: … no longer exists. The template does not use it …” if only something unused is missing;
- “⚠ The comparison with Dynamics failed for … (…). The variable tree is therefore incomplete — printing is still correct. Reload the template when the connection is back.”
Replace fields with “missing” with others or remove them, and check the result in the full preview.
The data tree in the cell designer and column designer
If you edit a data cell or an extra row of a data table in the cell designer or column designer, the tree has two entries of its own under “Custom variables” and “System variables” instead of the sources (see Cells, header row and page break: Designing with a double-click):
- “Per row · …” (violet background): the fields of a table row, with the suffix “per row”. First, under “Calculated fields”, are the results of the rule, then its fields. If the rule summarizes, there are only the fields it summarizes by, or “(one summarized row — only the calculated fields and the lists below it)”, plus the lists below it. These lists become nested tables.
- “All fields”: per source, with ★ and “ƒ”, the fields outside the row, without lists. They show the same value in every row.
In a header cell there is no row relation; “Per row · …” is missing there. If you select a table only on the page without opening it, the left tree continues to show the normal view.
The same two entries, “Per row · …” and “All fields”, are shown by the field picker “Choose field” when the object is in a cell of a data table (see The “Choose field” window).
The field picker
The “Choose field …” button opens one of two field pickers, depending on where you are. “Choose field” shows the same tree as the “Data” area on the left (see The data tree), “Choose a field of this row” an excerpt of it. Nothing can be dragged in it: a click on a field chooses it and closes the window.
- “Choose field” shows the whole data tree. It is opened by the visibility rule, the image rule, the dynamic text, the condition branches of a custom variable and the condition branches of the template settings, and also by “Choose variable …” with “ƒx”. If the object is in a cell of a data table, it additionally shows the fields of that row. For the content of a code and the fields of the GiroCode it is called “Choose variable”, offers no image and file fields and has the button “New custom variable …” at the bottom, which creates and inserts a custom variable (see Barcode, QR code and GiroCode: What goes into the code).
- “Choose a field of this row” shows only the row that is currently being checked and what lies below it; nothing from above. It is opened by the filter of a rule, the condition branches of a variable of the rule and the cases “Depending on a condition” in the button assistant.
System variables such as the page number are not available for conditions in either picker: the page number only comes into being once it is settled what is printed.
The “Choose field” window
- 1Closes without a choice. A click next to the window and the Esc key do the same.
- 2Has the focus when opened and filters the tree as you type.
- 3“Custom variables” is always at the very top.
- 4Each source is a category of its own; ★ marks the primary source, ƒ creates a rule.
- 5A click chooses the field and closes the window.
| Control | What it does |
|---|---|
| × in the header | Closes without a choice. A click next to the window and the Esc key do the same; Esc closes this picker before all other windows. |
| “Search all fields …” | Has the focus when opened. Filters the tree as you type, also by the internal names of the fields; hits expand. Without hits it says “Nothing found.”. If a relationship has not been loaded yet, the note says that only what has been loaded is searched: expand the relationship with ▸; after that the search also finds its fields. |
| “Custom variables” | Always at the very top (see Conditions: Custom variables in a condition). |
| “Per row · …” | Only in a cell of a data table: for an object or a text in such a cell. Contains the fields of that row; what exactly is under it, also for a rule that summarizes, is described in The data tree in the cell designer and column designer. If the fields have not been loaded yet, it says “loading fields…”. |
| “All fields” | Only in a cell of a data table: below it, per source, a header, the primary source with ★. What is under it is described in The data tree in the cell designer and column designer. |
| Source with ★ | Outside a cell of a data table, each source is a category of its own; ★ marks the primary source. The ƒ sign on the header creates a rule on this source. |
If there is more than one category, all start collapsed. Between two openings the tree keeps what was expanded. It highlights the field that is already chosen in this condition; not for a summary. If the template has no source yet, it says “No data source yet. Click ‘⚙ Manage data sources’ above → set the primary source.”; the custom variables are still available. The same picker is also opened by places outside the conditions, such as the value of a custom variable.
The “Choose a field of this row” window
| Control | What it does |
|---|---|
| ✕ in the header | Tooltip “Close”. Closes without a choice; a click next to it and the Esc key do the same. The window can be enlarged by dragging its edges. |
| Note under the title | In the filter of a rule: “The filter runs per row. Through a relationship you reach its fields; for a 1:N relationship, choose the summary (sum, count, …) on the right of the field. It is calculated after loading and costs no additional query.” In the condition branch of a variable of the rule it begins with “The condition is checked for each row separately.” and ends with “A rule cannot see upwards.”. In the button assistant: “Only the fields this template uses are checked — the same ones the document uses.” |
| “🔍 Search…” | Has the focus when opened and filters the tree as in the large picker. |
| “Custom variables” | Only in the filter of a rule and in the condition branch of a variable of the rule. |
| “Row from »…«” | Open header; names the list or table whose row is being checked. |
| “Felder dieser Zeile (…)” | The row’s own fields, with their number. A lookup appears as a field “… (Name)” with the badge “Abc”, next to it “… (ID)”. Collapsed if the row has relationships, otherwise open. |
| “Via a relationship — here you get Sum, Count, Avg, Min, Max” | Open; only if the row has relationships. Contains the lookups (N:1) and lists (1:N) of the row together with their rules. On the fields of a list you choose the summary. |
In the button assistant the picker shows only the fields the template carries from its primary source, without relationships, rules and custom variables. For the value of a variable of the rule there is the same tree as “Choose a field for the variable”, without custom variables and limited to the type of the variable (see Rules: The “Variables” tab: values per row).
The tree in the field picker
The tree is built like the “Data” area on the left: relationships load when first expanded (see Expanding, loading, depth), “missing” marks what no longer exists in Dynamics (see Fields that no longer exist in Dynamics), after the sixth level it ends, and long categories and relationships have a search box of their own (see Searching the data tree). Badges such as “123”, “Date”, “Selection” or “N:1” mean the same as there (see What the badges and suffixes mean). Unlike there:
- A click chooses the field.
- On the fields of a list the summary is on the right (see Conditions: Sum, count and so on over a list).
- The “+ New” button creates a custom variable of the document, also in “Choose a field of this row”; ✎ on a variable opens it for editing. If you opened the field picker from the open window of a variable, use neither “+ New” nor ✎ there; why is described under Variables: Other ways into the window. In the pickers of the e-invoice, “+ New” and ✎ are missing (see E-invoice: ZUGFeRD and XRechnung: Choosing a value).
- ƒ on a relationship or source creates a rule, ⚙ on a rule opens it. The rule window opens over the picker; afterwards the picker shows the changed rule. How to create and edit a rule is described in the chapter Rules: Creating a rule.
What changes in the document?
On the canvas
The data tree and the field pickers belong only to the designer. A field you drag onto the page appears there as a blue marker with its name, not with its value; an image field shows the image of the sample record. Of a list, the canvas loads only the first sample rows, and rules, sums and conditions on the canvas calculate with these.
In the PDF
Each field shows the value of the record being printed for, from the designer that of the sample record. A field with the suffix “per row” shows the value of that row in each row of a table; outside a table the value of the first row of the list is shown. Exceptions are described under A “per row” field outside a table cell. All rows of a list are printed.