# Smart Templates · Manual

> All pages of the manual in one file: for AI assistants to read and for searching. Generated by tools/doku/handbuch_bauen.js from the manual pages — do not edit by hand.

Smart Templates is a designer for PDF templates in Dynamics 365: you design a document once as a template, and Dynamics fills it with the matching data for every record. Labels from the program are shown in “…”. Images are replaced by their description ([Image: …]); “image marker 1” means the number 1 in the image. Below each title you see where the page is in the manual. The images still show the German user interface; the labels in this file are the English ones.

> **For the AI:** Whoever gives you this file wants to work with Smart Templates and be guided by you. Answer in the user’s language and step by step, one step at a time. Name buttons, fields and windows exactly as they appear here in “…”. If it is unclear where the user is, ask for a screenshot and compare it with the image descriptions. Stick to what is written here; if something is not in it, say so instead of guessing.

## Contents

- For users
   - Getting started › The basic idea
   - Getting started › Your first template
   - Getting started › Opening Smart Templates
   - Getting started › Creating a new template
   - Getting started › The designer at a glance
   - Using the designer › The header bar
   - Using the designer › Managing templates
   - Using the designer › The ribbon
   - Using the designer › Working on the canvas
   - Using the designer › Working with AI
   - Using the designer › Working with the AI assistant in Copilot
   - Using the designer › Working with an external AI
   - Objects › Texts
   - Objects › The “Edit text” window
   - Objects › Images
   - Objects › Shapes
   - Objects › Barcode, QR code and GiroCode
   - Objects › Groups
   - Objects › Building blocks
   - Tables › Data tables
   - Tables › Free-form tables
   - Tables › Cells, header row and page break
   - Properties of all objects › The properties panel
   - Properties of all objects › Position, size, rotation and arrangement
   - Properties of all objects › Positioning behavior
   - Properties of all objects › At the page edge: keep together or split
   - Properties of all objects › Border, background and colors
   - Properties of all objects › Visibility
   - Data › Data sources and relationships
   - Data › Data tree and field picker
   - Data › Conditions
   - Data › Rules
   - Data › Variables
   - Template and pages › Template settings
   - Template and pages › Numbers, currency and dates
   - Template and pages › Image library and fonts
   - Template and pages › Pages, header and footer
   - Template and pages › E-invoice: ZUGFeRD and XRechnung
   - Printing and Dynamics › Full preview and PDF
   - Printing and Dynamics › Buttons: the assistant
   - Printing and Dynamics › Adding, changing and removing a button
   - Printing and Dynamics › What happens on click
   - Printing and Dynamics › Flows
   - Help and reference › Problems and messages
   - Help and reference › Keyboard shortcuts
   - Help and reference › Glossary
- For administrators
   - How to get Smart Templates
   - Setup at a glance
   - Installing the solution
   - Rights and roles
   - Assigning a security role
   - Fonts and images
   - Keep warm
   - Preparing buttons and flows
   - Turning on Copilot
   - License & updates › Prices and licensing options
   - License & updates › The trial period
   - License & updates › The “License & updates” page
   - License & updates › Buying or subscribing
   - License & updates › Payment, invoices and renewal
   - License & updates › Your invoices
   - License & updates › The maintenance contract
   - License & updates › From subscription to purchase
   - License & updates › Canceling and the customer portal
   - License & updates › Synchronization and entering the key by hand
   - License & updates › Updates and new versions
   - License & updates › News
   - License & updates › When no license is valid
   - License & updates › Frequently asked questions about license & updates
- For developers
   - Actions and APIs
   - Template format
   - Own standards for the e-invoice
   - AI package: structure of the file

---

## The basic idea

*For users · Getting started · Page en/grundgedanke.html*

> **In short:** A template defines once what a document looks like: what goes where on the sheet and which data from Dynamics 365 belongs in it. For each record, such as each quote, Smart Templates fills the template with the matching values and turns it into a PDF.
>
> If you already know this from another template tool, you can skip this page and start right away with Your first template.

### One template for many documents

A quote to Contoso Handels GmbH looks exactly like one to Fabrikam AG. Only the content differs: name and address, the line items, the totals. The template describes what stays the same. The data from Dynamics supplies what changes.

- A template belongs to a table in Dynamics, for example to “Quote” or “Invoice”. In the designer, this table is called the template’s primary source.
- Printing is always for one specific record of this table, that is, for one specific quote or one specific invoice.
- A template applies to all records of this table. If you change the template, all future documents look different.

### What is on the sheet

The template is a sheet, usually in DIN A4 format. You place objects on it:

| Object | What it is for |
|---|---|
| “Text” | Fixed words such as “Quote” and fields from Dynamics, for example the quote number. |
| “Image” | Your logo or an image from a record, for example a product photo. |
| “Shapes” | Lines, rectangles and other shapes, for example a divider line below the letterhead. |
| “Group” | A container for things that belong together, for example an address block or a totals block. |
| “Data table” | A list from Dynamics, row by row, for example the line items of a quote. |
| “Free-form table” | A table whose rows and cells you fill yourself, for example a header block with address and document data or signature fields. It does not fetch rows from Dynamics; individual fields can, however, appear in its cells. |

In a text, besides fixed words, fields from Dynamics can also appear, for example the customer’s name. Such a field is called a placeholder: it holds the place for a value in the text. On the canvas it appears as a blue marker with the name of the field. In the PDF, the value of the record being printed appears there.

[Image: Two excerpts of the same invoice header, one below the other. At the top, the canvas in the designer on the white sheet: on the left a sender line made of the blue markers “Firmenname”, “Straße”, “PLZ” and “Ort”, and below it the address block with the markers “Name”, “Straße”, “PLZ” and “Ort” side by side as well as “Land”; on the right a light gray frame with the labels “Rechnungs-Nr.”, “Rechnungsdatum”, “Leistungsdatum”, “Kunden-Nr.”, “Zahlbar bis” and “Status”, each followed by a blue marker (“Rechnungsnummer”, “Rechnungsdatum”, “Leistungsdatum”, “Kundennummer”, “Zahlungsziel”, “Zahlungsstatus”); below that the heading “Rechnung” with the marker “Rechnungsnummer”. At the bottom, the same excerpt in the PDF: instead of the markers, the values appear, namely the sender line “Dyn365 Smart Templates · Musterstraße 12 · 10115 Berlin”, in the address block “Contoso Handels GmbH”, “Industrieweg 8”, “80331 München” and “Deutschland”, in the frame “RE-2026-000142”, “27.06.2026”, “20.06.2026”, “K-100245”, “11.07.2026” and “offen”, and the heading “Rechnung RE-2026-000142”.]
Caption: The same excerpt of an invoice: at the top in the designer, at the bottom as a PDF.
- Image marker 1: On the canvas, each field is represented by a blue marker with the name of the field.
- Image marker 2: In the PDF, the value from the record appears in the same place.

What all objects have in common, such as position and size, positioning behavior, border and background, or visibility, is described once each in the group Properties of all objects.

### Where the data comes from

On the left in the designer is the “Data” area. There you find everything the template can read from Dynamics:

- **The primary source** with its fields, for a quote for example number, date and total amount. It is marked with a star.
- **Relationships** lead on to connected records: from the quote to the customer, from the customer to their contact person, from the quote to its line items. This goes up to six steps deep.
- **Rules** determine which rows of a list appear on the document and in what order. For example, only line items with a quantity above zero, sorted by line number. A rule can also summarize, for example the total per tax rate.
- **Custom variables** are values that you set yourself or have calculated, for example a salutation that depends on the customer’s country.
- **System variables** supply information such as today’s date, the user who is printing, and the page numbers.

More on this under Data sources and relationships, Rules and Variables; how to build a condition is described under Conditions.

> **Good to know:** The template does not store any values from your data. It only describes which fields it needs and fetches the values from Dynamics only when printing. Only the ID and name of the sample record are stored in the template, including in an exported file.

### The designer at a glance

You open the designer in Dynamics in the “Smart Templates” app: on the left in the navigation, click “Designer”. Which template opens in the process, and how reloading and bookmarks open the same one again, is described under Managing templates: Which template opens. You choose a different one in the “Template” field in the template row.

How the areas of the designer look and what each contains is shown in The designer at a glance. The buttons of the three bars at the top are described in The header bar, Managing templates and The ribbon. The messages and confirmation prompts are described under Problems and messages, the keys under Keyboard shortcuts.

### What the canvas shows

In the middle of the designer you see the sheet with the same font and the same dimensions as in print. Fields from Dynamics appear on it as blue markers with their name, for example “Name” or “Total amount”; only images from a data field are already shown on the canvas with the image of the sample record. What only the real data brings about is not shown by the canvas: a data table appears there with one sample row, flowing objects stand at their drawn position, visibility rules have no effect, and an area that runs over the page edge in print is hatched in orange at the edge. All differences between the canvas and the PDF are described under Full preview and PDF.

How the document really looks with the real values, for example whether a long company name still fits in the line, you see at the top with “Full preview” or “PDF”, even with unsaved changes; what still differs from printing in Dynamics is described under Full preview and PDF: Full preview and printing in Dynamics.

### How the template becomes a document

The document is generated in Dynamics, not in the designer. To do this, you set up a button on the table, for example on the quote, using “Manage buttons in Dynamics”. A click on it builds the document for the open record and shows it in a new tab. From there you save or print it. Nothing is stored in Dynamics in the process.

A button can also put the document straight into an email that you see once more before sending, or send it by email without asking. Sending immediately does not work with every template, because the email goes to the printed record itself; which templates this applies to is described under Buttons: the assistant: What should the button do?. How a button is created and how a flow in Power Automate generates documents is described under Buttons: the assistant and Flows.

> **Tip:** Start with an existing template that resembles your document, and change it. “Duplicate” creates a copy that you can work on safely.

---

## Your first template

*For users · Getting started · Page en/erste-vorlage.html*

> **In short:** You get to your first template in four steps: make sure you have the security role, open Smart Templates, create a new template, and place the first objects and fields on the sheet. Then you check the result with “Full preview” and secure it with “Save”.

### The way to your first template

1. Make sure you have the security role “Smart Templates Designer” or the role “System Administrator”; without one of the two, the designer cannot load the templates. An administrator assigns the role “Smart Templates Designer” as described under Assigning a security role.
2. In Dynamics, open the “Smart Templates” app; it shows the designer right away. How to do this is described under Opening Smart Templates.
3. Create a new template with “New”. If there is no template at all yet, the window “Welcome to Smart Templates” appears when you open the designer; “Create first template” leads to the same window. The two steps of the window are shown in Creating a new template.
4. Place objects and fields on the sheet, check the result and save, as described below.

### Dragging an object onto the sheet

Below the template row is the ribbon with everything you can place on the sheet. Drag “Text” onto the sheet with the mouse and release: a new text is created at that height. Double-click it to open the “Edit text” window and write your text; for the first text of a template, a speech bubble reminds you: “Double-click to edit the text”.

[Image: The designer’s ribbon: the buttons “Text” and “Image” (group “Elements”), “Group” (“Containers”), “Shapes”, “Barcode”, “QR code” and “GiroCode” (“Codes”), “Data table” and “Free-form table” (“Tables”) as well as “Blank page” and “Page break” (“Page”).]

You place an image, a shape, a code or a table on the sheet in the same way. A click on a button inserts the object as well; where it goes is described under The ribbon: Where a click inserts.

### Moving and resizing

A click selects an object: it gets a blue frame with small handles, and its settings appear on the right in the “Properties” area. Drag the object (image marker 1) with the mouse to another place; you change its width with the handles (image marker 2). More on this is described under Working on the canvas.

[Image: Excerpt of the new sheet: at the top the header with the large, bold text “Kopfzeile” above the blue line and the group with the bold blue text “Gruppe”, below it a selected text “Vielen Dank für Ihren Auftrag.” with a blue frame and one small square handle each on the left and right.]

### Editing with a double-click

You open texts, groups and table columns with a double-click. A separate window opens in which you can edit the content much better than on the sheet:

| Double-click on | What opens |
|---|---|
| a text | The “Edit text” window: there you write and format the text and insert fields (see The “Edit text” window). |
| a group, including the header or footer | The group designer: a separate window in which the group is the work area. There you place and arrange its objects as on a sheet (see Groups: Opening, going deeper, going back). |
| a cell of a data table | The column designer: what you design there applies to this column in every row (see Cells, header row and page break: Designing with a double-click). |

What a double-click opens on header cells, free-form tables and other objects is described under Working on the canvas: The double-click.

### Inserting a field

1. On the left in the “Data” area, expand the primary source; it carries a star. With the search box “🔍 Search fields & relationships…” you find a field faster.
2. Drag the field onto the sheet with the mouse. On a free spot, a new text with this field is created. What happens when you release it on an existing text, in a group or in a table cell is described under Data tree and field picker: Clicking and dragging and, for an existing text, under The “Edit text” window: Dragging a field onto an existing text.

On the sheet, the field appears as a blue marker with its name; you see the value in the full preview and in the PDF.

[Image: Excerpt of the designer. On the left the “Data” area with the button “Manage data sources”, the search box “Search fields & relationships…”, the collapsed entries “Custom variables” and “System variables” and the expanded primary source “Rechnung” with a star. Below it a search box of its own and its fields “Rechnungsnummer”, “Rechnungsdatum”, “Leistungsdatum”, “Fälligkeitsdatum” and “Bezahlt”, each with a small colored marker for the type (“Abc”, “Date”, “Yes/No”). Then the expanded relationship “Firma · Kunde” with the marker “N:1”, a search box and the fields “Kundennummer”, “Name”, “Straße”, “PLZ”, “Ort” and “Land”. Next to it on the right, smaller, the invoice sheet: at the top the logo and the markers for company name and address, below it the address block made of blue markers, “Name”, “Straße”, “PLZ” and “Ort” side by side and “Land”, and to the right of it a frame with the document data. Next come the heading “Rechnung” with the marker “Rechnungsnummer”, the introduction, the line item table, the payment note with the stamp “BEZAHLT”, the totals block, the bank details and the closing greeting.]
Caption: A field from the “Data” area becomes a blue marker on the sheet.
- Image marker 1: The primary source, expanded. It carries a star.
- Image marker 2: A field, here “Name” from the relationship “Firma · Kunde” of the primary source. You drag it onto the sheet with the mouse.
- Image marker 3: On the sheet, it becomes a blue marker with the name of the field.

How you put fields into a text is described under The “Edit text” window: Inserting fields; how they are printed and how you change their format, under Numbers, currency and dates: How fields are printed; what the “Data” area shows, under The data tree.

Fixed words around a field, for example “Quote no.”, you write in the text itself: double-click the text and write in the “Edit text” window. The fields are on the left; a click inserts one at the cursor (see The “Edit text” window). “Apply” puts the text onto the sheet.

> **Tip:** Fields from a list, for example the line items of a quote, belong in a data table. To do this, drag the relationship itself onto the sheet; it is named after the table it leads to and the connecting field, for example “Angebotsposition · Angebot”, and carries the badge “1:N”. The window for the rule and the column selection open, and then a table is created with one row per line item. More under Creating a data table.

### Checking with full preview and PDF

At the top in the header bar are “Full preview” and “PDF”. Both generate the document for your sample record, with the real values from Dynamics and in the same way as a button or a flow later does, but from the state that is currently open. What can still differ is described under Full preview and printing in Dynamics.

- **Full preview** shows the document in a window. From there you can save it with “Download PDF”.
- **PDF** immediately downloads the document as a file.

[Image: The full preview above the designer: at the top a white bar with the title “Full preview” and, on the right, the buttons “Download PDF” and “Close”, below it the document as a PDF in the browser’s viewer, a whole page of an invoice with the values of the sample record.]
Caption: The full preview shows the document as a real PDF.
- Image marker 1: The document with the values of your sample record.
- Image marker 2: “Download PDF” saves it as a file.

You do not have to save for this. If no sample record has been chosen yet, the designer asks for one.

You choose a different sample record under “Template settings”, “Data” tab, section “Sample record”. Do check several: a customer with a long name, a quote with many line items.

### Saving

Click “Save” at the top right. From then on, all buttons and flows in Dynamics print with this version (see Managing templates: Saving).

[Image: The second row of the template row: on the left the buttons “AI package”, “Upload AI changes”, “AI assistant”, “Duplicate” and “Rename”, on the right “Delete” in red and the blue button “Save”.]
Caption: On the right in the template row.

If anything is still unsaved, the designer asks before you open another template or leave the page.

> **Good to know:** In the “Template settings” window, the button at the bottom is called “Apply”: it applies the settings to the template. Saving happens only with “Save” at the top right.

Further commands for the whole template are “Duplicate”, “Rename” and “Delete”. What each command does and reports in detail is described under Managing templates: Duplicating, renaming, deleting.

> **Tip:** Do you want to try something without putting the template that is currently being printed at risk? Create a copy with “Duplicate” and work there.

---

## Opening Smart Templates

*For users · Getting started · Page en/app-oeffnen.html*

> **In short:** You find the designer in Dynamics 365 in the app “Smart Templates”. Choose the app; it opens the designer right away.

### Choosing the app

1. Open Dynamics 365 in the browser. Usually your default app opens first, for example “Sales Hub”. If the overview “Published apps” appears instead, continue with step 3.
2. In the bar at the top, click the name of the app that is currently open. The window “Apps” opens with all the apps you are allowed to open. [Image: The dark header bar of Dynamics: on the left the icon with nine dots, “Dynamics 365” and next to it the name of the open app “Sales Hub”, on the right icons for search, notifications, new, filter, settings and help.]
3. At the top of the window “Apps”, type “Smart Templates” into the search box and click the tile of the app. [Image: The window “Apps” over the app: at the top the search box with “Smart Templates” as well as “Create new app”, “Refresh” and “Filter”, below it “Published apps (1)” and a single tile with the Smart Templates icon on a dark blue background, the name “Smart Templates” and the line “Template designer and management”.]

> **Good to know:** If you cannot find the app, contact your administrator. What you need to design templates is described under Rights and roles: Designing templates.

### What you see after opening

The app opens the designer immediately. The template that comes first in the list sorted by name is loaded. You choose a different template at the top in the field “Template”. If there is no template yet, for example right after installation, the window “Welcome to Smart Templates” appears instead, with the button “Create first template” (see Managing templates: If there is no template yet). How the designer is laid out is shown in The designer at a glance.

[Image: The designer in the app “Smart Templates” in Dynamics. At the very top the dark Dynamics bar with “Dynamics 365” and the name of the app “Smart Templates”, on the left a narrow bar with icons. Next to it the designer: at the top zoom, “Gridlines”, “Full preview”, “PDF”, “Manage buttons in Dynamics” and “Manage flows”, below them the template row with the field “Template” and the name “Demo-Rechnung (Handbuch)” as well as the buttons “Template settings”, “New”, “Import” and others, on the right “Delete” and “Save”. Below that the ribbon, on the left the area “Data”, in the middle the sheet of an invoice with blue field markers, on the right the area “Properties”.]

### The navigation of the app

On the left in the app is the Dynamics navigation. You expand it with the button with three lines at the very top. Under “Templates” are the entries of the app:

[Image: The expanded left navigation of the app “Smart Templates” on a light gray background: at the top the button with three lines, below it “Home”, “Recent” and “Pinned”, then the heading “Templates” with the entries “Designer”, “Image assets” (highlighted, with a blue bar on the left), “Fonts” and “Smart Templates”, each with its own icon: clipboard, image, “Aa” and sheet.]
- Image marker 1: “Designer”: this is where you open the designer.
- Image marker 2: “Image assets”: the uploaded images, for example your logo (see Fonts and images).
- Image marker 3: “Fonts”: the uploaded fonts.
- Image marker 4: “Smart Templates”: the list of your templates.

Under “Smart Templates” there is also the entry “License & updates”, with a key as its icon. There all users see the status of your license and the installed version; administrators there subscribe, buy and set up synchronization with the license service (see The “License & updates” page).

> **Caution:** Always open the designer through the app, not through a direct link to its file. Without the app, it lacks the connection to Dynamics, and it reports this at startup.

How to create a new template is described under Creating a new template.

---

## Creating a new template

*For users · Getting started · Page en/vorlage-anlegen.html*

> **In short:** A new template is created in two steps: first name and primary source, then page, font and number formats. Afterward the sheet holds a basic framework that you continue to design.

### Click New

At the top in the template row, click “New”.

[Image: The template row at the top of the designer: on the left “Template” with the field “Rechnung (Handbuch)”, next to it the buttons “Template settings”, “New”, “Import” and “Export”.]

### Step 1: Name and primary source

The window “New template · Step 1 of 2” opens.

1. Under “Template name”, enter a name, for example “Auftragsbestätigung”. [Image: The upper part of the window “New template · Step 1 of 2”: the title, a short note that the data comes first, and the field “Template name” with “Auftragsbestätigung”.]
2. Under “Data source”, click “⚙ Choose data source …”. The window “Manage data sources” opens. [Image: The section “Data source” in the step 1 window: the wide button “⚙ Choose data source …” and below it, in red, “A template cannot be created without a primary source.”]
3. Click “★ Set primary source”. [Image: The upper left part of the window “Manage data sources”: the note “No primary source yet. Choose the table this template prints from — fields and relationships then come from Dynamics.” and below it the blue button “★ Set primary source”; next to it on the right “Choose a data source on the left — its record from Dynamics will appear here.”]
4. In the window “Choose a table”, find the table you want to print for, such as “Quote” or “Order”, and click it. [Image: The window “Choose a table” with a close mark at the top right and a search box containing “Angebot”. Below it the result list; each row shows on the left the display name of a table and on the right, in gray, the name under which Dynamics keeps it. In first place is “Angebot” (quote), followed by “Angebotskunde”, “Angebotsposition” (quotedetail) and further tables whose display name begins with “Angebot”. The last row is cut off at the bottom; the list can be scrolled further.] The table selection: typing filters the list. 1Typing filters the list. The search covers the display name and the name under which Dynamics keeps the table (on the right in gray). 2A click on a row chooses that table as the primary source.
5. Right afterward, the designer asks for a “Sample record” on which you will check the template later. Click a record (image marker 1) or “Continue without a sample record” (image marker 2). [Image: The window “Choose sample record · Rechnung”: at the top a search box and the selection of the view, below it the wide button “Continue without a sample record” and a table of records, each with invoice number, name and total amount.] Here for an invoice; for a quote the window looks exactly the same.
6. Back in the “Manage data sources” window, click “✓ Confirm” at the bottom right, not “Close” at the top right.
   → The designer then reports that you should still press “Save” to store this in Dynamics. When creating a template, this does not apply: the template is created at the end with “Create template”.
7. Step 1 now shows “⚙ Manage data sources — Primary source: Angebot” and “Ready”. Click “Continue to settings →”. [Image: The window “New template · Step 1 of 2”, completely filled in: name “Auftragsbestätigung”, under “Data source” the button “⚙ Manage data sources — Primary source: Angebot” and the note “Ready. Additional data sources are optional …”; at the bottom “Cancel” and the blue button “Continue to settings →”.]

### Step 2: Page, font and numbers

After “Continue to settings →”, the process continues in the same flow: the window “New template” opens with the settings. At the top it says “Step 2 of 2”, and next to it once more the name and the primary source. Below are the template’s basic settings in tabs:

| Tab | What you set there |
|---|---|
| “Page” | The page size, the margins, the guides of the canvas, the default for the header row of tables and the name of the file (default: the name field of the primary source, see Template settings: PDF name). |
| “Font” | The font for all texts without a font of their own. |
| “Numbers & date” | The “Template language” for date and numbers, the date formats and the currency. |
| “E-invoice” | Whether the template additionally generates an e-invoice, according to which standard and with which output (see E-invoice: ZUGFeRD and XRechnung). At the top is the AI box; the button “Open AI assistant” is gray there until the template has been created with “Create template” (see E-invoice: Assigning with AI). |
| “Data” | Keep warm, the data sources and the sample record. |

It is the same window that you later open via “Template settings”; what each setting does is described under Template settings.

To begin with, the defaults are enough; you can change everything later via “Template settings”. Click “Create template”.

[Image: The window “New template”, step 2 of 2, with the name “Auftragsbestätigung” and “Data source: Angebot”. The tabs “Page”, “Font”, “Numbers & date”, “E-invoice” and “Data”; “Page” is open with the page size “A4 (210 × 297 mm)”, the margins 18, 15, 18 and 20, the check mark “Show guides in the designer” and the section “Tables” with the check mark “Repeat header row on following pages”. At the bottom “Cancel” and the blue button “Create template”.]

With this, the template is created in Dynamics immediately and appears in the list for everyone; if you decide not to keep it after all, remove it with “Delete”.

> **Good to know:** If you cancel, with “Cancel”, the Esc key or a click next to the window, the designer asks in the window “Discard new template?”; in step 1 only if you have already entered something. “Discard” discards name, primary source and settings, and the template that was open before is back unchanged. You cannot go back from step 2 to step 1.

### What is on the sheet afterward

A new template is not a blank sheet but a basic framework of three parts:

[Image: A new, otherwise empty A4 sheet on the canvas. At the top a blue dashed frame with the large, bold text “Kopfzeile” on the left and a blue line at its bottom edge; below it a gray dashed frame with the bold blue text “Gruppe”; at the very bottom a blue dashed frame with a thin gray line, on the left the small text “Fußzeile” and on the right the small text “Seite”, the blue marker “Page #”, “von” and the blue marker “Pages Σ”. The rest of the sheet is white.]
Caption: A new template after “Create template”. The dashed frames are shown only by the canvas.
- Image marker 1: The header, 26 mm high, with the text “Kopfzeile” (16 pt, bold, dark blue) and a blue line. It repeats on every page.
- Image marker 2: A group with the text “Gruppe” (13 pt, bold, blue). It appears only once, on the first page. It is at least 20 mm high and grows with what you put into it: “Automatic height (fit to content)” is switched on.
- Image marker 3: The footer, 12 mm high, with a gray line, on the left the text “Fußzeile” and on the right the page number (both 7.5 pt, gray). It repeats on every page; the blue markers become the numbers in the PDF.

The texts are only examples: replace “Kopfzeile” with your logo, for example, and “Gruppe” with address and document data. You can change or delete all parts; more on this is described under Pages, header and footer.

### Good to know: primary source and data sources

All the fields the designer offers you come from the primary source. You do not need further sources to begin with. Everything about the primary source, further sources and the sample record is described under Data sources and relationships.

> **Good to know:** The primary source cannot be swapped for a different table later; if you made a mistake, cancel the draft and start over with “New” (see Data sources and relationships: Setting the primary source).

How to continue is shown in Your first template: Dragging an object onto the sheet.

---

## The designer at a glance

*For users · Getting started · Page en/oberflaeche.html*

> **In short:** The designer has four areas: at the top the header with three bars, on the left the data, in the middle the canvas with the sheets, and on the right the properties of the object you clicked. A click selects an object; a double-click opens texts, groups and table cells for editing (see Working on the canvas). This page shows what is where and, for each area, points to the page that explains it in detail.

[Image: The designer with the template “Rechnung (Handbuch)”. At the very top the header bar: on the left a colored square and the title “Smart Templates – Designer”, on the right zoom with a slider and percentage, “Gridlines”, the arrows for Undo and Redo, “Full preview”, “PDF”, “Manage buttons in Dynamics”, “Manage flows” and the language selection “Automatic (Deutsch)”. Below it the template row with the field “Template” (“Rechnung (Handbuch)”), “Template settings”, “New”, “Import”, “Export”, “AI package”, “Upload AI changes”, “AI assistant”, “Duplicate”, “Rename”, on the right the red “Delete” and the blue button “Save”. Below that the ribbon with “Text” and “Image” (Elements), “Group” (Containers), “Shapes”, “Barcode”, “QR code” and “EPC QR code (GiroCode)” (Codes), “Data table” and “Free-form table” (Tables), “Blank page” and “Page break” (Page). On the left the “Data” area with “Manage data sources”, the search box and the collapsed entries “Custom variables”, “System variables”, “Rechnung” with a star and “Eigene Firma (Absender)”, below them the collapsed “Structure”. In the middle the sheet “Page 1 / 1”: at the top the logo, on the right the markers for company name and address and below them a blue line; then a small sender line, the address block made of blue markers and, to the right of it, a frame with the document data. This group is selected (blue frame with small handles). Next come the heading “Rechnung” with the marker “Rechnungsnummer”, the introduction and the line item table, cut off at the bottom edge the payment note, the totals block and a green stamp. On the right the “Properties” area with the marker “Group”, the tabs “General” and “Position & size”, the button “Zoom in (edit content)” and below it the sections “Background & border”, “Visibility” and “Actions” with “Delete block”.]
Caption: The areas of the designer.
- Image marker 1: The header bar: zoom, gridlines, undo, preview, PDF, buttons, flows and language.
- Image marker 2: The template row: choose, create and save a template, and everything that concerns the whole template.
- Image marker 3: The ribbon: insert text, image, group, shapes, codes, tables and pages.
- Image marker 4: The “Data” area: fields, relationships and variables to drag in, with the “Structure” below.
- Image marker 5: The canvas with the sheets.
- Image marker 6: The “Properties” area for the selected object.

### At the top: header bar, template row and ribbon

At the very top, three bars lie one above the other. The header bar controls view and output, the template row applies to the whole template, and the ribbon inserts new objects. Many buttons show a short help text when you point at them with the mouse.

#### The header bar (image marker 1)

The top bar carries the logo and the title “Smart Templates – Designer” on the left. To the right of it are the zoom, “▦ Gridlines”, “↶” and “↷” for Undo and Redo, “Full preview” and “PDF”, “🖨 Manage buttons in Dynamics” and “↻ Manage flows”, and at the far right the language selection of the interface. Zoom and gridlines have an effect only in the designer and never end up in the PDF. The header bar describes every control. The two output buttons are explained in Full preview and PDF, the two buttons for Dynamics in Buttons: the assistant and Flows.

#### The template row (image marker 2)

The second bar always applies to the whole template. On the left, you choose the template in the “Template” field; then come “Template settings”, “New”, “Import”, “Export”, “AI package”, “Upload AI changes”, “AI assistant” (only in Dynamics), “Duplicate” and “Rename”, and at the far right the red “Delete” and the blue button “Save”. What each button does is described under Managing templates; the three AI buttons are described in Working with AI.

#### The ribbon (image marker 3)

The ribbon has six sections side by side: “Elements” with “Text” and “Image”, “Containers” with “Group”, “Shapes”, “Codes” with “Barcode”, “QR code” and “EPC QR code (GiroCode)”, “Tables” with “Data table” and “Free-form table”, and “Page” with “Blank page” and “Page break”. It has no tabs, and no button is ever grayed out.

A click on a button inserts the new object at a fixed place; you place it more precisely by dragging the button to the desired place on the sheet. Where a click inserts exactly is described under The ribbon: Where a click inserts. What the inserted object can do is explained on the pages Texts, Images, Shapes, Barcode, QR code and GiroCode, Groups, Data tables, Free-form tables and Pages, header and footer.

### On the left: data and structure (image marker 4)

The “Data” area shows what you can bring into the template. At the top is the note “Drag a field into a text box or onto a text element.”

- “⚙ Manage data sources” opens the window for the primary source and further sources (Data sources and relationships). If the template has no primary source yet, the designer asks for one when you open it and before full preview and PDF.
- The search box “🔍 Search fields & relationships…” searches everything that has already been loaded.
- “Custom variables” are values that you set yourself; the button “+ New” creates a new one (Variables: Creating a custom variable). “System variables” supply page numbers, date, time and user (Variables: System variables).
- There is one entry per data source, the primary source with a star. It contains the fields and the relationships; the symbol ƒ creates a rule. How the tree is organized is described under Data tree and field picker, and what “1:N” and “N:1” mean, under Data sources and relationships: Relationships.

**Dragging in** is the main way to bring data into the template: depending on what you drag and where, the result is a text, an image or, for a list, a data table. What exactly is created and what a click on a field does is described under Data tree and field picker: Clicking and dragging, the special case of an existing text under The “Edit text” window: Dragging a field onto an existing text. Fields of a rule that sits on a list cannot currently be placed in a text (see Rules: Using the result).

Below it is the “Structure”, collapsed at first: all objects of the template as a list; a click on an entry selects the object (see Working on the canvas: The structure).

### In the middle: the canvas (image marker 5)

The sheets are stacked one below the other, each with “Page 1 / 2” and so on above it. The canvas shows fields as blue markers with their name, not values; you see the values in the full preview and in the PDF. Only images from the data are shown with the image of the sample record or as a blue placeholder. Visibility rules have no effect here either: an object with a rule is always visible on the canvas. What else the canvas shows differently from what is printed is described under Full preview and PDF: What the canvas shows differently from the PDF.

- **Pages:** Below the last sheet, “Add page” appends a blank sheet; “🗑 Blank page” removes the last blank page again, and “🗑 Remove page” deletes the page break, without asking, on a sheet that begins with a page break. See Pages, header and footer: Appending blank pages and removing pages.
- **Hatching, guides and markers on objects:** Areas hatched in gray and orange, thin dashed outlines and small symbols on the objects point out special cases. None of this appears in print. What each symbol means is described under Working on the canvas: Markers and warning symbols on the canvas, how to hide guides under Working on the canvas: Grid, snap lines and guides.

### On the right: the properties (image marker 6)

The “Properties” area shows the settings of whatever is selected. It changes with the selection:

- **Nothing selected:** The area offers the button “⚙ Template settings” and the section “Page border”: a border around every page. See also The properties panel: When nothing is selected and Pages, header and footer: Page border.
- **One object selected:** At the top are the type and name of the object, below it usually the tabs “General” and “Position & size”. Where the tabs exist and what they contain is described under The properties panel: The tabs.
- **Several objects selected:** They can be moved, aligned, evenly distributed (from three objects), colored, copied and deleted together. See Working on the canvas: Several objects at once.

The small ⓘ after many fields and section headings explains the setting (see The properties panel: Sections, collapsible areas and the ⓘ). At the very bottom are the buttons for deleting; which one appears when and whether it asks for confirmation is described under Working on the canvas: Deleting.

### Finding your way around

- **Zooming:** Drag the slider in the header bar, type a number there, or turn the mouse wheel while holding the Ctrl key. When a template is opened and when the width of the canvas changes noticeably, for example because the window becomes narrower or wider, the designer adjusts the zoom to the page width by itself; a zoom you chose by hand does not stay then. If only the height of the window changes, it stays. See The header bar: Zoom.
- **Scrolling:** The sheets are stacked one below the other; you scroll the canvas with the mouse wheel or the scroll bar. A newly inserted object is scrolled into view by the designer itself.
- **Adjusting the areas:** You change the width of “Data” on the left and “Properties” on the right by dragging at the inner edge of the area; the grip turns blue when you move over it. The designer remembers the widths.
- **Switching levels:** How to get into a group or cell and back out again with the double-click is described under Working on the canvas: The double-click.
- **Fine movement:** The arrow keys move the selected object in small steps; details are described under Working on the canvas: Keys for the selected object.

How you select an object, move it and edit it with the double-click is described in Working on the canvas. The keyboard shortcuts are described under Keyboard shortcuts, the designer’s messages and confirmation prompts under Problems and messages, and what the designer remembers under What the designer remembers.

### What the designer remembers

The designer remembers little, and only in the browser and in Dynamics. If browser storage is missing, for example in a private window or when it is blocked, the designer works without this memory.

| What | Where | How long, and limits |
|---|---|---|
| Width of the “Data” (left) and “Properties” (right) areas | Browser | Remembered when you release the grip at the inner edge. The tooltip of the grip reads “Drag to change width”; the narrow grip turns blue when you move over it. Each area has a minimum and a maximum width; the minimum width is chosen so that the buttons in it stay on one line. A smaller width remembered earlier is raised to the minimum width by the designer when loading. |
| Whether the “Structure” is expanded | Browser | Default: collapsed (see The structure). |
| Your language selection | Dynamics, per user; without Dynamics, the browser | Until you change it. |
| What you last copied with Ctrl+C | Browser | Survives reloading and also applies in another browser window or tab. |
| Which speech bubbles the designer has already shown | Browser | Per template and type (text, group, table), at most 400 entries. For templates without an ID (import, sample template), this applies only until reloading. |
| Flow connections that were detected as no longer existing and hidden | Browser | Per browser. “↻ Check” next to the “Connection” selection when creating a flow in the “Manage flows” window forgets the list and checks the connections again; those that fail again stay hidden (see Flows: The connection check). |
| Whether the silent keep-warm check already ran in this session, and how many attempts there were (Dynamics only) | Browser session | Expires when the tab is closed (see Keep warm). |
| Which template is open | Address in the browser | Reloading and bookmarks open the same template again; without this information, the first template of the list sorted by name opens (see Which template opens). |
| Whether guides are shown | Template (in Dynamics) | This belongs to the template, not to the browser: the check mark “Show guides in the designer” counts as a change to the template, is stored with “Save” and then applies to everyone who opens the template (see Template settings). |

Not remembered beyond reloading are the zoom, gridlines, the selection, open windows, the undo history and the check mark “Include sample data”. The tab of the properties and of the template settings that you used last also applies only until reloading; afterward “General” and “Page”, respectively, are in front again. The designer does not remember which template you edited last.

### What changes in the document?

**On the canvas:** Zoom, gridlines, guides, hatching, markers and the width of the areas are aids of the designer.

**In the PDF:** None of these aids ends up in the PDF; buttons and flows in Dynamics print the saved version (see Full preview and PDF: Full preview and printing in Dynamics).

---

## The header bar

*For users · Using the designer · Page en/kopfleiste.html*

> **In short:** The header bar, the topmost bar in the designer (outlined in purple in the image below), controls view and output: zoom, gridlines, undo and redo, full preview and PDF, the buttons for buttons and flows in Dynamics, and the interface language. Zoom and gridlines have an effect only in the designer and never end up in the PDF.

### The buttons of the header bar

The header bar is at the very top of the designer, above the template row; in the image it is outlined in purple.

[Image: The three bars at the top edge of the designer, each in one row; the header bar is outlined in purple. At the top the header bar: on the left the colored square and “Smart Templates – Designer”, then zoom with a slider and “100 %”, “Gridlines”, Undo and Redo, “Full preview”, “PDF”, “Manage buttons in Dynamics”, “Manage flows” and the language selection “Automatic (Deutsch)”. In the middle the template row: “Template” with the field “Rechnung (Handbuch)”, “Template settings”, “New”, “Import”, “Export”, “AI package”, “Upload AI changes”, “AI assistant”, “Duplicate”, “Rename”, on the right the red “Delete” and the blue button “Save”. At the bottom the ribbon with “Text” and “Image” (Elements), “Group” (Containers), “Shapes”, “Barcode”, “QR code” and “EPC QR code (GiroCode)” (Codes), “Data table” and “Free-form table” (Tables), “Blank page” and “Page break” (Page).]
Caption: The three bars at the top of the designer, the header bar outlined in purple. The template row below it is described in Managing templates, the ribbon in The ribbon.

The top row is always visible. On the left are the logo and the title, then the zoom and three fixed groups of buttons: “▦ Gridlines”, “↶” and “↷”; “Full preview” and “PDF”; “🖨 Manage buttons in Dynamics” and “↻ Manage flows”. At the far right, the designer appends the language selection at startup. If the window becomes narrow, the bar wraps only between these groups. In the group designer, it lies behind the full-screen window and then cannot be operated. There is no ⓘ in the header bar. Most buttons have tooltips; they are listed in the table, only those of the two buttons for buttons and flows are described under Buttons: the assistant: The two buttons in the header bar.

| Control | What it does |
|---|---|
| Logo (colored square) | Decoration without a function. |
| Title “Smart Templates – Designer” | If the browser window is narrow, the designer hides the title text; the logo stays. The tooltip names the date and number of the designer version, for example “2026-10-15 · v745”. There is no visible number next to the title. |
| “Zoom” with slider and number field | Enlarges or reduces the canvas from 40 to 300 %. More under Zoom. |
| “▦ Gridlines” | Switches a 5 mm grid on the canvas on and off. More under Gridlines. Tooltip: “Grid on/off – shows a 5 mm grid; dragged objects and dragged object edges snap to it – on the page as well as in groups and cells (a nearby edge or margin takes priority)”. |
| “↶” | Undo: takes back the last change step, like Ctrl+Z. The button is gray as long as there is nothing to take back, so also right after opening a template. Tooltip: “Undo (Ctrl+Z)”. More under Undo and Redo. |
| “↷” | Redo: brings back the step that was last taken back, like Ctrl+Y. Gray as long as there is nothing to redo; every new change empties the history. Tooltip: “Redo (Ctrl+Y)”. |
| “Full preview” | Generates the real PDF with the sample record from the open template, even if it is not saved, and shows it in a full-screen window. The tooltip reads “Real page-by-page preview, exactly as it will be printed”. What is checked beforehand and what the window offers is described under Full preview and PDF. |
| “PDF” | Generates the same PDF and downloads it immediately as a file, without a preview window. The button has no tooltip. What the file is called, which checks run beforehand and what is reported while generating is described under Full preview and PDF. |
| “🖨 Manage buttons in Dynamics” | Opens the window “Manage buttons in Dynamics”, the assistant for buttons in Dynamics. What the button does and its tooltip are described under Buttons: the assistant: The two buttons in the header bar. |
| “↻ Manage flows” | Opens the window “Manage flows” for the cloud flows (Power Automate) of this template. What the button does and its tooltip are described under Buttons: the assistant: The two buttons in the header bar, the window itself under Flows. |
| Language selection (dropdown list at the far right, without a label) | Changes the language of the interface. More under Language selection. Tooltip: “Interface language”. |

#### Zoom

The zoom affects only the level you are currently working on: the main window or the group designer. It changes only the display and never ends up in the PDF.

| Setting | What it does | Default |
|---|---|---|
| “Zoom” slider Tooltip: “Zoom (also Ctrl+mouse wheel)” | Sets the magnification from 40 to 300 %. The point in the middle of the canvas stays at the same place on the sheet. | 100 %; when a template is opened, the designer adjusts it to the page width |
| Number field with “%” Tooltip: “Zoom % – enter a number” | Like the slider, only with a typed number. The arrows in the field change it in steps of 5. Every digit you type takes effect immediately; a value outside 40 to 300 jumps to the limit, so a “3” typed in between becomes 40 %. An emptied field sets the zoom to 100 %. As long as you are typing in the field, the designer does not write the value back. | 100 |

The zoom changes automatically and with the mouse as follows:

- **Fitting to the page width:** When a template is opened, the designer sets the zoom so that the sheet fills about 90 % of the free width, at most 200 %. The same happens when the width of the canvas changes noticeably (by at least 8 pixels) because you make the window narrower or wider or open, close or drag side areas, but only if the target value differs from the current zoom by more than 2 percentage points. If only the height of the window changes, a zoom you chose by hand stays; if the width changes, the designer adjusts it to the page width again. If the vertical scroll bar of the canvas appears or disappears when the height changes, the canvas width changes by the width of the scroll bar, and the zoom is fitted. If the canvas is at the very top at that moment, it stays at the top. Fitting cannot be switched off.
- **Ctrl+mouse wheel:** If you turn the mouse wheel while holding the Ctrl key, the designer zooms in steps of 10 percentage points; turning up enlarges. On the Mac, only Ctrl applies here, not Cmd. In the open “Edit text” window, its own zoom zooms instead. Over a selection, confirmation or name window and over the full preview, the designer stays out of it; there the browser or the PDF viewer enlarges. Over other windows, such as “Template settings” or “Manage data sources”, Ctrl+mouse wheel, on the other hand, changes the zoom of the canvas behind them.
- **In the group designer:** It has controls of its own with the same limits. Each level (main window, group, cell in a group) counts its zoom separately. If you open a group or cell in the group designer, the new level takes over the zoom of the level above and then adjusts it: the content fills about 92 % of the canvas, never below 60 % and never above 300 % zoom. When you leave, the designer discards the zoom of the level you left.

#### Gridlines

| Setting | What it does | Default |
|---|---|---|
| “▦ Gridlines” | Switches the 5 mm grid on the canvas on and off; when switched on, the button is blue. When dragging, objects and edges snap to it. | off; the state is not remembered |

After the page is reloaded, the gridlines are off again. The group designer has no gridlines button of its own, but it shows the grid when it is switched on in the main window. It never appears in the PDF. What the grid looks like and how snapping works with and without the gridlines is described under Grid, snap lines and guides.

#### Language selection

| Choice | What it does | Default |
|---|---|---|
| “Automatic (Deutsch)” or “Automatic (English)” | Follows the interface language of your user in Dynamics: every German variant results in German, everything else in English. Without Dynamics, the language of the browser applies. In the English designer, the entry is called “Automatic (…)”. | preselected |
| “Deutsch” | The interface is in German, regardless of the setting in Dynamics. | – |
| “English” | The interface is in English, regardless of the setting in Dynamics. | – |

- Changing the language reloads the designer. If the template has unsaved changes, the designer asks first; the prompt is described in Managing templates: Prompt when leaving.
- Dynamics stores your choice for your account, that is, per user in a table of its own; the role “Smart Templates Designer” grants the rights for this. Without Dynamics, the browser remembers the choice. If saving fails, the yellow note “The language could not be saved: …” appears (6 s), and the selection jumps back.
- Never translated are data (names of templates, fields and records), the canvas, that is, the document itself, and editable texts.
- The language of the interface is not the language of the template. The template language is in the template settings (see Numbers, currency and dates); new templates in the English designer start with the English template language.

### What changes in the document?

**On the canvas:** Zoom and gridlines affect only what you see in the designer. Undo and redo, on the other hand, change the template itself.

**In the PDF:** Zoom and gridlines never end up in the PDF. “Full preview” and “PDF” show the state after undo or redo immediately, buttons and flows only after “Save” (why is described under Managing templates: What changes in the document?).

---

## Managing templates

*For users · Using the designer · Page en/vorlagen.html*

> **In short:** The template row, the second bar in the designer (outlined in purple in the image below), always applies to the whole template. With it you choose a template, save it in Dynamics, create a new one, copy, rename and delete it, and back it up as a file. Buttons and flows in Dynamics always print the saved version.

### The template row

The template row is at the top of the designer between the header bar and the ribbon; in the image it is outlined in purple.

[Image: The three bars at the top edge of the designer, each in one row. At the top the header bar: on the left the colored square and “Smart Templates – Designer”, then zoom with a slider and “100 %”, “Gridlines”, Undo and Redo, “Full preview”, “PDF”, “Manage buttons in Dynamics”, “Manage flows” and the language selection “Automatic (Deutsch)”. In the middle, outlined in purple, the template row: “Template” with the field “Rechnung (Handbuch)”, “Template settings”, “New”, “Import”, “Export”, “AI package”, “Upload AI changes”, “AI assistant”, “Duplicate”, “Rename”, on the right the red “Delete” and the blue button “Save”. At the bottom the ribbon with “Text” and “Image” (Elements), “Group” (Containers), “Shapes”, “Barcode”, “QR code” and “EPC QR code (GiroCode)” (Codes), “Data table” and “Free-form table” (Tables), “Blank page” and “Page break” (Page).]
Caption: The three bars at the top of the designer, the template row outlined in purple. In a narrow window it wraps into two rows; “Delete” and “Save” then stay on the right. The header bar above and the ribbon below are described in The header bar and The ribbon.

| Button | What it does |
|---|---|
| “Template” (field) | Shows the open template and opens another one (see Choosing the template). |
| “Template settings” | Opens the settings of the whole template: page, font, numbers and date, tables and data (see Template settings). |
| “New” | Creates a new template (see New). |
| “Import” | Opens a template file, including a whole template that an AI has delivered (see Importing). |
| “Export” | Downloads the template as a file (see Exporting). |
| “AI package” | Downloads a file for an AI: the template, the description of the format and all tables (see Working with an external AI). |
| “Upload AI changes” | Brings the changes that an AI delivers in response to the AI package into the open template as one step; Ctrl+Z takes them back. A small menu asks where from: “Choose file …” or “Paste text …” for the copied answer from the chat. Also works for a template that has not been saved yet (see Working with an external AI: Taking over the AI’s answer). |
| “AI assistant” (only in Dynamics) | Opens the Copilot agent for templates next to the designer (see Working with the AI assistant in Copilot: Opening the assistant). |
| “Duplicate” | Creates the current state as a new template in Dynamics (see Duplicating). |
| “Rename” | Gives the template a new name and saves it in the process (see Renaming). |
| “Building blocks” | Opens the window with all building blocks: areas that are the same in selected templates (see Building blocks: The “Building blocks” window). |
| “Delete” (red text) | Deletes the template after a confirmation prompt in Dynamics (see Deleting). |
| “Save” (blue) | Stores the template in Dynamics (see Saving). |

### Choosing the template

The “Template” field shows the name of the open template. This is how you choose another one:

- A click empties the field and opens the list of all templates, sorted by name. The open template is shown in bold.
- Typing filters the list by the name and by the ID of the template.
- A click on an entry opens the template; Enter opens the first match.
- Esc closes the list and restores the name.

In Dynamics, the list contains all templates that you may read. Building blocks are not in it; you open them in the “Building blocks” window (see Building blocks). If the open template has unsaved changes, the designer asks before the switch (see Prompt when leaving). If a template cannot be opened, for example because it has been deleted in the meantime or the read right is missing, the current one stays open, and a red note names the reason.

### Saving

Click “Save” at the far right. The designer stores the open template in Dynamics and reports “Saved: Angebot” (with the name of your template). From then on, all buttons and flows print this version.

- What is saved is the state at the moment of the click. Every save replaces the previous version; the designer does not keep older versions.
- Ctrl+S does not save. Saving happens only with this button and with “Rename”.
- If saving fails, the message “Saving failed – …” names the reason.
- The button does not save an imported template; you store it in Dynamics with “Duplicate” (see After opening).
- The name in Dynamics is the name of the record. If someone renames the template in Dynamics, that name applies the next time it is opened.

### New: creating a template

The “New” button creates a new template in two steps: first name and primary source, then page, font and numbers. How this works is shown with images in Creating a new template.

Until you click “Create template”, everything is a draft: nothing is created in Dynamics yet, and if you cancel, the template that was open before is back unchanged. If it has unsaved changes, the designer asks even before the first window (see Prompt when leaving).

### Duplicating, renaming, deleting

#### Duplicating

“Duplicate” creates the current state of the template, including anything unsaved, as a new template in Dynamics and opens the copy. The original keeps its saved state. In the “Duplicate template” window you enter the name of the copy; the previous name with the suffix “copy” is prefilled.

The designer does not ask about unsaved work here, because that work is in the copy. If creating fails, for example because the right to do so is missing, the current template stays open unchanged. You also store an imported template in Dynamics this way (see After opening).

#### Renaming

“Rename” asks for the new name in the “Rename template” window. It also becomes the name of the record in Dynamics.

> **Caution:** “Rename” saves the whole template including all open changes. If saving fails, the template keeps its old name. If the name appears as text on the sheet, you change it there yourself.

#### Deleting

“Delete” asks in the “Please confirm” window “Delete the template ‘Angebot’?” and then deletes the record in Dynamics. Afterward, the first template of the list opens.

- A deleted template cannot be brought back in the designer; Undo applies only to changes to the open template.
- If deleting fails, for example because of rights or the network, the template stays open unchanged, and a red note names the reason.
- If there is no template left afterward, the window “Welcome to Smart Templates” appears with the way to the first template (see If there is no template yet).
- If a building block is open, “Delete” deletes the building block. If it is still used in a template, it cannot be deleted; the message names the templates, and no confirmation prompt appears at all (see Building blocks: The “Building blocks” window).

### As a file: exporting and importing

With “Export” you back up a template as a file, with “Import” you open such a file again, including a whole template that an AI delivers in response to the “AI package” (see Working with an external AI: A whole template instead of a change).

#### Exporting

“Export” downloads the current state of the template as a file, including anything unsaved, without asking. The file is always called “template.json”, not after the template; if you back up several templates, rename the files after downloading. If the template uses building blocks, they are included in the file, each one in full once (see Building blocks: Exporting and importing).

> **Good to know:** The file contains the ID and the name of the sample record, that is, the name of a real record; field values are not in it. Keep this in mind before you pass the file on.

#### Importing

1. Click “Import” and choose the file.
   → The file dialog initially shows only files with the extension “.json”. You choose an AI answer saved as text by switching the file type in the dialog to all files. If the open template has unsaved changes, the designer asks now.
2. The designer checks the file.
   → If there are no findings, it opens the file immediately. Otherwise it shows a report (see The report windows). If the file brings along building blocks that exist here with different content, the window “Building blocks from the file” asks beforehand what should apply (see Building blocks: Exporting and importing).

The check runs in Dynamics; if it cannot be reached, the designer does not open the file. If the template is in a text between explanatory sentences, for example in the saved answer of an AI, the designer reads only the part with the template. What the check reports in detail is described for developers under Template format: What the check reports on import.

#### The report windows

If the check finds errors, the designer does not open the file and shows the window “The template cannot be opened like this”. If it finds only notes, it shows the window “The template can be opened – please note”; with “Open” you open the template anyway. In both windows, the findings are listed under “Error” (red) and “Notes” (ocher), each with the location. The sentences in them are technical because they are intended for the AI that generated the file.

[Image: The window “The template cannot be opened like this” with a close mark at the top right. Below it the sentence “One error in »Angebot-neu.json«. Give the list back to your AI so that it fixes exactly these places.” Then the red heading “Error” with one list item: the location “body[0].type” as small text on a light background, followed by the sentence “Unknown object type »Textfeld«. Allowed: Text, Image, Group, Table, Grid, Line, Rect, Ellipse, Triangle, Star, Arrow, Polygon, PageBreak.” Below it the ocher heading “Notes” with one list item: the location “sources” and the sentence “The template has no data source; the designer asks for the primary source when it is opened.” At the bottom right the buttons “Copy list” and “Close”.]
Caption: The report of the check when importing: the template is not opened.
- Image marker 1: The opening sentence names the number of errors and the file.
- Image marker 2: One list item per finding: at the front the location in the template, followed by the sentence about it.
- Image marker 3: “Copy list” puts the findings on the clipboard so that you can give them back to the AI.

#### Images included

If the file contains images, the designer compares them with the image library by content: an identical image gets the existing short name, a new one is created in the library immediately. This works only in Dynamics. Afterward, a note names which images were already present, which were newly created and which were not taken over; where an image could not be taken over, the place stays empty.

PNG, JPEG and SVG up to 5 MB are accepted. The designer converts an SVG into a PNG of at most 3000 px per side because printing does not read SVG. Which formats apply when uploading to the library is described under Images: Formats.

#### After opening

The imported template is open but is not yet in any record in Dynamics:

- It can be stored only with “Duplicate”. “Save” and “Rename” point to it with a note, “Delete” does nothing.
- The “Template” field is empty, and “Template settings” is missing until you have stored the template. “AI assistant” and “🖨 Manage buttons in Dynamics” also work only afterward (see Buttons: the assistant: The window “Not yet saved in Dynamics”). If you click “AI assistant” beforehand, the designer reports: “First store the template in Dynamics with ‘Duplicate’ – the AI assistant works with saved templates.” No window opens. “Upload AI changes” already works beforehand: the AI’s changes go into the open template (see Working with an external AI: Taking over the AI’s answer).
- Do not choose “New”: that creates an empty template and discards the loaded one. The designer warns beforehand in the window “Discard the loaded file?”; only “Create new anyway” discards it.
- When leaving, the designer always asks, and Undo has nothing to take back yet.

### Starting and leaving

#### Which template opens

If you open the designer via the app’s navigation, the first template of the list sorted by name opens; it does not remember which one you edited last (see Opening Smart Templates).

The ID of the open template is, however, in the address in the browser. Reloading and a bookmark therefore open the same template again, and anyone you give the address to lands in the same template. If the template from the address no longer exists, the first one of the list opens with a note. If the opened template has no primary source, the designer asks for it right afterward (see Data sources and relationships: The “Primary source required” window).

If the designer does not start or the templates cannot be loaded, Problems and messages: The designer does not start or shows no template helps.

#### If there is no template yet

Right after installation, there is no template in Dynamics yet. The same applies if there are only building blocks. Then the designer opens the window “Welcome to Smart Templates”. It explains in one sentence what a template is, names the three steps to the first template and offers two buttons:

- “Create first template” opens the same window as “New”: first name and primary source, then page and font (see Creating a new template). If you cancel there, the welcome window is back.
- “Import template file” opens a backed-up template as a file, exactly like “Import” (see Importing).

The window cannot be closed, not even with Esc or a click next to it: the empty basic framework behind it belongs to no record, so work on it would be lost. The keyboard also stays in the window: when it opens, the focus is on “Create first template”, Enter chooses this button, and Tab switches only between the buttons of the window. The same window appears when you delete the last template. At the bottom is a note: if you see no template even though colleagues have already created some, your read right probably applies only to some of the templates, for example only your own. The role “Smart Templates Designer” reads all templates. If the read right is missing entirely, the message “The templates could not be loaded …” appears instead of the window (see Rights and roles: When a right is missing).

#### Prompt when leaving

There is no symbol for “unsaved”; the “Save” button always looks the same. But the designer asks before anything unsaved is lost:

- When switching the template, with “New”, with “Import” (after the file choice) and when switching the interface language, the window “Unsaved changes” appears: “This template has unsaved changes. If you switch now, they will be lost.” With “Cancel” you stay in the template, “Discard and switch” (red text) discards the changes.
- If you close the tab or reload the page, the browser asks with its own text.
- With “Duplicate”, “Export”, “AI package”, “Upload AI changes”, “AI assistant”, “Full preview” and “PDF”, nothing is lost; the designer does not ask there. “Delete” asks anyway whether the template should really be deleted.

> **Caution:** If you switch to another area in Dynamics via the app’s navigation, for example to “Bild-Assets”, neither Dynamics nor the browser asks, and unsaved changes are lost. So save before you leave the designer.

### What changes in the document?

**On the canvas:** Anyone who chooses another template, imports or duplicates sees that template on the canvas afterward; when creating with “New”, it already shows the basic framework.

**In the PDF:** “Full preview” and “PDF” build the document from the open template, even if it is not saved, with the values of the sample record. Buttons and flows in Dynamics, on the other hand, print the saved version: a change takes effect there only after “Save” or “Rename”; a new template and a copy from “Duplicate” are in Dynamics from the moment they are created.

---

## The ribbon

*For users · Using the designer · Page en/befehle.html*

> **In short:** The ribbon, the third bar in the designer (outlined in purple in the image below), inserts new objects: text, image, group, shapes, codes, tables and pages. A click places the new object at a fixed place; most buttons can also be dragged to the desired place on the sheet.

### The buttons of the ribbon

The ribbon is below the template row; in the image it is outlined in purple.

[Image: The three bars at the top edge of the designer, each in one row; the ribbon is outlined in purple. At the top the header bar: on the left the colored square and “Smart Templates – Designer”, then zoom with a slider and “100 %”, “Gridlines”, Undo and Redo, “Full preview”, “PDF”, “Manage buttons in Dynamics”, “Manage flows” and the language selection “Automatic (Deutsch)”. In the middle the template row: “Template” with the field “Rechnung (Handbuch)”, “Template settings”, “New”, “Import”, “Export”, “AI package”, “Upload AI changes”, “AI assistant”, “Duplicate”, “Rename”, on the right the red “Delete” and the blue button “Save”. At the bottom the ribbon with “Text” and “Image” (Elements), “Group” (Containers), “Shapes”, “Barcode”, “QR code” and “EPC QR code (GiroCode)” (Codes), “Data table” and “Free-form table” (Tables), “Blank page” and “Page break” (Page).]
Caption: The three bars at the top of the designer, the ribbon outlined in purple. The header bar is described in The header bar, the template row in Managing templates.

The ribbon is the third row. It has six sections side by side: “Elements”, “Containers”, “Shapes”, “Codes”, “Tables” and “Page”. The section name appears small below the buttons, the symbol large above the label. There are no tabs, and no button is ever grayed out. With the buttons you insert new objects: by clicking, at a fixed place, or by dragging onto the canvas to the place under the mouse. Draggable are “Text”, “Image”, “Group”, “Barcode”, “QR code”, “EPC QR code (GiroCode)”, “Data table”, “Free-form table” and “Page break” as well as the tiles in the shapes menu. Not draggable are the “Shapes” button itself and “Blank page”.

| Button | What it does | Default |
|---|---|---|
| “Text” Section “Elements”; symbol: frame with “A”; draggable | Inserts a text object (place: see Where a click inserts). A double-click on the text later opens the text editor. For the first text of a template, the speech bubble “Double-click to edit the text” appears. The button has no tooltip. More under Texts. | Content “Neuer Text”, 50 mm wide; all defaults under Texts |
| “Image” Section “Elements”; symbol: picture with sun and mountain; draggable | First asks in the window “Where does the image come from?” whether the image comes from the data or is a fixed image from the library. If you cancel, nothing is created. Afterward the image object is created. The button has no tooltip. More under Images. | 35 × 14 mm; see Images |
| “Group” Section “Containers”; symbol: dashed frame; draggable | Creates a group, a container for objects with its own designer; a double-click on the group opens the group designer. When a group is first inserted into a template, the speech bubble “Double-click to edit the content” appears. Tooltip: “Group: a container for elements, with its own designer. It flows by default; each element can be set to fixed or anchored.” The text is outdated; what is meant is described under A group in the group. More under Groups. | Directly in the document 25 mm high and as wide as the printed area, in a group 60 × 30 mm; see Groups |
| “Building block” Section “Containers”; not draggable | Opens the window “Insert building block”: you choose a building block, under “Connection” where its record comes from, and its prefix. Tooltip: “Insert building block: an area that is the same in selected templates — you choose where its data comes from”. In an open building block the button is missing. More under Building blocks: Inserting a building block. | At the bottom of the document; width and height come from the building block |
| “Shapes” Section “Shapes”; symbol: circle, square, triangle; not draggable | Opens the shapes menu with eight tiles below the button: line, arrow, rectangle, circle, ellipse, triangle, star and polygon. Another click on the button or a click outside closes the menu; Esc does not close it. The tiles are dragged, not the button. Tooltip of the button: “Insert shapes – line, arrow, rectangle, circle, ellipse, triangle, star, polygon”; of each tile: “Line – click or drag onto the canvas” and correspondingly for the others. More under Shapes. | Dimensions and colors per shape under Shapes |
| “Barcode” Section “Codes”; symbol: vertical bars; draggable | Creates a barcode: Code 128, EAN-13, EAN-8, Code 39 or ITF. No window opens; the content is entered afterward in the properties. The place follows the same rule as for “Image” (see Where a click inserts). Tooltip: “Barcode (Code 128, EAN-13, EAN-8, Code 39 or ITF) — content from a field, a variable or fixed text”. More under Barcode, QR code and GiroCode. | 50 × 15 mm, Code 128, plain text on; see Barcode, QR code and GiroCode |
| “QR code” Section “Codes”; symbol: three corner squares with small dots; draggable | Creates a QR code. No window; place and dragging as for “Barcode”. Tooltip: “QR code — content from a field, a variable or fixed text, for example a link”. More under Barcode, QR code and GiroCode. | 25 × 25 mm, error correction M; see Barcode, QR code and GiroCode |
| “EPC QR code (GiroCode)” Section “Codes”; symbol: like the symbol of “QR code”, with a blue circle with a euro sign in the lower right corner; draggable | Creates a GiroCode (EPC QR code per EPC069-12, known in Germany as GiroCode): a QR code for SEPA credit transfers in euros. No window; place and dragging as for “Barcode”. Tooltip: “EPC QR code (GiroCode) per EPC069-12 — QR code for SEPA credit transfers in euros”. More under Barcode, QR code and GiroCode. | 30 × 30 mm; amount and payment reference prefilled if the primary source knows the fields; see Barcode, QR code and GiroCode |
| “Data table” Section “Tables”; symbol: grid with colored header row; draggable in the main window | Creates a table with data from Dynamics, one row per record, for example per line item. The process begins with the window “Choose the row source of the table” and ends with the column selection; if you cancel along the way, nothing is created. If you choose “Free-form table (no data)” in this window, a free-form table is created right away instead. How the row source is chosen and what happens with relationship and rule is described under Data tables: The row source. Tooltip: “Table with data from Dynamics: one row per record, for example per line item”. | see Data tables |
| “Free-form table” Section “Tables”; symbol: grid with pencil; draggable in the main window | Creates a table without data from Dynamics; you enter the rows and content yourself. It is created immediately, without a window. The insertion point follows the same rule as for the data table. Tooltip: “Table without data from Dynamics: you enter the rows and content yourself”. More under Free-form tables. | three empty rows; see Free-form tables |
| “Blank page” Section “Page”; symbol: sheet with two lines; not draggable | Appends a blank sheet after the last sheet, without an object; the canvas scrolls to the end. The button does not create more than 200 sheets. Tooltip: “Add a new blank page at the end”. More under Pages, header and footer. | – |
| “Page break” Section “Page”; symbol: dashed line between two halves of a sheet; draggable | Inserts a page break: by clicking, below the content of the last occupied sheet; by dragging, exactly at the drop height. Tooltip: “Forces a new page at this point – you can also drag it to the height you want”. What the break looks like, how it works and how it is removed is described under Pages, header and footer. | – |

#### Where a click inserts

A click on “Text”, “Image”, one of the three buttons in the “Codes” section or a shape puts the new object into the first of the following containers to which the description applies:

1. A group is selected, including a group directly on the sheet: the object goes into this group.
2. An object in a group is selected: the object goes into the same group as the selected object.
3. You are working in the group designer (or in a column designer or cell designer): the object goes into the open group or cell.
4. Otherwise: the object goes into the first group of the document that does not repeat on every page, so never into a header or footer. In a new template, this is the group with the text “Gruppe”. This also applies if an object that is not a group, such as a text or a table, is selected directly on the sheet.
5. If there is no such group, the new object becomes an object of its own at the bottom of the document: 2 mm from the left edge and 2 mm below the content of the last occupied sheet. If less than 5 mm remain there up to the bottom edge of the printed area, it begins at the top of the next sheet.

In a group, the object is 2 mm from the left edge and 2 mm below the lowest existing object, rounded to 0.5 mm. What counts is the height at which the objects stand on the canvas, so for a text with automatic height, that of its lines. In an empty group, it begins at Y = 2 mm. If the group has a fixed height, it begins at least 6 mm above its bottom edge; if the group is already full, it can then cover existing content. If the new object extends beyond the fixed bottom edge, the designer reports right when inserting “The group has a fixed height of … mm – the new object does not fit completely and is cut off at its bottom edge. …”, in a cell with a fixed height “The cell has a fixed height of … mm – the new object does not fit completely; the canvas and the PDF cut it off at its bottom edge. …”; this also applies if you drag an object there or insert it with Ctrl+V or Ctrl+D (see Working on the canvas: Copying and pasting). Afterward the new object is selected, the canvas scrolls it into view, and the insertion is one undo step. If nothing was selected beforehand, the designer reports “Element inserted into ‘Group’ – now selected, freely movable.”; it always says “Group” there, even if you are working in a table cell. An object of its own at the bottom of the document is always reported with “Element inserted at the bottom of the document – now selected, freely movable.” For shapes, the designer always reports, even if something was selected beforehand: “Rectangle inserted – freely movable.” or “Rectangle inserted at the bottom of the document – now selected, freely movable.” (with the name of the shape).

Other rules apply to the remaining buttons:

| Button | Where a click inserts |
|---|---|
| “Group”, “Data table” and “Free-form table” | Only into a selected group that is itself inside a group, or into the open group designer. Otherwise an object of its own is created at the bottom of the document, even if a group directly on the sheet or an object in a group is selected. This differs from “Text”, “Image” and the shapes. |
| “Page break” | Always at the bottom of the document. |
| “Blank page” | No object is created; a new sheet is appended at the end. |

For the height at which the new object begins, the same applies to these buttons as above: at the bottom of the document, point 5 of the list; in a group, the paragraph below the list. Horizontally, group, data table and free-form table begin at the bottom of the document at the left edge of the printed area; in a group or cell, like every object, 2 mm from the left edge. If the columns of a new table extend beyond the available space there, the designer fits them: to the width of the group or cell minus 6 mm (2 mm on the left, 4 mm spacing on the right). A group without a width of its own counts as being as wide as it stands on the canvas. A table is taller than the 6 mm that a group with a fixed height leaves free at the least. If such a group is already filled, its bottom edge cuts off the table: the designer reports it right away (see the paragraph below the list), the canvas shows only the upper strip, and the PDF omits the rows that no longer fit, and without room for the header the whole table, each with a warning. Before that, switch on “Automatic height (fit to content)” for the group or drag it taller. The group of a new template already has the check mark (see Creating a new template: What is on the sheet afterward).

#### Dropping by dragging

Drag the button onto the canvas with the mouse and release:

- If a group is under the mouse there, the designer highlights it with a blue dashed outline, and the object lands in it at the mouse position. For a group directly in the document, only its middle strip counts for this; if you release near its top or bottom edge, the object is created on the sheet (see Groups: Moving objects in and out). In a group that is itself inside a group, every spot counts. In the group designer, it lands in the open group.
- Otherwise an object of its own is created in the document at the height where you release. For text, image, codes and shapes, the horizontal position is the mouse position minus the left margin, rounded to 0.5 mm; group, data table and free-form table begin at the left edge of the printed area. The page break is always created as an object of its own exactly at the drop height.
- “Data table” and “Image” first ask for the row source or the image source; if you cancel, nothing is created.
- A dragged shapes tile keeps its dimensions, for example circle 24 × 24 and ellipse 36 × 22 mm.
- If two objects are almost touching, a blue insertion line can appear while dragging; if you release there, the new object goes into the gap, and everything below moves down (see The insertion line).

#### The buttons on the sheets

On the sheets themselves are “Add page” (works like “Blank page”), “🗑 Blank page” and “🗑 Remove page”. What they do is described under Pages, header and footer.

#### The ribbon in the group designer

The group designer has a ribbon of its own, smaller, without the “Page” section: “Elements” (“Text”, “Image”), “Containers” (“Group”), “Shapes” (“Shapes”), “Codes” (“Barcode”, “QR code”, “EPC QR code (GiroCode)”) and “Tables” (“Data table”, “Free-form table”).

- “Text”, “Image”, “Group” and the three buttons in the “Codes” section can be clicked or dragged, and so can the tiles of the shapes menu. “Data table” and “Free-form table” work here only by clicking.
- By clicking, “Text”, “Image”, “Group” and the codes put the object into the open group; if a group or an object in a group is selected there, the rules under Where a click inserts apply. By dragging, it lands at the mouse position. The group in it is an object of 60 × 30 mm. The designer fits tables to the width of the group or cell.
- Tooltips here exist only for “Shapes”, the three buttons in the “Codes” section, “Data table” and “Free-form table”, with the same wording as in the main ribbon.

The way in, the zoom and “✕ Close” of the window are described in Groups.

#### Speech bubbles on first insertion

A speech bubble on insertion exists for the text, the group and the table; image, codes, shapes and page break show none. For all three, the speech bubble appears only on creation, not when a copy is pasted, not when the template is loaded and not after Undo.

- **Speech bubble for the first text:** For the first text that you insert into a template with the “Text” button, the speech bubble “Double-click to edit the text” appears above it, by clicking or dragging, on the sheet or in the group designer. A field that you drag onto the sheet from the “Data” area shows none. Otherwise it behaves like the group’s speech bubble (next point).
- **Speech bubble for the first group:** When a group is first inserted into a template, a dark blue speech bubble with the text “Double-click to edit the content” appears above the new group, by clicking or dragging, on the sheet or in the group designer. It lets clicks through and follows scrolling. It disappears at the next mouse click or key press, when the group designer is opened, when the template is switched, when the group is no longer there (Undo, Delete) and after 10 seconds. If it does not fit above the top edge, it appears just below it.
- **Speech bubble for the first table:** When a table is first inserted, it appears in the same way. The text for a data table is “Double-click a cell to design the column”, for a free-form table “Double-click a cell to design it”. Both table types share one flag: only the first table of a template, whichever type, shows a bubble. If the table is in a group and is not selected, the anchor is missing, and the bubble does not appear. Your browser remembers per template that the bubble has already appeared, separately for text, group and table; for a template that is not yet in any record, for example after “Import”, only until reloading (see What the designer remembers).

### What changes in the document?

**On the canvas:** A new object from the ribbon appears immediately, is selected and is scrolled into view. Where the canvas otherwise differs from the PDF is described under Full preview and PDF.

**In the PDF:** “Blank page” ensures that the PDF has at least that many pages; blank pages get header, footer and page border according to their settings (see Blank pages). A “Page break” forces a new page, but only if there is already content on the current page.

---

## Working on the canvas

*For users · Using the designer · Page en/entwurfsflaeche.html*

> **In short:** This page shows how you work on the canvas with the mouse and keyboard. A click selects an object, Ctrl+click or a rectangle you drag selects several, a double-click opens the matching editing window. Dragging moves an object, the handles change its size, and a group takes in an object that you release over it. In addition there are copying, pasting, deleting and undo, the structure as a list of all objects, the grid and the guides, and the symbols with which the canvas points out special cases. What a selected object sets in the “Properties” area is described on the pages of the group “Properties of all objects”, first under The properties panel. The buttons of the bars are described in The header bar, Managing templates and The ribbon.

### Selecting

A click selects an object. It gets a blue frame with small handles (see Handles), and its settings appear on the right in the “Properties” area (see The properties panel). A click on the object’s entry in the “Structure” also selects it (see The structure).

This is how you clear a selection:

- Click an empty spot: on the white sheet, on the label “Page 1 / 2” above a sheet, or on the gray area around the sheets. This also clears a multiple selection.
- In the “Structure”, click the row “📄 Document” (see The structure).
- After an object is deleted, nothing is selected either.

What the Esc key does with a selection is described under Keyboard shortcuts: Esc in detail.

If you hold down the mouse button on the empty spot and drag, a selection rectangle is created instead (see Selecting several objects). What the “Properties” area shows when nothing is selected is described under The properties panel: When nothing is selected.

You drag a selected object to its place (see Moving, snapping, hooking in and out). With the handles you change the size, with the round rotation handle you rotate images and shapes (see Handles). A table, its columns and its cells are selected in their own way; this is described in Cells, header row and page break: Selecting, filling and emptying cells and Free-form tables: Working on the canvas.

### The structure

Below the data tree in the left area is the structure: all objects of the template as a list, ordered as described below. A click on a row selects the object; this is also how you find small or hidden objects.

[Image: The “Structure” area in the left area of the designer, expanded, for a short invoice template. At the top the heading “Structure” with a small arrow pointing down. Below it the first row “Document”. Then two groups follow with a symbol of two arrows before “Group”, which repeat on every page: the first with the indented rows “Image”, “Text {{Absender.Name}}”, “Text {{Absender.Street}}{{Absender.Zip}} {{Absender.City}}” and “Line”, the second with “Line” and two text rows, the second of which reads “Text Page {{Page.Current}} of {{Page.Total}}”. Then the row “Text: Rechnung {{Numbe…”, the highlighted row “Table” and, indented below it, the five rows “Column Pos.”, “Column Bezeichnung”, “Column Menge”, “Column Einzelpreis” and “Column Gesamt”.]
Caption: The structure of a short invoice template, expanded.
- Image marker 1: The heading expands and collapses the list.
- Image marker 2: “Document” clears the selection.
- Image marker 3: Groups that repeat on every page come first, with a symbol of two arrows before them.
- Image marker 4: The parts of an object are indented below it, here the columns of the table.
- Image marker 5: The selected row is highlighted, here the table.

| Control | What it does | Default |
|---|---|---|
| Heading “Structure” with arrow (▸ collapsed, ▾ expanded) Tooltip: “Expand or collapse the structure” | Expands and collapses the tree; Enter and the space bar work the same way. When expanding, the designer redraws the tree. The state is remembered in the browser. | collapsed |
| “📄 Document” (first row) | A click clears the selection: nothing is selected, and the details about the document appear on the right. The row is highlighted as long as nothing is selected. | – |
| Rows for objects directly on the sheet | One row per object: “Table”, “▦ Grid”, “✂ Page break”; “Group”, with “🔁” before it if it repeats on every page; for a text “Text: ” and its first 16 characters with “…” (for an empty text “Text: empty”); for the other types their name: Image, Line, Rectangle, Ellipse, Triangle, Star, Polygon, Arrow; a circle also appears as an ellipse. A click selects the object, and the row is then highlighted. | – |
| Indented rows below | The parts of an object: objects in groups with a badge (Text, Image, Group …); for a text its beginning follows, up to 120 characters, shortened with “…”, the full beginning is in the tooltip. The columns of a table appear as “Column” with the header of the column (for a header designer, a short label such as “c2” appears instead of the header text); the badge “Group” shows a designed column whose cell you edit in the column designer (see Cells, header row and page break: What the double-click changes permanently), the badge “Header” a header cell of its own; below these are their contents. Cells of free-form tables are called “Cell row 1, column 2 · …”, cells of extra rows “Cell extra row 1, column 2 · …”, grid cells “Cell Row 1, column 2 · …”. Hidden (merged) and empty cells are missing. A click selects the object, the column or the cell. | – |

First come the groups that repeat on every page (headers and footers), from top to bottom. After that follow the other objects in the order of sheet and height, that is, by their position on the sheet. This applies to the rows directly on the sheet; the indented objects of a group, on the other hand, are in their order in the group. Reordering rows in the tree, for example by dragging, does not exist; the designer deliberately removed it. If you move an object directly on the sheet on the canvas, with the arrow keys or in the “Y (mm)” field, the tree follows.

### The double-click

The double-click, that is, two clicks within about 0.35 seconds, is the main way to edit. What opens depends on the object:

| Double-click on | What opens |
|---|---|
| a text | The “Edit text” window. If the text has versions depending on a condition, the window with the versions opens instead. See The “Edit text” window. |
| a group, including a header or footer | The group designer: a separate window with its own ribbon, the data on the left and the properties on the right. Layout, way in and going back are described in Groups: The window at a glance. |
| a data cell of a data table | The column designer for this column: what you design there applies to this column in every row. See Cells, header row and page break: Designing with a double-click. |
| a header cell of a data table | The header designer for the heading of this column. See Cells, header row and page break: Designing the header row. |
| a cell of an extra row | The cell designer of this cell. See Cells, header row and page break: Designing cells and Data tables: Extra rows. |
| a cell of a free-form table | The cell designer of exactly this cell, on a header cell the header designer. See Cells, header row and page break: Designing cells. |
| a code (barcode, QR code, GiroCode) | Without content, the question “Fixed variable”, “If-then” or “Fixed text”, otherwise directly what is stored: the field picker “Choose variable”, the if-then or the window for fixed text. For the GiroCode, a window with all fields and the button “Visibility …”. See Barcode, QR code and GiroCode: The double-click on a code. |
| an image or a shape | No window; their settings are on the right in the “Properties” area. |

The first double-click permanently converts a simple data or header cell; the only way back is Ctrl+Z (see Cells, header row and page break: What the double-click changes permanently). How you get out of the group designer again is described under Groups: Opening, going deeper, going back, for the designers of tables in the sections to which the table above refers.

If a table is selected, small bars appear above it for moving the table, for adding and deleting columns and rows, and for merging cells (Data tables: The bar at the table, Free-form tables: Working on the canvas).

When a text, a group or a table is first inserted into a template, the designer points out the double-click once with a speech bubble, for example “Double-click to edit the content” (see The ribbon: Speech bubbles on first insertion).

### Several objects at once

You can move, align, distribute, color, copy and delete several objects together.

#### Selecting several objects

- **Ctrl+click** (on the Mac, Cmd+click) adds an object to the selection or removes it. You also click the first object with Ctrl; one that was selected normally beforehand is not automatically part of it. From two objects on, the window shows the multiple selection.
- **Selection rectangle:** Starting from an empty spot, drag a rectangle with the mouse button held down. Every object it touches is selected, including headers and footers and page breaks. The designer reports, for example, “3 objects selected — move them together (drag) or remove them with Del.” If the rectangle hits nothing, nothing is selected afterward.
- Only objects of one level are selected: either directly in the document or in the same group. If you change the level, the selection starts over. In the group designer, the rectangle covers only the objects of the open group.
- Selected objects have a purple dashed frame with a light tint.
- Clearing: click an empty spot, or Esc once no other window is open.

#### What the window offers

At the top is the marker “Multiple” with the number and types of the objects (see The properties panel: The header of the panel), below it “Ctrl+click adds/removes. Drag moves all. Del deletes, Ctrl+C/V copies.”

[Image: On the left a small white sheet with three shapes side by side: a rectangle, an ellipse and a triangle. All three are surrounded by a purple dashed frame with a light purple tint; the triangle additionally carries small white squares with a blue border as handles and, at the top, a round rotation handle. Below the sheet is the button “Add page”. On the right the “Properties” window: a blue marker “Multiple” with the text “3 objects (Rectangle, Elli…”; below it the note “Ctrl+click adds/removes. Drag moves all. Del deletes, Ctrl+C/V copies.” Next come the fields “Fill color” and “Border color”, each with a checkered box with “∅” and, in the text field, the gray note “(mixed)”, then “Border thickness (pt)” with 1. Under the heading “Align” are three buttons with arrow symbols and a wide button “Distribute vertically”; at the very bottom “Copy” and a button “Delete” in red text.]
Caption: Three selected shapes and the “Properties” window for a multiple selection.
- Image marker 1: Selected objects have a purple dashed frame.
- Image marker 2: The badge names the number and types of the objects.
- Image marker 3: Shared colors and thickness; “(mixed)” means: the objects have different values.
- Image marker 4: Aligning and distributing.
- Image marker 5: Copy or delete all selected objects together.

| Setting | What it does | Default |
|---|---|---|
| “Fill color” | Sets the fill color of all selected objects. Appears only if each one has a fill: rectangle, group, circle and ellipse, triangle, star, polygon. | the shared color, otherwise gray “(mixed)” |
| “Border color” | Sets the border or line color of all selected objects. Appears for rectangle, all shapes including line and arrow, and for groups. For a group, a color switches the border on, clearing it switches it off. | the shared color, otherwise “(mixed)” |
| “Border thickness (pt)” | Sets the thickness of all selected objects, under the same conditions. The field does not accept negative numbers. | the shared thickness, otherwise “(mixed)” |

If not every object has these fields, for example as soon as a text or an image is among them, “No common style properties for this selection.” appears there. Font, size and text color do not exist in the multiple selection; you set them in the “Edit text” window. The background and border of a text, too, you change only individually. The fields have no ⓘ.

#### Aligning, distributing, copying, deleting

| Button | What it does | When it is there |
|---|---|---|
| “⇤” | Align left: all left edges to the leftmost one. | always, under “Align” |
| “⇔” | Center horizontally: all centers to the horizontal center of the selection. | always |
| “⇥” | Align right: all right edges to the rightmost one. | always |
| “⤒”, “⇕”, “⤓” | Align top, center vertically, align bottom. | only in a group or cell |
| “⇿ Distribute horizontally” | Makes the horizontal gaps equal; the leftmost and rightmost objects stay in place. | from three objects, only in a group or cell |
| “⇳ Distribute vertically” | Makes the vertical gaps equal. | from three objects |
| “⧉ Copy” | Puts all selected objects together on the designer’s clipboard. Message: “N objects copied – Ctrl+V pastes them, also in another window.” If the browser does not allow anything to be stored permanently, it says “… Only in this window.” | always |
| “🗑 Delete” | Deletes all selected objects immediately, without asking. Ctrl+Z brings them back. | always |

The align buttons show only their symbol; what they do is told by the mouse pointer. If the objects are directly in the document on several sheets, “⇳ Distribute vertically” does not distribute and reports: “Vertical distribution only works with objects on ONE page — the selection spans several pages.” Objects from older templates that are anchored to another object are skipped by aligning, with a message.

**Dragging together:** If you click one of the selected objects without Ctrl and drag, all move by the same distance.

- In a group, the grabbed object snaps to edges and centers. Directly in the document, the selection snaps only when “▦ Gridlines” is switched on.
- Directly in the document, the selection can move across sheets; the topmost object stops at the top edge of the printed area.
- Selected headers and footers stay in place; the designer reports: “Headers and footers stay in place when several objects are moved together — they belong to every page. Drag them one at a time.” A selected page break moves along.
- A selection cannot be dragged together into another group (see Positioning behavior: What changes when you drag in and take out).
- The arrow keys also move all selected objects (see Keyboard shortcuts: Arrow keys on the selected object).

### Copying, pasting and deleting

#### Deleting

| Way | Where | What happens |
|---|---|---|
| “🗑 Delete block” | for every object directly in the document, including group, table, header and footer and page break; tooltip “Remove this block from the document” | Asks first: window “Please confirm” with “Delete this block?” and the buttons “Cancel” and “Delete”. Esc or a click next to it cancel. A group is deleted with its content. |
| “🗑 Delete element” | for every object in a group or cell, including a group or table in a group; tooltip “Remove this object (same as the Del key)” | Deletes immediately, without asking. |
| “🗑 Delete this group” | in the group designer when nothing is selected; not in the column designer, header designer and cell designer | Leaves the group and deletes it with its content, without asking. Message: “Group deleted — Ctrl+Z undoes it.” The button is missing for an inner group that you opened directly from the sheet. |
| “🗑 Delete” | in the multiple selection | Deletes all selected objects, without asking. |
| Del or Backspace | for every selected object, including directly in the document and for headers and footers | Deletes immediately, without asking; for a multiple selection, all of them. If a table cell is selected, the key empties only its content. |
| Ctrl+X | for every selected object | Copies the object and then deletes it, without asking. |

Ctrl+Z brings back every deleted object. You can also delete a whole table via “🗑 Delete entire table” (see Data tables: Moving, copying, deleting).

#### Copying and pasting

| Key | What it does |
|---|---|
| Ctrl+C | Copies the selected object. Message: “Copied – paste with Ctrl+V, also in another window.” If the browser does not allow anything to be stored permanently, it says “… Only in this window.” |
| Ctrl+V | Pastes the copy. |
| Ctrl+D | Duplicates: copies and pastes immediately. This replaces the previous content of the designer’s clipboard; the Windows clipboard remains untouched. |
| Ctrl+X | Cuts (see Deleting). |

Where a copy goes:

- **Copy of an object from a group:** It goes next to the selected object, into the selected group or, in the group designer, into the open group. Without such a target, it goes into the first group of the document that does not repeat on every page. If there is none, the designer reports “There is nowhere to paste this.”
- In a group, the copy moves 5 mm to the right and down, a copied selection by 3 mm, never below the fixed bottom edge of the group. If the copy is taller than the fixed height of the group or cell, it still extends beyond it; the designer then reports it right away, with the same sentences as when inserting via the ribbon (see The ribbon: Where a click inserts), once for a copied selection. It does not report this for lines and arrows.
- **Copy of an object directly in the document:** It goes below the content of the last occupied sheet, in the group designer into the open group. A header or footer moves 5 mm to the right and down.
- Page breaks as well as headers and footers cannot be pasted into a group or cell. The designer reports: “Page breaks and groups with »Repeat on every page« belong on the page – they cannot be pasted into a group or cell. Paste them outside the group designer.”
- If the copy comes from another template or goes into another table row of the same template, the designer checks whether its fields fit here. If something remains open, a window asks what they should point to; it is called “Assign variables”, for a copy from the same template “Variables are leaving their row”; if everything fits, it reports only “… nothing to assign.” (see The “Assign variables” window).
- The copy keeps the positioning behavior of the original (see Positioning behavior: What changes when you drag in and take out).

> **Caution:** The copy of a header or footer is 5 mm further to the right and lower. How to put it back in its place is described under Headers and footers: Selecting, moving, copying.

When the shortcuts take effect is described under Keyboard shortcuts: The keys at a glance. How undo and redo work is described in the section Undo and Redo.

### Undo and Redo

The buttons “↶” and “↷” in the header bar and the keys Ctrl+Z, Ctrl+Y and Ctrl+Shift+Z take back and repeat changes to the document. This applies only in the designer: nothing is saved in Dynamics in the process. What you take back changes the saved template only when you press “Save” again.

| Setting | What it does | Default |
|---|---|---|
| What a step is | The designer combines changes that are less than 0.4 seconds apart into one step. Several key presses or one drag with the mouse therefore result in one step. What is compared is the content of the template: a mere selection and field and relationship lists reloaded in the background are not a step. | grouping 0.4 s |
| Size of the history | The designer remembers at most 100 steps; the oldest drop out. A new step empties the history for redoing. | 100 steps |

- **What an undo triggers:** The designer inserts the state before the step as the whole template. Afterward nothing is selected, and an open group or column designer is closed: Ctrl+Z in the group designer undoes and closes it. Rule results and variables are recalculated and the data tree is redrawn. A Ctrl+Z immediately after a change, still within the 0.4 seconds, takes back exactly that one change.
- **When the history starts empty:** when a template is opened or switched, after “Create template”, “Import” and “Duplicate”, after deleting (then another template opens) and after a language change (the page reloads). “↶” and “↷” are then gray. The draft of “New” gets an empty history of its own; if you cancel “New”, the history of the template that was open before returns unchanged. A few seconds after opening, the synchronization of the data sources in the background is finished; if you have changed nothing outside the data sources by then, the designer empties the history once more.
- **Combined steps:** “Apply” in the template settings combines all changes from the window into one step; with “Discard”, the steps from the window drop out of the history. A change by the Copilot agent arrives as one step that Ctrl+Z takes back. Changes in the “Manage data sources” window close their step when the window is closed.
- **Input fields, windows and text editor:** If the cursor is in an input or text field or in editable text, Ctrl+Z applies there, following the browser’s behavior, and not to the designer. For a dropdown list, on the other hand, Ctrl+Z applies to the designer. As long as any window is open, except the group designer, the Ctrl shortcuts do not act on the canvas behind it. The text editor has an undo history of its own (Ctrl+Z and Ctrl+Y there).

### Handles

Handles appear on the selected object. With them you change size, rotation, corner radius and corner points directly with the mouse. The fields on the right show the same numbers.

[Image: A selected rectangle with rounded corners on a white background, filled light blue, with a thin blue selection frame. On its sides are four white squares with a thick blue border and a white glow: one in the middle on the left, one in the middle on the right, one in the middle at the bottom and one at the lower right corner. Above the top edge, in the middle, is a round white button with a blue border on a short vertical blue stem. On the top edge, near the left corner, is a small yellow diamond with a golden border.]
Caption: A selected rectangle with its handles.
- Image marker 1: Size handles: you drag them to make the object larger or smaller.
- Image marker 2: Rotation handle: rotates the object around its center.
- Image marker 3: Rounding handle: rounds the corners (rectangle only).

#### Size handles

The size handles are small white squares with a blue border. When dragging, the dimensions snap to half millimeters, with the gridlines switched on to their lines; a nearby edge takes priority (see Snapping).

| Position | Handles | Limits |
|---|---|---|
| directly in the document | four: right, bottom, bottom right and left | at least 8 mm wide and 6 mm high; the right edge ends at the right page margin; unlimited downward |
| in a group or cell | eight: at all corners and edges | at least 2 mm; not beyond the group, its fixed bottom edge or the content area of the cell |

- Line and arrow as well as a text with automatic height have only the handles on the left and right. You change the height of a line in the “Height” field, that of a text after you have switched off the automatic height.
- A group never becomes narrower or lower than its content. If you drag a group with automatic height vertically, this switches off the check mark “Automatic height (fit to content)” and stores the dragged height as a fixed value; if you drag only sideways, it stays on. How text and group differ in height is described under Position, size, rotation and arrangement: Automatic height and limits.
- Tables have handles of their own for table width, column borders, header row height and row height, and the grip “✥” for moving (see Data tables: Adding, moving and resizing columns).
- In the PDF, the dimensions that resulted from dragging count.

In the group designer, the open group itself has five handles: left, right, bottom, bottom left and bottom right (tooltip “Drag to resize the group”), as long as nothing is selected in it. What they do and where they end is described under Groups: Size with the mouse. In the column designer and header designer, the same handles change column width and row or header row height (see Cells, header row and page break: In the column designer: properties, handles, notes). In the cell designer of an extra row or a free-form table, they are the handles of a group.

#### Rotation, rounding and corner point handles

| Handle | Where | What it does |
|---|---|---|
| Rotation handle: round button with a short stem above the object | image, line, arrow, rectangle, circle and ellipse, triangle, star, polygon | Rotates around the center; 0° is the handle exactly at the top, clockwise is positive. With the Shift key held down, in steps of 15°. Tooltip: “Drag to rotate · Shift = 15° steps”. See Rotation. |
| Rounding handle: yellow diamond on the top edge | rectangle only | Dragging to the right rounds more, to the left less; at most up to half the shorter side. Tooltip: “Drag: round the corners”. Writes “Corner radius (mm)”. |
| Corner point handles: purple dots | unrotated polygon only | Dragging moves a corner, a double-click removes it; at least three corners remain. Tooltip: “Drag: move corner · double-click: remove corner”. See Polygon. |

### Moving, snapping, hooking in and out

If you drag a selected or unselected object with the mouse, it follows the pointer. The position snaps to half millimeters.

- In a group, the object stays within the width of the group and above its fixed bottom edge.
- Directly in the document, it stays between the left and right page margins. You can drag it to another sheet; this is how you choose the sheet of an object.
- If an object is as wide as the page, it cannot be moved sideways. If you drag it clearly sideways, the designer reports once: “This object is as wide as the page — so it cannot be moved sideways. Enter a width on the right under »Width (mm)« (or drag the right edge of the object), then you can place it freely and put a second one next to it.” More on this is described under Position, size, rotation and arrangement: Position directly in the document.
- If you release a flowing object on a header or footer, the designer puts it above or below it, depending on where the mouse pointer is.
- With the arrow keys you move a selected object in small steps (see Keyboard shortcuts: Arrow keys on the selected object).
- There is no context menu of its own on objects with the right mouse button; only the cells of a grid from older templates have one. What a double-click opens is described under The double-click.

#### Snapping to edges and centers

If an edge comes within 1.2 mm of another edge or center while dragging, it snaps. A magenta dashed line shows what it snaps to. There is no switch for this.

- **Directly in the document,** edges snap to edges and centers to centers: at the margins and the center of the printed area and at neighbors that are at most 30 mm away crosswise. Page breaks do not count. When dragging to change size, only edges snap, horizontally also at the page margins.
- **In a group,** edges and centers snap to the group and to the other objects in it; lines do not count. When dragging to change size, an edge also snaps to a center, and an object snaps to the same width or height as a neighbor.
- With “▦ Gridlines” switched on, objects and edges also snap to the 5 mm grid (see Grid, snap lines and guides).
- There is no snapping to equal spacing; the distribute buttons of the multiple selection serve that purpose.

#### The insertion line

If you drag an object on the sheet or drop a new one from the ribbon or the “Data” area, a blue line with dots at the ends can appear. It appears only if two objects of the same column lie closely one above the other, with a gap of at most 2 mm, and you want to release exactly there. If you release there, the object goes into the gap, and everything below it on this sheet moves down by its height, including in neighboring columns. If the gap is larger, there is no line, and the object lands freely at that spot.

[Image: Excerpt of the canvas. Two rows with a light gray background are stacked, “1 Beratung” and “2 Schulung”, separated by a very narrow gap. Through the gap, across the whole width of the sheet, runs a strong blue line with a slight blue glow and a dot at each end. Directly below it runs a thin magenta dashed line. On the second row, to the right of “2 Schulung”, lies a selected bold text “Neue Zeile” with a blue frame and white handles; it is just being dragged into the gap, its top edge lies on the magenta line.]
Caption: The insertion line shows where a dragged text lands between two rows.
- Image marker 1: The insertion line: this is where the object goes.
- Image marker 2: The snap line: the top edge snaps to the row below.
- Image marker 3: The dragged text.

#### Into a group and out

If you release an object over a group, it goes into that group, and the target group shows a blue dashed frame. It comes out if you release it outside its group and over no other, or press the button “⬆ Take out of group”. The individual cases with their messages are described under Groups: Moving objects in and out, the consequences for positioning behavior and minimum spacing under Positioning behavior: What changes when you drag in and take out.

[Image: A group with a light blue tinted area and a thick blue dashed outline. Inside at the top left, in bold type, is “Lieferanschrift”. In the middle of the group lies a selected text “Contoso Handels GmbH” with a thin blue frame and white handles; it is just being dragged over the group.]
Caption: When dragging over a group, it shows a blue dashed frame.
- Image marker 1: The target group: this is where the text goes when you release.
- Image marker 2: The dragged text.

### Grid, snap lines and guides

Four kinds of lines appear on the canvas that are never printed. They are easy to confuse:

[Image: Excerpt of a sheet completely covered by a very light blue grid of fine lines. At the top left lies a group with a gray dashed outline and two lines of text, “Lieferanschrift” (bold) and “Contoso Handels GmbH”. Further down, offset to the right, “Zahlbar innerhalb von 14 Tagen.” stands in a box with a gray dashed outline. Below it a selected text “Neuer Hinweis” with a blue frame and white handles. A magenta dashed vertical line runs over the whole height of the excerpt along the shared left edge of the two texts and also crosses the group.]
Caption: Grid, guides and snap line on the canvas.
- Image marker 1: The grid: light blue grid with 5 mm spacing.
- Image marker 2: Guides: thin dashed outlines around groups and areas.
- Image marker 3: The snap line shows what the dragged text snaps to.

| Lines | What they look like | What they are for | Switching on and off |
|---|---|---|---|
| Grid | light blue grid with 5 mm spacing on every sheet or on the open group | Dragged objects and dragged edges snap to it, on the sheet as well as in groups and cells. A nearby edge or margin takes priority. The grid begins at the paper corner of each sheet, not at the page margin. | Button “▦ Gridlines” in the header bar (see The header bar: Gridlines); off after every load |
| Snap lines | magenta, dashed, only while dragging | Show which edge or center an object is currently snapping to (see Snapping). | no switch |
| Guides | thin dashed: gray around groups and areas, pale blue around table cells; for headers and footers in the accent color | Show where groups and cells are, even without border and background. Where a real border line exists, the guide disappears by itself. The selection frame of a selected object always stays visible. | Check mark “Show guides in the designer — in the whole template” (see below) |
| Insertion line | blue with dots at the ends; when dragging a page break, blue dashed | Shows where an object is pushed in between two others (see The insertion line) or where a dragged page break lands. | no switch |

As long as the gridlines are on, the button appears pressed. The spacing is fixed at 5 mm. The arrow keys do not snap to the grid. Only the millimeters are saved, not the state of the button. How you switch the gridlines on and off is described under The header bar: Gridlines.

| Setting | What it does | Default |
|---|---|---|
| “Show guides in the designer — in the whole template” (section “Guides”, with ⓘ) | Shows or hides the dashed outlines of groups, areas and table cells in the whole template. The check mark appears in two places and shows the same state in both: for a selected table in the “General” tab under “Guides” (for a selected column in the “Table properties” tab) and in the template settings in the “Page” tab (see “Page” tab). It does not affect the gridlines, snap lines and insertion line. | on |

### Keys for the selected object

The keys work on the canvas and in the group designer. When they do not work, for example in an input field or with a window open, is described under Keyboard shortcuts: The keys at a glance. Here are the keys that move, delete or copy a selected object:

| Key | Effect |
|---|---|
| Arrow keys ← ↑ → ↓ | Move the selected object in small steps, with the Shift key held down in larger ones; for a multiple selection, all of them. If nothing is selected, the arrow keys keep their usual effect, for example for scrolling. The step size, how far an object may go in the process and what the arrow keys do not check are described under Keyboard shortcuts: Arrow keys on the selected object. |
| Del, Backspace | Delete the selected object immediately, without asking (see Deleting). |
| Ctrl+C, Ctrl+X, Ctrl+V, Ctrl+D | Copy, cut, paste, duplicate (see Copying and pasting). |
| Ctrl+Z, Ctrl+Y or Ctrl+Shift+Z | Undo and redo (see Undo and Redo). |
| Esc | Closes the topmost window and then clears a multiple selection; the whole order is described under Keyboard shortcuts: Esc in detail. |

### Markers and warning symbols on the canvas

The canvas shows symbols on objects that point out something. None of them is printed. If you point at ⇕ or ⚠ with the mouse, a text explains what is meant; the hatched strips and areas show no such text.

[Image: Excerpt of a small white sheet. At the top a box with a blue dashed outline (header) with the bold text “Dyn365 Smart Templates”. Below it a light-blue-filled box with a blue border; in it the bold text “Zahlbar bis 11.07.2026” stands in a gray dashed box, on whose upper right edge sits a small blue circle with a white vertical double arrow. Below it is the text “Lieferung frei Haus innerhalb Deutschlands, …”, whose second line is cut off; below it lies an orange hatched strip. At the very bottom a box with a blue dashed outline (footer) with the text “Dyn365 Smart Templates · Musterstraße 12 · 10115 Berlin”; the red word “BEZAHLT” in an orange-outlined box extends into it, on whose upper left corner sits an orange circle with a white warning triangle.]
Caption: Symbols on the canvas. None of them is printed.
- Image marker 1: ⇕: The text lies on the box and moves along with it when the document is created.
- Image marker 2: Strip: The text has a fixed height and needs more room; the canvas cuts it off, the PDF does not.
- Image marker 3: ⚠: An object set to “Fixed position” covers a footer.
- Image marker 4: Guides: dashed outlines show where the header and footer are.

| Symbol | What it means | What you can do |
|---|---|---|
| blue frame with handles | The object is selected. A selected object directly in the document is additionally tinted light blue. | — |
| purple dashed frame with a light tint | The object is part of a multiple selection. | see Several objects at once |
| blue dashed frame while dragging | This is where the dragged object goes when you release: into this group, or, when dragging out, onto this sheet. | see Into a group and out |
| ⇕ in a blue circle at the top right | The object lies on another one and moves along with it when the document is created. The mouse pointer names the object below: a group, a rectangle, a text or an image; for the other shapes “the object below”. | Switch off with the check mark “Move along with the object below” (see Positioning behavior: Move along). |
| ⚠ in an orange circle at the top left and orange frame | An object set to “Fixed position” covers a header or footer. It is printed exactly here, also where the header or footer is; without a layer order of its own, the latter lies above it in print. Tables do not carry the symbol. | Move the object higher or lower, or set the positioning behavior to “Flowing on contact”. |
| orange hatched strip at the end of the sheet | An object extends beyond the bottom edge of the printed area, that is, into the bottom page margin or into the space of a footer. With “Fixed position” it is not split but extends into the margin; what goes beyond the paper is missing in the PDF. Otherwise, in the PDF it is split at this edge or moves as a whole to the next sheet, depending on the object. The first object of a sheet, on the other hand, stays in place if it fits on a whole sheet. While you drag, the strip is hidden. | Make it smaller, move it or change the behavior (see At the page edge). |
| orange hatched strip below a text | The text has a fixed height and needs more room. The canvas cuts it off, the PDF prints the whole text. | see Texts: Width and height |
| gray hatched area below a page break | The sheet ends here; what you place there appears on the next sheet. | see Pages, header and footer: Page break |
| thin dashed outlines | Guides around groups, areas and cells. | see Grid, snap lines and guides |

A visibility rule has no symbol on the canvas; an object with a rule looks like any other (see Visibility). Symbols on images, such as the box “not printable”, are described in Images: What the canvas shows.

### What changes in the document?

**On the canvas:** Moving, dragging to resize, pasting, deleting and dragging into a group change the template immediately and count as steps for undo; storing in Dynamics happens only with “Save”. Selections, handles, gridlines, snap lines, insertion line, guides, hatching and warning symbols appear only here. Visibility rules have no effect on the canvas (see Conditions: What changes in the document?).

**In the PDF:** Neither the symbols of the canvas nor the structure appear in the PDF. What counts are the position and dimensions that resulted from dragging, and the objects that you inserted, copied or deleted.

---

## Working with AI

*For users · Using the designer · Page en/mit-ki.html*

> **In short:** An AI can change your template on request. **There are two ways to do this:** the **AI assistant in Copilot**, which works right next to the designer in Microsoft 365 Copilot, and an **external AI**, such as an AI chat like ChatGPT, Claude or Gemini, which gets all the necessary information in a file, the AI package. If you have Microsoft 365 Copilot, the AI assistant is the more convenient way; without Copilot, the external AI is the alternative.

### The two ways

Way 1 **The AI assistant in Copilot** “AI assistant” opens the Smart Templates Assistant in Microsoft 365 Copilot next to the designer. You write your request in the chat, and the designer takes the change into the open template by itself. To the instructions › Way 2 **An external AI with the AI package** “AI package” creates a file with your template and everything an AI needs to make changes. You give it to an AI chat like ChatGPT, Claude or Gemini and bring its answer into the open template with “Upload AI changes”. To the instructions ›

Both ways begin in the designer’s template row: the AI assistant with “AI assistant” (image marker 1), the external AI with “AI package” (image marker 2); you bring its answer back with “Upload AI changes” (image marker 3).

[Image: An excerpt of the designer’s template row with the buttons “Import”, “Export”, “AI package”, “Upload AI changes”, “AI assistant” and “Duplicate”, each with a small symbol before the label.]

### How the two ways work

#### The AI assistant in Copilot

1. You click “AI assistant”. Microsoft 365 Copilot opens on the right, and the name and ID of the template are on the clipboard.
2. You paste them into the chat and write your request after them.
3. The assistant reads the template, the description of the template format and sample data itself from Dynamics, with your rights. It builds the change and checks it against the sample data.
4. The designer takes the change into the open template. You check it and make it effective with “Save”.

The step-by-step instructions are under Working with the AI assistant in Copilot.

#### An external AI with the AI package

1. You click “AI package” and choose what the AI gets. From this the designer creates a file: your template, the description of the template format and all tables that the template can reach.
2. You give the file to an AI chat like ChatGPT, Claude or Gemini and write what it should change.
3. The AI answers with its changes, as a file or as a message in the chat. Under “Upload AI changes”, you choose “Choose file …” or paste the copied answer with “Paste text …”; the designer checks the changes and takes them into the open template.
4. You check the result. Ctrl+Z takes the change back, “Save” makes it effective.

The step-by-step instructions are under Working with an external AI.

### The differences

| Feature | AI assistant in Copilot | External AI with the AI package |
|---|---|---|
| Which AI | The Smart Templates Assistant in Microsoft 365 Copilot | An AI chat of your choice, such as ChatGPT, Claude or Gemini |
| What the AI sees | What it reads itself in Dynamics, with your rights: the saved template, tables, fields and sample data | Only what is in the file. Real values are in it only if you check “Include sample data”. |
| How the change arrives | By itself in the open template; Ctrl+Z takes it back | As a file or chat answer from the AI, which you bring into the open template with “Upload AI changes”; Ctrl+Z takes it back |
| What results in the end | The same template, changed; effective with “Save” | The same template, changed; effective with “Save”. If you explicitly ask for a whole template, you open it as a new template via “Import”. |
| Building blocks | A building block object can only be moved, made visible or removed. It can change a building block itself and says beforehand that this takes effect everywhere it is used | A building block object can only be moved, made visible or removed. The AI does not get the content of a building block, only name, binding, prefix and variables |
| Setup | Once, by your administrator | None |
| Costs | Included with a Microsoft 365 Copilot license, otherwise Copilot credits | Depending on the AI chat |

### What you need

#### For the AI assistant in Copilot

- Your administrator has set up the assistant. How to do this is described in Turning on Copilot.
- You can use Microsoft 365 Copilot: with a Microsoft 365 Copilot license or with Copilot credits (see Turning on Copilot: Costs).
- You have the role “Smart Templates Designer” or the role “System Administrator”; without one of the two, the assistant cannot submit a change (see Turning on Copilot: Requirements).
- The template is in Dynamics. The assistant reads the saved version; so save your own changes before you ask it. If you have unsaved changes, the assistant opens anyway, and the designer reminds you: “The AI assistant only sees the saved version – save your changes first.”

#### For an external AI

- An AI chat to which you can give a file as an attachment, such as ChatGPT, Claude or Gemini. It answers with its changes, as a file or as a block of text in the chat.
- Your administrator does not have to set anything up for this, and you do not need Microsoft 365 Copilot.
- The template does not have to be saved: the AI’s changes go into the open template, even one that you have not yet stored in Dynamics.
- If you include sample data, do so only with an AI chat to which you may entrust this data (see Working with an external AI: The settings in the “AI package” window).

---

## Working with the AI assistant in Copilot

*For users · Using the designer · Page en/mit-ki-assistent.html*

> **In short:** “AI assistant” opens the Smart Templates Assistant in Microsoft 365 Copilot next to the designer. You write what should change; the assistant builds the change, and the designer takes it into the open template. You check the result, take the change back if necessary and make it effective with “Save”. What you need for this is described under Working with AI: What you need.

### Opening the assistant

The “AI assistant” button exists only in Dynamics, and it works only with saved templates. If the template is not yet in any record, for example because you have just imported it, no window opens; instead the designer reports: “First store the template in Dynamics with ‘Duplicate’ – the AI assistant works with saved templates.” Store it with “Duplicate” (see Managing templates: Duplicating) and then click again.

1. Open the template in the designer.
2. In the template row, click “AI assistant”. The button is directly after “AI package”.
3. A window of its own opens on the right with Microsoft 365 Copilot. The first time, Copilot shows a window “Smart Templates Assistant” there with the button “Add”. Click it. [Image: The upper part of a window in the Agents store of Microsoft 365 Copilot. At the top left the symbol of the assistant, a white robot head with a speech bubble on a dark turquoise background, next to it the name “Smart Templates Assistant”, below it in gray the name of the person who created it. Below that the black button “Add” and a symbol for sharing, at the top right a close mark. Next comes a row with three details: “Includes: Agents”, “Works in: Teams and Copilot” and “Free: Add and use for free”. At the bottom it says “Built using Microsoft Copilot Studio” and a description text in English that begins with “Help employees stay informed, productive, and connected.”] The first time, Copilot shows the assistant with the button “Add”. The developer’s name and the description come from Copilot Studio; here Microsoft’s English default text is still entered (see Turning on Copilot, step 5). 1The assistant for your templates. 2“Add”: click once; afterward the assistant is ready in the chat.
4. In the chat, click the input field and press Ctrl+V. The designer has already put the template on the clipboard; the field then contains, for example, “Template »Demo-Rechnung (Handbuch)« (ID 591f2b62-…):”.
5. Write your request after it and send it. [Image: The input field of the Microsoft 365 Copilot chat: a white field with a strongly rounded border. In it, in two lines, it says “Template »Demo-Rechnung (Handbuch)« (ID: a long string of digits and letters): Put the line »Vielen Dank für Ihren Auftrag.« below the table.”; the text cursor is after the last word. At the bottom of the field on the left a plus sign, on the right a small microphone and a black round button with an arrow pointing up.] The chat’s input field: Ctrl+V has pasted the sentence with the name and ID of the template, followed by the request. 1The sentence from the clipboard with the name and ID of the template. This is how the assistant knows which template is meant. 2Your request, directly after the sentence. Write one request per message. 3The button at the bottom right, an arrow in a black circle: it sends the message.
6. With the first request, the assistant asks whether it may connect to Dynamics with your credentials; the card calls it “Microsoft Dataverse”. Click “Allow”. This is needed only once. If the first answer stays empty or the card does not appear, reload the Copilot window. [Image: A card in the chat on a white background. At the top, in bold, the heading “Connect to continue”, below it the sentence “I’ll use your credentials to connect and retrieve the information you’re looking for.” On the left follows an empty light gray symbol box, next to it in bold “Microsoft Dataverse”. Below it “This connection can:” with two bullet points: “Microsoft Dataverse MCP Server” and “Perform an unbound action in selected environment”. A note with a small info symbol says that connections to other services via your credentials can bring privacy and security risks and that Copilot saves the settings for next time after the connection is made. At the bottom are the black button “Allow” and the gray button “Cancel”.] The card that appears in the chat with the first request. 1The question: the assistant wants to connect to Microsoft Dataverse with your credentials. It thus works within your rights. 2“Allow” permits the connection. This is needed only once; the setting is saved and used next time.

> **Tip:** A second click on “AI assistant” brings the window to the front again and puts the template on the clipboard again. This is also how you name a different template to the assistant if you have switched in the meantime.

> **Good to know:** If no window opens, the browser has blocked it. Allow pop-ups for Dynamics (how is described under What happens on click: When the browser blocks pop-ups) and click again. If the designer reports that no AI assistant has been set up in this environment yet or that it has not yet been made available in Microsoft 365 Copilot, contact your administrator. If copying to the clipboard does not work, the designer shows the sentence for the chat in a note (“First name the template there: …”); then enter it by hand.

### What you can ask for

Describe the change the way you would explain it to a colleague: where, what and under which condition. The assistant implemented these requests correctly in testing:

- “Put the total of the line items below the line items.”
- “Put the line »Vielen Dank für Ihren Auftrag.« below the table.”
- “For the logo at the top left: if the invoice is paid, show the Paid stamp instead.”
- “Put the Paid stamp at the top right, but only if the invoice is paid.”

Conditions like “only if paid” or “if the country is Austria, then …” can be built in by the assistant: for texts, images, whole areas, number formats and the rules of a table.

#### E-invoice

The assistant can also assign the e-invoice, for example with “Set up the e-invoice according to XRechnung.” It reads the standard with its tool “Standard lesen”, uses the same suggestions for the Dynamics invoice as “Apply suggestions” in the assignment window, and tells you what you should confirm; these details then appear in yellow in the window. What it can take neither from a field nor from a suggestion, it asks about instead of guessing: the routing ID (Leitweg-ID), your company’s data such as the VAT ID, the bank details, the tax type of discount and freight. If a value differs depending on the document, for example the type of invoice or the amounts of a credit note, it writes an if-then directly on the detail (see E-invoice: If-then on an entry); if a list gets different entries per document, for example the previous invoice for cancellation and final invoices, it writes cases (see E-invoice: Different depending on the case). Afterward, check the e-invoice in the designer with “Check again” (see E-invoice: Checking with a sample record). You can also open the assistant with the e-invoice request on the clipboard via “Open AI assistant” in the “E-invoice” tab of the template settings (see E-invoice: Assigning with AI).

The assistant writes and uploads a standard of your own only if you explicitly ask for it, with its tool “Standard hochladen” and with your rights (role “Smart Templates Designer”). Before uploading, it asks in the chat whether it should store the standard in Dynamics; only with your confirmation does it upload it. In doing so, it can replace an existing standard of your own with the same version. Uploaded description files are not part of Smart Templates. Whoever uploads them is responsible for their content and its rights.

#### Building blocks

The assistant may only move a building block object in a template, set its visibility or remove it. A change that rearranges it, fills its content or creates a new one is rejected, as is a new reference of the template to something that only the building block brings along; of a building block, the template sees only its variables. It can change a building block itself. Before it does so, it tells you that the change takes effect everywhere the building block is used; the answer afterward names in how many templates that is (see Building blocks: Building blocks and AI).

> **Tip:** One request per message works best. The assistant checks every change against the template’s sample record. If it uses a different field than the one named, for example because the named one is empty in the sample, it should say so and name the field. Even so, check with fields whether it picked the right one: in testing, for “Fälligkeitsdatum” it once used the field “Zahlbar bis”.

### What happens then

1. The assistant reads the template, the description of the template format and sample data from Dynamics, looks up fields, builds the change and checks it against the sample data. This usually takes about a minute.
2. It answers in a few sentences what it has changed. [Image: The assistant’s answer in the chat. At the top a small blue-green symbol with a smiling robot head and next to it the name “Smart Templates Assistant”. Below it follows the text in five lines: “The line »Vielen Dank für Ihren Auftrag.« is now directly below the line item table and moves down with it; the position was checked with the sample data. 5 changes to »Demo-Rechnung (Handbuch)« checked and stored as an AI change. The saved template is unchanged: if »Demo-Rechnung (Handbuch)« is open in the designer, it takes the change as one step (Ctrl+Z takes it back); it is printed only after »Save«.”] The assistant’s answer in the chat: it names the change and says where it is. 1Under the assistant’s name, the answer begins with the change itself: where the new line is and that it checked it with the sample data. 2The change is “stored as an AI change”. It is ready; the saved template stays unchanged. 3The end: if the template is open in the designer, it takes the change. How you take it back and make it effective is described under Checking, taking back, saving.
3. A few seconds later, the designer takes the change into the open template and reports: “Copilot changed the template: …” with the assistant’s sentence and the note “Ctrl+Z undoes it.”

[Image: A message from the designer with a green stripe on the left edge and a green check mark. The text reads: “Copilot changed the template: The line »Vielen Dank für Ihren Auftrag.« is added below the line item table. Ctrl+Z undoes it.” At the top right is a small ×. The message is white with rounded corners.]
Caption: The message after a change by the assistant. The sentence after the colon comes from the assistant.
- Image marker 1: The green check mark: the change has arrived in the open template.
- Image marker 2: The closing sentence “Ctrl+Z undoes it.”: the note about taking it back (see Checking, taking back, saving).

The designer takes a change only as long as the template is open there and the designer window is visible. If a window is currently open in the designer, for example “Template settings”, it waits until you close it. A change that has not yet been taken does not expire: it arrives the next time the template is opened, in any designer, including a colleague’s and even days later.

> **Caution:** If you have changed the template yourself in the meantime, the assistant’s change may no longer fit. The designer then does not take it and reports “A change from Copilot does not fit the open template and was not applied”. Save your changes and ask the assistant again.

### Checking, taking back, saving

- **Checking:** Look at the result with “Full preview”, ideally also with a second sample record. The assistant is an AI; it can be wrong.
- **Taking back:** Ctrl+Z takes back the assistant’s whole change in one step. An image that it supplied stays in the image library.
- **Saving:** Only “Save” makes the change effective. Until then, buttons and flows in Dynamics print the saved version (see Full preview and printing in Dynamics).

> **Good to know:** The assistant works with your rights and sees only templates, tables and records that you may read in Dynamics. It never saves a template itself: every change it submits is in the table “Smart Templates KI-Änderung” with its description, and it gets into the template only via the designer. It uploads a standard of your own for the e-invoice only at your explicit request and after a confirmation in the chat (see E-invoice). Apart from its own tools, it cannot call any actions, and searching the internet is switched off.

### Images

- Images that are already in Dynamics are inserted by the assistant via their short name, on request depending on a condition, for example “Paid stamp instead of logo if paid”.
- It cannot take a photo or logo that you send it in the chat into the template. Upload it first in the designer: in the image selection via “Fixed image” and then “Upload new image” (see Image library and fonts: Uploading a new image). Then give the assistant its short name.
- It can supply a simple graphic itself, such as a stamp with lettering. The designer stores it with the images when taking it over and reports “Images from Copilot: …”.

### Language

The assistant speaks German and English. According to Microsoft, the language of a conversation follows the language setting of the browser or of Microsoft 365; otherwise the main language German applies; its instruction also asks it to answer in your language. If you write in a language other than German or English, it answers in German. According to its instruction, it is supposed to write labels and texts that it puts into the template in the language of the template or in your language, even if the examples in the format description are in English.

If the designer is set to English, “AI assistant” puts the sentence for the chat on the clipboard in English, for example “Template »Rechnung« (ID …):”.

### What changes in the document?

**On the canvas:** The assistant’s change appears immediately, like a change of your own. How you take it back is described under Checking, taking back, saving.

**In the PDF:** In “Full preview” and “PDF” of the designer immediately, even unsaved; buttons and flows in Dynamics print it only after “Save”.

---

## Working with an external AI

*For users · Using the designer · Page en/mit-ki-paket.html*

> **In short:** An AI can change your template even without Microsoft 365 Copilot: an external AI, such as an AI chat like ChatGPT, Claude or Gemini. With “AI package”, the designer creates a file with your template and all the information the AI needs for this. The AI answers with its changes, and you bring them into the open template with “Upload AI changes”, as a file or as pasted text, as with the AI assistant in Copilot. What you need for this is described under Working with AI: What you need.

### What it is

An external AI works outside Dynamics. It knows neither your template nor your tables and has no access to your data. The AI package gives it everything it needs in one file, and with it, it can adapt your template. It is the alternative to the AI assistant in Copilot if you do not have Microsoft 365 Copilot.

### The basic idea

An AI can change a template correctly only if it knows how templates are built and which tables and fields exist. This is exactly what is in the AI package: your template, the description of the template format and all tables that the template can reach, with fields and option values. On request, sample data and the images that the AI should know are added. Like the AI assistant in Copilot, the AI answers only with its changes. The designer checks them and takes them into the open template as one step. The structure of the file is described in the chapter AI package: structure of the file.

### Advantages and limits

- **Any AI chat:** You use the one your company uses.
- **Nothing to set up:** Your administrator does not have to prepare anything, and you do not need a license for Microsoft 365 Copilot.
- **No access to Dynamics:** The AI sees only what is in the file. Real values are in it only if you check “Include sample data”.
- **As with the AI assistant:** The change arrives as one step in the open template. Ctrl+Z takes it back, and only “Save” makes it effective.

In return, there are more manual steps than with the AI assistant: creating the file, giving it to the AI and uploading or pasting its answer.

### Creating the package

1. In the template row, click “AI package”. The button is next to “Export”. [Image: An excerpt of the designer’s template row with the buttons “Import”, “Export”, “AI package”, “Upload AI changes”, “AI assistant” and “Duplicate”, each with a small symbol before the label.]
2. In the “AI package” window, choose what the AI gets: at the top, if you wish, the check mark “Include sample data” (image marker 1), below it under “E-invoice” the standards for the e-invoice and under “Images for the AI” (image marker 2) the images it should know. An image that is still missing you upload with “Add image …” (image marker 3). What the settings do is shown in the table below the steps. [Image: The “AI package” window with a close mark at the top right. Two paragraphs explain what is in the file and that the AI answers with its changes, which you bring into the open template with “Upload AI changes”; a whole template comes only on explicit request and is opened via “Import”. Below it the check mark “Include sample data”, not set, with the note that real values from your database are then in the file, and the sentence “Included is the sample record »RE-2026-1042 Contoso Handels GmbH«.” Next comes the section “Images for the AI” with an explanatory sentence and a list: “Firmenlogo” (logo_full) and “Stempel Bezahlt” (stamp_paid) are checked, “Unterschrift Geschäftsführung” (unterschrift) is not. Below it the button “Add image …” and at the very bottom the blue button “Create file”.] Sample record and images are examples.
3. Click “Create file” (image marker 4). The designer downloads the file and closes the window.
4. Give the file to the AI chat as an attachment and write what it should change.

If the template contains building blocks, the section “Building blocks in this template” follows after the template: for each building block object, name, binding, prefix and its variables. The AI does not get the content of a building block; it may only move a building block object, set its visibility or remove it (see Building blocks: Building blocks and AI).

### The settings in the “AI package” window

| Setting | What it does | Default |
|---|---|---|
| “Include sample data” | When checked, real values of one record and of the records attached to it are in the file (see the “Caution” note below the table). The window names the sample record. If none is chosen, the designer takes the most recently changed record of the primary source; which one that is, the window does not say. Works only in Dynamics. | off; never remembered |
| “Images for the AI” | One check mark per image in the image library; the checked ones are in the file with name and short name. | the images that the template uses |
| “Add image …” | Uploads a new image to the library and checks it (see Image library and fonts: Uploading a new image). | – |
| “Include the e-invoice standard” | When checked, the details of the standards that are checked in the list below are in the file, one section per standard: ID, name, type, mandatory and the common codes, for the Dynamics invoice also the suggestions and the description of standards of your own. The list names each standard with name, version and origin (supplied or standard of your own). ZUGFeRD is preselected, plus the standard the template has set if it is a different one. If you uncheck the last check mark in the list, this check mark goes off too; if you set it again, the preselection is back. Every standard makes the file larger, ZUGFeRD EXTENDED the most. This is how the AI can assign the e-invoice (see E-invoice: Assigning with AI). | on if the template has the e-invoice switched on or if you open the window with “Open AI package …” in the “Standards for the e-invoice” window or with “Download AI package” in the “E-invoice” tab; in the list ZUGFeRD and the template’s standard |
| “Create file” | Loads the format and table directory down to the sixth level, shows the progress, downloads the file and closes the window. If you close the window beforehand, no file is created. | – |

The file is named like the template, converted as for the PDF (see Full preview and PDF: The file name), with “-ki” at the end, for example “auftragsbestaetigung-ki.md”. In the English designer it is called “auftragsbestaetigung-ai.md”, and the task and the format description are then in English as well. The examples in the format description are in English in both languages; the task therefore asks the AI to write labels and texts in the template in the language of the template or in your language.

> **Caution:** With the check mark “Include sample data”, real values from your database are in the file, including names, addresses and other personal data. In that case, give the file only to an AI to which you may entrust this data.

### Taking over the AI’s answer

1. The AI answers with a file that contains only its changes, or with a message in the chat in which the changes are a block of text. You do not have to save a message as a file: copy the whole answer, sentences and text block together, most simply with the chat’s copy button under the answer.
2. In the template row, click “Upload AI changes”. The button is next to “AI package” and opens a small menu with two entries: In both cases, the designer finds the change list itself, even between sentences and in a code block.
   → The designer checks the changes and takes them into the open template as one step, even if it has not been saved yet. Meanwhile the “Upload AI changes” window is shown with the line “Checking the changes …”; it closes by itself. Afterward the designer reports, for example, “12 changes from the AI applied. Ctrl+Z undoes them, »Save« makes them take effect.” For a single change, the message begins with “One change from the AI applied.” [Image: An excerpt of the designer’s template row with the buttons “Import”, “Export”, “AI package”, “Upload AI changes”, “AI assistant” and “Duplicate”, each with a small symbol before the label.]
   - “Choose file …” opens the file selection. Choose the AI’s file; an answer saved as a text file (“.txt” or “.md”) also works.
   - “Paste text …” opens the “Paste AI changes” window with a large field. Paste the copied answer with Ctrl+V and click “Apply”. “Cancel” closes the window without changing anything.
3. Check the result with “Full preview”. Ctrl+Z takes back the whole change; only “Save” makes it effective.

If the AI has supplied new images, the designer takes an identical existing image or creates the new one in the image library; this works only in Dynamics (see Managing templates: Images included). Afterward a note (“Images from the AI: …”) names what happened to the images.

If the answer brings along a standard of its own for the e-invoice (the AI does this only if you ask for it), the designer asks beforehand: “The AI’s answer brings an own standard for the e-invoice: … Upload it and apply the changes?” With “Upload”, it uploads the standard first, as described under E-invoice: Uploading a standard, and then takes over the changes. If the standard already exists with exactly this content, it does not upload it again. If it exists with different content or the check rejects it, the designer takes nothing over and names the reason in the window “Standard from the AI’s answer”; an existing standard can be replaced only via “Manage standards …”.

> **Caution:** Do not change the template while the AI is working. Its changes refer to the state in the AI package; if they no longer fit the open template, the designer does not take them over.

> **Good to know:** If you write the AI another request in the same chat, it assumes that you have applied its previous changes and builds on them. If you have not applied them, tell it so.

#### If the designer does not take over the changes

If a change does not fit the open template or does not result in a valid template, the designer takes over none of the changes; the template stays as it was. Also rejected are a change that rearranges a building block object, fills its content or creates a new one, a new reference of the template to something that only a building block brings along, and a change to the key `bausteine`, which only “Export” writes. What was already in the template like this beforehand does not stop a change. If a building block is open, the message after applying names in how many templates it is used. The designer then shows the window “The AI's changes cannot be applied like this” with the errors, each with the location. The sentences in it are addressed to the AI. Click “Copy list” and give the list back to the AI chat: besides the errors, it contains the request to correct exactly these places and to send the complete change list. The designer confirms with “List copied – give it back to your AI.” You upload or paste the corrected list as before. If you pasted the answer, the window says “Pasted text” instead of a file name.

If a test step (“test”) fails, as in the image, the open template does not match the state the AI assumes; usually it was changed since the AI package. The window then advises: “If you have changed the template since the AI package, create a new AI package and give it to the AI together with your request.”

[Image: The window “The AI's changes cannot be applied like this” with a close mark at the top right. Below it the sentence “One error in »aenderungen.json«. Give the list back to your AI so that it fixes exactly these places.” and the advice “If you have changed the template since the AI package, create a new AI package and give it to the AI together with your request.” Then the red heading “Error” with one list item: the location “Aenderungen” as small text on a light background, followed by the sentence “Change 1 (test): At »/body/0/type« there is something other than expected: »Group« instead of »Table«. Read the template again.” At the bottom right the buttons “Copy list” and “Close”.]
Caption: The window after a rejected change list. Here the AI expected a table at the first place in the template; but there is a group there.
- Image marker 1: The advice about a new AI package appears only if a test step has failed.
- Image marker 2: “Copy list” puts the errors and the request to the AI on the clipboard.

Further messages:

| Message | What you do |
|---|---|
| “Open a template first.” | No template is open. Open the template for which you created the AI package, and then upload the file. |
| “Paste the AI’s answer first.” | The field in the “Paste AI changes” window is empty. The window stays open; paste the AI’s answer and click “Apply” again. |
| “The file contains 3 change lists. Please upload only one.” | The file has more than one change list; the number names them. The designer does not choose one and takes nothing over. Ask the AI for exactly one change list. |
| “The text contains 3 change lists. Please paste only one.” | The same for the pasted text. If you copied several answers from the AI at once, paste only the last one; otherwise ask the AI for exactly one change list. |
| “The file does not contain a change list but a whole template. Open it with »Import«.” | The file contains a whole template instead of changes. If you want the template, open it via “Import” (see A whole template instead of a change). If you want only changes, ask the AI for a change list. |
| “The text does not contain a change list but a whole template. Save it as a file and open it with »Import«.” | The pasted text contains a whole template. “Import” opens only files: save the template as a file, ideally with the extension “.json”, and then open it (see A whole template instead of a change). |
| “The file does not contain a change list from the AI.” | The designer finds no change list in the file. Check whether you chose the right file, and otherwise ask the AI for a change list. |
| “The text does not contain a change list from the AI.” | The designer finds no change list in the pasted text. Check whether you copied the AI’s whole answer, and otherwise ask the AI for a change list. |
| “This is the AI package itself. Upload the AI’s answer here.” | You chose the file that you gave to the AI. Choose the file with the AI’s answer. |
| “This is the AI package itself. Paste the AI’s answer here.” | You pasted the content of the AI package instead of the AI’s answer. Copy the AI’s answer and paste it. |
| “The AI’s change list only contains test steps and changes nothing.” | The list only secures what is in the template and changes nothing. Ask the AI for the actual change. |
| “The change list is not valid JSON (…).” | Appears as an error in the window “The AI's changes cannot be applied like this”. The file or the pasted text looks like a change list but cannot be read; the reason is in the parentheses. Save or copy the AI’s answer again in full; if it stays this way, ask the AI for a new change list. |
| “The check did not give a reason.” | Appears as an error in the window “The AI's changes cannot be applied like this”. The check rejected without naming an error. The template is unchanged. Upload the file again or paste the text again. |
| “The AI’s changes could not be checked right now; nothing was applied: …” | The check could not be reached; the reason is after the colon. The template is unchanged. Try again later. |
| “The file »Name« could not be read.” | The browser could not read the file. Choose it again or save it anew. |
| “The AI’s changes could not be applied.” | Something unexpected went wrong while applying. Try again. |

#### A whole template instead of a change

If you explicitly tell the AI that you want a whole template as a file, it answers with the complete template. You open it via “Import” as a new template:

1. The AI answers with the whole template, as a file or as a block of text in the chat. You save a block of text as a file, ideally with the extension “.json”. How the designer deals with text files and with sentences around the template is described under Managing templates: Importing.
2. Open the file in the designer via “Import”. The designer checks it before it opens it (see Managing templates: The report windows). If it finds errors, it shows them in a list. Copy it with “Copy list” and give it back to the AI chat so that it fixes exactly these places. [Image: The window “The template cannot be opened like this” with a close mark at the top right. Below it the sentence “One error in »Angebot-neu.json«. Give the list back to your AI so that it fixes exactly these places.” Then the red heading “Error” with one list item: the location “body[0].type” as small text on a light background, followed by the sentence “Unknown object type »Textfeld«. Allowed: Text, Image, Group, Table, Grid, Line, Rect, Ellipse, Triangle, Star, Arrow, Polygon, PageBreak.” Below it the ocher heading “Notes” with one list item: the location “sources” and the sentence “The template has no data source; the designer asks for the primary source when it is opened.” At the bottom right the buttons “Copy list” and “Close”.]
3. Store the result in Dynamics with “Duplicate” (see Duplicating). This creates a new template with its own ID; the template you started from stays unchanged, and buttons and flows set up for it continue to print the original template. If a button or flow should print the result, set it up for the new template (see Buttons: the assistant).

---

## Texts

*For users · Objects · Page en/texte.html*

> **In short:** A text is the object for everything written in the document: heading, paragraph, address block or footnote. You create it with “Text” in the ribbon or drag a field from the “Data” area onto the sheet. You write and format it by double-clicking in the “Edit text” window; this is described in The “Edit text” window. On the right under “Properties” are line spacing, inner margins, border, size and position. On this page you also find the dynamic text, which changes one spot depending on the data, and the content depending on a condition, which changes the whole text. On the canvas, fields appear as blue markers with their name; the values are shown only by the full preview and the PDF.

### Inserting a text

1. In the ribbon, in the “Elements” section, click “Text”. You can also drag the button to the desired place on the sheet.
   → A box with “Neuer Text” appears and is selected. For the first text of a template, a speech bubble points to it: “Double-click to edit the text”.
2. Double-click the new text and write your content in the “Edit text” window (see The “Edit text” window).
   → After “Apply”, your text is on the sheet.

Where a click on “Text” puts the new text and what the designer reports in the process is described under The ribbon: Where a click inserts. What happens when you drag the button onto the sheet is described in The ribbon: Dropping by dragging. In the group designer, the same button is in its own ribbon (see The ribbon: The ribbon in the group designer). The other buttons of the ribbon are described in The ribbon.

> **Tip:** If your template already has a group that is not repeated on every page, a text you click into place lands in it without asking. If it should stand freely on the sheet, drag the button to the desired place.

A new text begins like this: content “Neuer Text” (in English if the template language is English), 50 mm wide, “Automatic height (fit to content)” switched on, the template’s default font at 10 pt, color #222222 (almost black), left-aligned and with the positioning behavior “Flowing on contact”. This also applies in a group, where “Fixed position” is otherwise the default (see Positioning behavior: What a new object starts with).

#### Dragging a field onto the sheet

If you drag a field from the “Data” area onto an empty spot, a new text is created that contains exactly this field. Its width depends on where you release:

- directly on the sheet: 50 mm, positioning behavior “Flowing on contact”;
- over the middle of a group on the sheet and, in the group designer, on the free area of the open group: 60 mm, in that group;
- onto a group that is itself inside a group: 40 mm, in that inner group.

In both group cases, the positioning behavior “Fixed position (default)” applies, without a setting of its own (see Positioning behavior: What a new object starts with). How much of a group that stands directly on the sheet counts, and what is created if you release outside it, is described under Groups: Which area of the group counts; the same applies to the “Text” button that you drag. There are two special cases:

- An image or file field does not become a text but an image; for the image field, the designer first asks about the quality. More under Images: Images from the data.
- A field that applies per row of a list (for example the quantity of a line item) belongs in a table cell. What the designer inserts or reports instead on the free sheet is described under Data tree and field picker: A “per row” field outside a table cell.

What else is created when dragging a field, for example onto an existing text or with the fields of a rule on a list, is described under Data tree and field picker: Clicking and dragging.

#### How the canvas shows a text

[Image: Excerpt of the canvas with three lines of text one below the other on a white sheet, each in a dashed frame. First line: “Rechnung Nr.”, a marker “Rechnungsnummer” with a blue background, “vom” and a blue marker “Rechnungsdatum”. Second line: “Zahlbar innerhalb von”, a pill “30 Tagen” with a green background and “ohne Abzug.”. Third line: “Seite”, a blue marker “Page #”, “von” and a blue marker “Pages ∑”. Everywhere the names of the fields appear, not values.]
Caption: Fields and dynamic texts on the canvas: names instead of values.
- Image marker 1: A field marker: blue, with the name of the field. The value appears only in the full preview and in the PDF.
- Image marker 2: A dynamic text: green pill with its label. Which branch is printed is decided only when the document is created.
- Image marker 3: The page numbers are called “Page #” and “Pages ∑” on the sheet.

- **Fields** appear as blue markers with their name, not with the value. In a colored passage the marker appears in its color, with a dashed frame; in one highlighted with the highlighter it stays blue and dashed, without a background of its own (see Edit text: Markers in the text). Which field exactly is behind it is shown in the “Edit text” window by the mouse pointer over the marker (name and “Source: …”). The page numbers are called “Page #” and “Pages ∑”, custom variables appear without the @ sign, and a display name you assigned yourself (see The “Edit text” window: Markers in the text) takes precedence over everything.
- **A dynamic text** appears as a green pill with its label. It is not evaluated on the canvas.
- If a display name contains line breaks, the marker keeps room for those lines. This way you see roughly how long the value will be later.
- A text with content depending on a condition shows the version that matches the sample record.
- What a text with a fixed height looks like when its content does not fit is described under Width and height.
- How a text appears in the “Structure” is described under Working on the canvas: The structure.

#### Dragging to resize, moving and deleting

- **Handles:** They work as with all objects (see Working on the canvas: Size handles). With “Automatic height”, a text has only the left and right handles. A text cannot be rotated (see Position, size, rotation and arrangement: Rotation), and it has no handle for rounded corners.
- **Moving:** as with all objects, see Working on the canvas: Moving, snapping, hooking in and out.
- **Deleting:** Del or Backspace delete the selected text without asking, Ctrl+Z brings it back (see Working on the canvas: Copying, pasting and deleting).

### The properties of a text

If you select a text, its settings are on the right in the “Properties” area. How this area is organized in general is described under The properties panel. For a text there are two variants:

- **Text directly on the sheet:** two tabs. “General” contains content, text, line spacing, inner margins (mm), border & background and visibility. “Position & size” contains positioning behavior including arrangement, “Keep together at page break” or the note about it, the position (X, Y) and the size. Below it is the “Actions” section with “🗑 Delete block”. The tab you chose last stays when you switch to the next object.
- **Text in a group or table cell:** no tabs, everything one below the other in this order: “⬆ Take out of group” (only in a group), content, position, size, text, line spacing, inner margins (mm), border & background, positioning behavior including arrangement, order in the group, visibility (without a heading of its own) and finally “Actions” with “🗑 Delete element”. “Keep together at page break” does not exist here.

At the very top is the badge “Text” and next to it the beginning of the text. Fields appear in it with their display name, line breaks become spaces. From 41 characters on, it is shortened to 39 characters and “…”; the mouse pointer shows the whole beginning. If the text has versions, the text of the first version is shown there.

[Image: The “Properties” area for a selected text directly on the sheet, in full length. At the top the badge “Text” and the beginning of the text “Rechnung Nr. Rechnungsnumme…”, below it the two tabs “General” (active, underlined) and “Position & size”. Under “Content” is the preview of the text (“Rechnung Nr.” with a blue marker “Rechnungsnummer”, in the second line “Vielen Dank für Ihren Auftrag.”), below it the blue button “Edit text” with a pencil and the button “Conditional content …”. Next come the section “Text” with the note that font, size, color, bold, italic and underline are set in the text editor, “Line spacing” with the field “Factor (empty = from the template)” and the gray note “from the template: 1”, “Inner margins (mm)” with the four empty fields Top, Bottom, Left and Right and the sentence “Moves the text inward from the edge/border.”, “Border & background” with the background “none”, the check mark “Turn on border” and the field “Corner radius (mm)”, “Visibility” with the check mark “Turn visibility rules on/off” and at the very bottom “Actions” with the button “Delete block” in red text.]
Caption: The properties of a text directly on the sheet, “General” tab.
- Image marker 1: Two tabs: the one you chose last stays when you switch to the next object.
- Image marker 2: The preview of the content; a click on it opens the “Edit text” window.
- Image marker 3: The “Edit text” button opens the same window.
- Image marker 4: Switches on content depending on a condition.
- Image marker 5: The line spacing of this text; if empty, the template’s default applies.
- Image marker 6: Background, border and corner radius.

#### Content

| Setting | What it does | Default |
|---|---|---|
| Preview of the content | Shows the text with its formats; fields appear as markers with their name. A click opens the “Edit text” window (mouse pointer: “Click to edit”). An empty text shows “(empty – click to edit)”. | – |
| “✎ Edit text” | Opens the “Edit text” window for this text (see The “Edit text” window). | – |
| “Conditional content …” | Switches on content depending on a condition (mouse pointer: “Change the content depending on a condition”). The previous text becomes version 1 without a condition, and right away the window “Conditional content — which version?” opens. See Content depending on a condition. | off |
| “N versions — the first one whose condition is met is printed.” with “✎ Edit versions …” | Appears instead of the preview and the two buttons above it as soon as the text has versions (for one, it says “1 version”). Below it is each version with number and name, without a name with its condition as a sentence, for example “if Land = DE” or “Otherwise — always applies”. The button opens the versions window. | – |

#### Font, size, color and alignment

Under the heading “Text” there is only the sentence “You set the font, size, color and bold/italic/underline in the text editor (✎).”; there is deliberately no field for font, size, color, bold or alignment in the properties. You set all of this in the “Edit text” window: for a passage with the buttons of the toolbar, for the whole text after Ctrl+A with the same buttons (bold, italic and underline then switch the basic style of the whole object), the alignment per paragraph (see The “Edit text” window: The toolbar, The “Edit text” window: Bold, italic, underline and the whole text and The “Edit text” window: Alignment).

Older templates in which font, size, color or alignment are still stored on the whole object continue to print unchanged. The editor shows such an alignment as a pressed button; an explicitly chosen “Align left” in the editor overrides it.

#### Line spacing

| Setting | What it does | Default |
|---|---|---|
| “Factor (empty = from the template)” under “Line spacing”, with ⓘ | Stretches the spacing between the lines of this text: 1 = single, 1.5 = one and a half, 2 = double. The additional spacing goes below each line; the first line keeps its position. At most 5, larger numbers are saved as 5; the arrows on the field go in steps of 0.05. Empty, 0 or a negative number removes the setting; the template’s default line spacing then applies, which the field shows in gray, for example “from the template: 1”. | empty |

- **Where the value comes from:** The setting that is closer to the text always applies: a paragraph with its own spacing before the text object, the text object before the table, the table before the template. You choose a paragraph’s spacing in the editor in the “Line spacing” list (see The “Edit text” window: Size, font and line spacing); the template’s default under Template settings: Font.
- **In a table:** If the text is in a cell from the column designer, in an extra row or in a free-form table and the table has a line spacing of its own, the table’s value applies when the field is empty. If you edit the text in the cell designer, the field is called “Factor (empty = from the table)” and shows “from the table: …”. A header cell from the header designer does not follow the table’s value.
- **Canvas, editor and PDF:** On the canvas and in the PDF the spacing works the same. In the “Edit text” window you see it only in part: a spacing above 1 is shown by the window only below lines that end with a line break, a spacing below 1 not at all. What counts is the print; check it in the full preview.

> **Tip:** For the whole text it also works in the editor: press Ctrl+A and choose a value in the “Line spacing” list, for example “Line spacing 1.5 — one and a half”. This then applies to all paragraphs of the text. In our current version, the field “Factor (empty = from the template)” loses the cursor when you type after the first character. So set the value with the arrows on the field or in the editor via the list. Click into the field again before using Backspace or the arrow keys: if the cursor is not in an input field, Backspace deletes the selected object, and the arrow keys move it (Ctrl+Z brings back both).

#### Width and height

The fields for size are on the sheet in the “Position & size” tab under “Size”, in a group or cell in the “Size” section and in the editor under The “Edit text” window: Text box size. What “Width (mm)”, “Automatic height (fit to content)” and “Height (mm)” do is described in Position, size, rotation and arrangement: Width and height for each type of object and Position, size, rotation and arrangement: Automatic height and limits. “Min. height” and “Max. height” under “Advanced (limits)” are described in the next section, Min. height and max. height.

In the PDF, border and background are as tall as the text including inner margins, with “Automatic height” within “Min. height” and “Max. height” (see Min. height and max. height). With a fixed height, they are therefore taller or shorter in the PDF than on the canvas; what else looks different then is described in the box below.

> **Caution:** With a fixed height, canvas and PDF look different as soon as more text goes in than fits in the box. The canvas cuts it off and shows an orange hatched strip below the box at the height of the overflow; the strip appears only for an overflow of more than 0.5 mm. The PDF prints the whole text, border and background become as tall as the text including inner margins, an object with “Flowing” below it moves down by the overflow (see Positioning behavior: Flowing below a text with automatic height), and the document reports the overflow.
>
> An exception is a text in a group or table row with a fixed height: there the strip ends at the edge of the group or row, and the PDF also cuts off at that edge; the message and the tooltip of the strip then say that the rest is missing. Likewise, the PDF cuts off at the fixed height of a cell. All the places where the PDF cuts off are described under Position, size, rotation and arrangement: Where the PDF really cuts off. If a text should grow with its content, leave “Automatic height” switched on and limit it with the “Max. height” if needed.

[Image: Two excerpts side by side, on the left with the heading “Draft”, on the right “PDF”. On the left a text box with a light blue background and a blue border that is only about two lines tall: of the sentence “Zahlbar innerhalb von 14 Tagen ohne Abzug. Bei Zahlung innerhalb von 8 Tagen …” two lines can be seen, the third is cut off at the bottom edge. Directly below the box lies a light orange hatched strip, below it in a dashed frame “Mit freundlichen Grüßen”. On the right the same text in full in four lines up to “… unser Eigentum.”; background and border reach to the last line, and “Mit freundlichen Grüßen” stands clearly lower than on the canvas.]
Caption: The same text with a fixed height: the canvas cuts it off, the PDF prints everything.
- Image marker 1: On the canvas, the box ends at the entered height, the rest of the text is cut off.
- Image marker 2: The hatched strip shows how much text no longer fits in the box.
- Image marker 3: In the PDF, the whole text is printed; background and border become as tall as the text.
- Image marker 4: The object below it with “Flowing” moves down in the PDF by the overflow.

#### Min. height and max. height

“Min. height” and “Max. height” are in the collapsed area “Advanced (limits)” and appear only as long as “Automatic height (fit to content)” is switched on. Millimeters are meant, counted including inner margins.

- **Min. height:** The text box is at least this tall, even if the text is shorter. Border and background reach that far on the canvas as in the PDF.
- **Max. height:** The text box never gets taller. What does not fit, the canvas and the PDF cut off; border and background end at the max. height. The canvas shows no strip in this case; the document reports when it is created how much room was missing.
- An empty field or 0 removes the limit. If the min. height is greater than the max. height, the min. height applies.
- If you switch off “Automatic height”, both fields disappear. Their numbers stay saved but take effect again only when you set the check mark. A text with a fixed height is therefore never cut off at the max. height.

#### Also applies here: inner margins, border, position, behavior and visibility

Other objects also have these settings, and each is explained on a page of its own. The table names the default for the text, says briefly what is different for the text, and refers to the explanation.

| Setting | Default here | Explained in |
|---|---|---|
| “Inner margins (mm)” with “Top”, “Bottom”, “Left” and “Right” | empty (0) | Border, background and colors: Inner margins |
| “Border & background” with “Background”, “Turn on border”, “Border color”, “Border thickness (pt)”, “Border lines (sides)” and “Corner radius (mm)” | no background and no border | Border, background and colors: Border and background and Border, background and colors: Color field and color picker; how tall background and border become in the PDF is described under Width and height |
| “Turn visibility rules on/off” (ⓘ) and “↳ Edit rule” | always visible | Visibility |
| “X (mm)” and “Y (mm)” | the position at creation | Position, size, rotation and arrangement: Position and size |
| “Behavior” under “Positioning behavior” (ⓘ) | “Flowing on contact”, also in a group; a field that you drag onto a group or into a table cell, on the other hand, begins with “Fixed position (default)” (see Dragging a field onto the sheet) | Positioning behavior and Positioning behavior: What a new object starts with; for an object below a text with automatic height Positioning behavior: Flowing below a text with automatic height |
| “Move along” (ⓘ) with the check mark “Move along with the object below” | on; only for a text directly on the sheet | Positioning behavior: Move along |
| “Minimum gap above (mm)” (ⓘ) | empty | Positioning behavior: Minimum gap above and Positioning behavior: Which gap applies where |
| “Keep together at page break” (ⓘ) | on; only for a text directly on the sheet, in a group you set it on the group | At the page edge: The checkbox “Keep together at page break”; for long texts At the page edge: Recipe: a long text across several pages |
| “Arrangement” with the layer order | 0 | Position, size, rotation and arrangement: Arrangement: layer order and sequence |
| “Order in the group” | the place at creation; only in a group or cell with at least two objects | Position, size, rotation and arrangement: Order in the group |

#### Taking out and deleting

“⬆ Take out of group” (only in a group, not in a table cell) takes the text up one level; from a group directly on the sheet, it becomes an object of its own just below the group (see Groups: Moving objects in and out). You delete with “🗑 Delete block” directly on the sheet (with a confirmation prompt) or “🗑 Delete element” in a group or cell (without a prompt); see Working on the canvas: Copying, pasting and deleting, where copying and pasting are also described.

#### Several texts selected, text in a grid cell

- **Several texts:** You select several objects with Ctrl+click (see Working on the canvas: Several objects at once). Background and border of a text do not exist there; you change them on each text individually.
- **Grid cell:** Older templates can still contain a grid (see Free-form tables). For a grid cell, the “Properties” window does not show the settings of a text but only the preview “(empty – click to edit)”, the button “✎ Edit text”, the color box “Cell background” and a note about merging. Line spacing, inner margins, border, size and positioning behavior are missing. The “Edit text” window opens there without paper; you also switch the basic style of the whole text there with B, I or U when everything is selected. If the section “Text box size” appears there, leave it unchanged (see The “Edit text” window: Text box size).

### How fields are printed

How a field is printed depends on its type: text, number, monetary amount, date, date with time, yes/no or custom variable. Which type is printed how and where you set it is shown by the table under Numbers, currency and dates: How fields are printed. For a single number with its own decimal places or its own symbol, see Numbers, currency and dates: Decimal places and symbol for a single field, for the format of a single date field Numbers, currency and dates: The date format of a single field.

### Dynamic text

A dynamic text is a spot in the text that reads differently depending on the data: a default and any number of “Except when …” cases. The default is printed unless the first matching rule applies. Empty content means: show nothing at this spot. If the whole text should change instead of one spot, use content depending on a condition.

1. In the “Edit text” window, select the word, the spot or the marker that should change, and click “◑ Dynamic text”.
   → The spot becomes a green pill, labeled with its first 20 characters, and the “Dynamic text” window opens. The previous content is the default.
2. Click “Except when” and build the condition, for example “Land is DE”.
3. Under “→ then show:”, click into the field and write in the large editor what should appear in this case; there you confirm with “Apply”.
4. Click “Save” and then, in the “Edit text” window, “Apply”.

If nothing is selected or a pill is selected, the designer reports “Please select some text or a variable first.”. The button also exists in the branch of a dynamic text; dynamic texts can therefore be nested.

[Image: The “Dynamic text” window. At the top the title and the line “Shows the default — unless a rule applies (the first matching rule wins). Empty content = show nothing.” Below it a card “Default” with the text “30 Tage”. Next a card “Except when …” with the buttons ▲, ▼ and wastebasket at the top right and the condition builder: the choice “AND” is pressed, next to it “OR” and an ⓘ; below it a condition with the field “Rechnung › Kunde › Land”, the comparison “is” and the value “Deutschland”, then the buttons “Condition” and “Subgroup” and the line “→ then show:” with the text “14 Tage”. Below the card the button “Except when”, a gray-backed field “Result with the current sample data: 14 Tage” and the footer with “Remove dynamic behavior” on the left as well as “Cancel” and the blue button “Save” on the right.]
Caption: A dynamic text with a default and one “Except when” rule.
- Image marker 1: The default: it applies if no rule applies.
- Image marker 2: Change the order or remove the rule.
- Image marker 3: A rule with a condition; the first matching rule wins.
- Image marker 4: What is printed in this case; a click opens the large editor.
- Image marker 5: The result with the sample record.
- Image marker 6: Writes default and rules into the pill; it is in the template only after “Apply”.

| Part of the window | What it does |
|---|---|
| Title “Dynamic text” | Below it is “Shows the default — unless a rule applies (the first matching rule wins). Empty content = show nothing.”. The window is centered. |
| Card “Default” | Shows the default text in at most three lines; if empty, it says “(empty – show nothing here) · click to edit”. A click (mouse pointer: “Click to edit in the large editor”) opens it in the large editor with the bar “Dynamic text — Default”; the “Dynamic text” window is hidden for as long as it is open. |
| Card “Except when …” with “▲” “▼” “🗑” | A rule from the condition builder with AND and OR (see Conditions: The builder) and the line “→ then show:” with a preview that opens the large editor on click. The bar above it is then called, for example, “Dynamic text — Except when Land = DE”, without a condition “Except when … (no condition yet)”. ▲ and ▼ change the order; the first matching rule wins. 🗑 (“Remove rule”) deletes the rule. A rule without a condition is dropped when saving. In a cell of a data table, different fields apply for the condition (see Conditions in a table cell). |
| “Except when” | Adds an empty rule. |
| “Result with the current sample data:” | Shows what would appear at this spot with the sample record, or “(nothing – hidden at this spot)”. Rules without a condition do not count in this. |
| “Remove dynamic behavior” | Dissolves the pill (“Turns the pill back into plain text; the default text stays”); the default text stays in the text. |
| “Cancel” | Closes the window. If there are changes, the designer asks “Discard the changes to the dynamic text?” (window “Changes not applied”, button “Discard”). A click next to it and Esc work the same way. |
| “Save” | Writes default and rules into the pill. If you have not renamed the pill yourself, it gets a new label from the default (up to 20 characters, longer ones are shortened with “…”; if the default is empty, from the first rule, otherwise “dynamic”). Everything is in the template only after “Apply” in the “Edit text” window. |

The footer with “Remove dynamic behavior”, “Cancel” and “Save” stays at the bottom when scrolling. You open an existing pill again by double-clicking or with “◑ Edit dynamic text”; a single click selects it and starts renaming its label (see The “Edit text” window: Markers in the text). Only the matching branch is printed, never the label. On the canvas, the pill appears unevaluated; what is printed is shown only by the line “Result with the current sample data:” and the full preview.

### Content depending on a condition

If a whole text should read differently depending on the data, for example “Zahlbar bis …” or “Bereits bezahlt”, you give it versions. The first version whose condition is met is printed. If none is met, the text stays empty; there is no fallback to the old text.

1. Select the text and, on the right in the properties, click “Conditional content …”.
   → The previous text becomes version 1 without a condition, and the window “Conditional content — which version?” opens.
2. For version 1, click the row “▸ Otherwise — always applies” and choose field, comparison and value.
   → The row shows the condition as a sentence, for example “if Land = DE”.
3. Click “Add version” and give the new version a condition, or leave the last version without a condition. Close with “✓ Done”.
4. Open the window again (double-click the text) and, for a version, click “✎”. Write its text. With “◂ previous” and “next ▸” you switch to the neighboring version, “⚙ Manage versions …” takes you back to the versions window.
   → After “Apply”, you are back on the canvas. On the right it says “2 versions — the first one whose condition is met is printed.”; the canvas shows the version that matches the sample record.

> **Good to know:** A version without a condition always applies. If it is not at the end, the versions below it are never printed. So give version 1 a condition, or move it to the end with ▼.

[Image: The window “Conditional content — which version?” with the note “The FIRST version whose condition is met is printed. The name is just for you — it does not appear anywhere in the document.” Below it two cards. Version 1 carries the number “1.”, the name field “Ausland”, a wide row “▾ if Kunde › Land ≠ Deutschland” and, on the right, the blue pencil button as well as the buttons ▲ (grayed out), ▼ and ✕; below it the text line “Please transfer the invoice amount within 14 days.” and the expanded builder with the field “Kunde › Land”, the comparison “≠” and the value “Deutschland”. Version 2 is called “Inland”, shows “▸ Otherwise — always applies” and the text line “Bitte überweisen Sie den Betrag innerhalb von 14 Tagen.” At the bottom the footer with “Add version”, “Turn off conditional content” and the wide blue button “✓ Done”.]
Caption: Two versions of a text: the first one whose condition is met is printed.
- Image marker 1: The name of the version: for the overview only, it is not printed.
- Image marker 2: The condition as a sentence; a click expands it.
- Image marker 3: Field, comparison and value of the condition.
- Image marker 4: The pencil opens the text of this version in the “Edit text” window.
- Image marker 5: Change the order or remove the version.
- Image marker 6: The footer: add a version, switch off versions or close the window.

The window also opens by double-clicking a text with versions, with “✎ Edit versions …” in the properties and with “⚙ Manage versions …” in the editor. At the top it says “The FIRST version whose condition is met is printed. The name is just for you — it does not appear anywhere in the document.”. The window can be resized by dragging. For each version there is:

| Setting | What it does | Default |
|---|---|---|
| Number and field “Name (optional)” | A name for the overview only (“A name for this version — for the overview only, it is not printed.”). Without a name, the condition appears as a sentence in lists and bars. | empty |
| Condition as a sentence with “▸” or “▾” | For example “if Kundenland = DE”, “if … is set”, “if … is empty” or “Otherwise — always applies”. A click (“Condition of this version — click to change”) expands and collapses the condition. | collapsed |
| Field list | The first entry “(always · otherwise)” means: no condition. Below it are the fields of the sources and their lookups; lists and custom variables do not exist here. A field that the list does not know appears as “… (not in the field list)” and is not lost. | (always · otherwise) |
| Comparison | “is set”, “is empty / no”, “is =”, “≠”, “>”, “<”, “≥”, “≤”. Appears only once a field is chosen. “is set” and “is empty / no” check like “is filled in” and “is empty” in the condition builder (see Conditions: Text, choice field and lookup); a yes/no field that is not set counts as No for “is empty / no”. For a choice field whose options the designer knows, only “is set”, “is empty / no”, “is =” and “≠” appear, for a multiple choice instead of the last two “contains” and “does not contain”; above it, “by option value” \| “by text” switches as in the builder (see Conditions: Choice fields). | is = |
| Value | What is compared with (placeholder “Value (e.g. Germany, true)”). Only for comparisons that need a value. “true” and “false” count as Yes and No, a number like “1000,5” as a number, everything else as text. Write numbers without a thousands separator: “1.000,50” counts as text and is not compared as a number, “1.000” counts as 1. If the field stays empty, the version has no condition, even if the row above shows “if … = …”; the consequence is in the “Good to know” box further up. For “is empty”, choose the comparison “is empty / no”. For a choice field, choose the value “by option value” among its options (“— Choose a value —”); the comparison is then made via the code, and the condition as a sentence names the label. For a yes/no field, choose “Yes” or “No”. | empty |
| “Without a condition this version always applies — the ones below it will then never be printed.” | Orange warning for a version without a condition that is not the last one, also in the collapsed state. It disappears as soon as the version has a condition. Why the versions below are never printed is described in the “Good to know” box further up. | – |
| “✎” and the text line | Open the text of this version in the “Edit text” window (“Edit the text of this version”, “Click to edit”). The text line shows the text on one line, when empty “(empty – click to edit)”. After “Apply”, you are back on the canvas, not in this window. | – |
| “▲” and “▼” | Change the order (“move up — the higher up, the earlier it is checked”, “move down”). ▲ is disabled for the first version, ▼ for the last. | – |
| “✕” | Removes the version (“Remove this version”). If it is the only version, this ends the conditional content: your text stays as ordinary text, and the window closes. | – |

At the bottom of the window are three buttons:

- “Add version” appends an empty version without a condition at the bottom and expands its condition right away.
- “Turn off conditional content” (“The content of the first version stays as normal text.”) switches the versions off. The text of the first version stays as ordinary text, even if it is empty; the window closes.
- “✓ Done” closes the window; Esc and a click next to it do the same. Names and conditions are already saved while you type.

If you edit the text of a version, above the toolbar (see The “Edit text” window: Layout of the window) is the bar “Conditional content — version N of M: »Name«”, without a name with the condition as a sentence; the mouse pointer shows the full sentence. “◂ previous” and “next ▸” first take over your text and then open the neighboring version; for the first or last version, respectively, they are disabled. “⚙ Manage versions …” (“Conditions, names and order — and from there into any other version.”) also takes over and opens the versions window. If you select everything in one version and switch B, I or U, this applies to the whole text, that is, to all versions (see The “Edit text” window: Bold, italic, underline and the whole text).

The condition of a version is a single comparison, without AND and OR. It has a simple input of its own and not the condition builder of the other places (see Conditions: Where conditions occur). If you need several conditions at once, insert a dynamic text within the text, or hide the text with a visibility rule (see Visibility). If a version carries a condition that this input cannot display, for example from an import or from an AI (`a == 1 || b == 2`, `feld == ''`), it appears in the box “Written by hand — and this is the condition that applies: …” above empty condition parts. It applies unchanged until you fill in the condition parts below it; then these replace it (see Conditions: Checking for empty in a condition written by hand).

If the text is in a cell of a data table, the versions are checked against the respective row; however, their field list offers only fields of the document, and a field of the document is not found by the condition in the row. If a text in a cell should differ per row, use a dynamic text with the fields under “Per row · …” (see Conditions in a table cell).

### Limits and pitfalls

- **Fixed height:** The canvas cuts it off, the PDF prints the whole text; see Width and height.
- **Long texts across several pages:** A long text such as general terms and conditions continues over the page edge only if you remove the check mark “Keep together at page break”; the steps are described under At the page edge: Recipe: a long text across several pages. Two exceptions: a text that is taller than a whole sheet is split even with the check mark. And a text that is the first object on its sheet and fits on a whole sheet is not split even without the check mark; it extends over the margin at the bottom (see At the page edge: The first object on a page).
- **Blank lines:** Blank lines at the very beginning of the text can in some cases result in one more line in print than you typed (see The “Edit text” window: Alignment). In a list, Enter makes a new bullet, Shift+Enter only a new line in the same bullet; empty bullets and empty lines at the end of a bullet are printed as the editor shows them.
- **Field values are longer than their names:** The canvas shows names, the PDF the values. A text can thus get more lines and push objects below it. Check such places in the full preview (see Full preview and PDF: The full preview).
- **Fonts:** Only what the font contains is printed. A character that is missing in the printed font appears in the PDF as an empty box; the “Special characters” window marks such characters (see The “Edit text” window: The window “Special characters”). Fonts of your own must be uploaded to Dynamics (see Image library and fonts: Managing fonts and Fonts and images: Providing fonts).
- **Line spacing in the editor:** The “Edit text” window shows it only in part; what counts is the print (see Line spacing).
- **Image field as a marker:** An image field that stands in the text as an ordinary marker prints nothing. You insert an image in the text with “🖼 Image” and “From the data” (see The “Edit text” window: An image in the middle of the text).
- **Fields of a rule on a list** cannot currently be placed in a free text, see The “Edit text” window: Fields of a rule.
- **What the canvas does not evaluate:** dynamic texts (see Dynamic text); what is printed is shown only by the full preview.
- **Links** are clickable in the PDF only if the address begins with http://, https://, mailto: or tel:.

### What changes in the document?

**On the canvas:** Fields appear as blue markers with their name, dynamic texts as green pills without evaluation. A text with versions shows the version that matches the sample record; visibility rules have no effect (see Visibility: What changes in the document?). A text with a fixed height is cut off, and a hatched strip shows the overflow (see Width and height). What the “Edit text” window changes on the canvas is described under The “Edit text” window: What changes in the document?.

**In the PDF:** Fields appear with their values, in the format of their type and the template settings. Only the matching version and the matching branch are printed; hidden texts are missing. A text with “Automatic height” grows with its content, a text with a fixed height is nevertheless printed in full; where the PDF cuts off is described under Position, size, rotation and arrangement: Where the PDF really cuts off. Objects below it move away according to their positioning behavior. What the “Edit text” window changes in the PDF, for example for links, is described under The “Edit text” window: What changes in the document?.

---

## The “Edit text” window

*For users · Objects · Page en/text-bearbeiten.html*

> **In short:** In the window “Edit text” you write and format the content of a text. You open it with a double-click on the text. The toolbar at the top formats the selected passage or the paragraph: bold, italic, size, font, color, alignment, lists, indents, special characters and links. In the list “Variables — drag or click to insert” on the left side of the window you find the fields from Dynamics; they appear as blue markers in the text, and only the full preview and the PDF show their value. With “∑” you insert a math formula, with “🖼 Image” an image in the middle of the text. “Apply” writes the result into the text, “Cancel” discards it. Dynamic text and content depending on a condition are described under Texts: Dynamic text and Texts: Content depending on a condition.

### Opening and operating the window

In the window “Edit text” you write and format the content. It opens in three ways:

- Double-click on the text, on the page as in a group (a double-click on the group itself opens the group designer instead);
- “✎ Edit text” in the properties;
- Click on the preview of the content in the properties (see Texts: Content).

If the text has versions, the window “Conditional content — which version?” opens first instead, because only one version is printed. A text in a table cell is an ordinary text, as in a group (see Cells, header row and page break: Selecting, filling and emptying cells). The same window also opens for grid cells, for the versions of a text and for the branches of a dynamic text.

#### Layout of the window

- **Header:** the title “Edit text”, “Zoom” with a slider and a number field (40 to 300 %, the field in steps of five), “Cancel” and “Apply”. When the window opens – and when you make the browser window larger or smaller, until you adjust the zoom yourself – it sets itself to fit: the paper fills the width, and the type stays easy to read. Ctrl+mouse wheel over the window changes the zoom in steps of ten.
- **Bar above the toolbar:** only when editing a version (see Texts: Content depending on a condition) or a branch (see Texts: Dynamic text).
- **Toolbar:** see The toolbar.
- **On the left** the list “Variables — drag or click to insert” (see Inserting fields) and below it the text box size. At its right edge you drag the list wider or narrower.
- **In the middle** the paper. It is as wide as the text and shows its font, size, inner margins, alignment and the base style of the text (B, I or U on the entirely selected text, see Bold, italic, underline and the whole text). This way fixed text wraps in the window at the same places as in print. Fields appear here with their name, in the PDF with their value; lines with fields can therefore wrap differently. A text without a width of its own, such as in a grid cell, has no paper.

[Image: The window “Edit text”. In the header at the top left the title, on the right the zoom with a slider and the value 132 %, then “Cancel” and the blue button “Apply”. Below it the toolbar in three rows: in the first, Undo and Redo, the selection “Font (template)”, “Size” with the field 10 and the arrow of the steps, A+ and A−, Bold, Italic, Underline and Strikethrough, Subscript and Superscript; in the second “Color” with nine color swatches, the box “A” for the font color and “ab” for the highlight, “Clear formatting”, four alignment buttons, “List” with an arrow and two indent buttons; in the third “Line spacing: as in the template (1)”, Ω and ∑, “Image”, “Link”, “Dynamic text” and the “?”. On the left the list “Variables — drag or click to insert” with a search field; “Custom variables” with the button “+ New”, “System variables” and the source “Rechnung ★” are collapsed. Below it the section “Text box size” with the width 110, the checked box “Automatic height (fit to content)”, the grayed-out height 12.2 and “Advanced (limits)”. To the right of it the white paper with the text “Rechnung Nr.” and a blue marker “Rechnungsnummer”, the sentence “Vielen Dank für Ihren Auftrag. Zahlbar innerhalb von”, a green pill “30 Tagen”, “ohne Abzug, spätestens bis zum” and a bold blue marker “Fälligkeitsdatum”.]
Caption: The window “Edit text” with its five areas.
- Image marker 1: The header: zoom, “Cancel” and “Apply”.
- Image marker 2: The toolbar with all buttons for formatting.
- Image marker 3: The list of variables: everything that can be put into the text.
- Image marker 4: The text box size: width and height of the text, without leaving the window.
- Image marker 5: The paper: this is where you write. Fields appear as blue markers, dynamic text as a green pill.

The window covers the designer. At the top and left edges you drag it larger or smaller. This is how you write and format a text:

1. Double-click the text.
   → The window opens, and the cursor is at the end of the text.
2. Write. Enter starts a new line, in a list the next item.
3. Select what is to look different and choose it in the toolbar, such as bold or a color.
4. Insert fields: put the cursor at the spot and click the field in the list on the left.
   → The field appears in the text as a blue marker.
5. Click “Apply”.
   → The window closes, and the text appears on the page. The template is stored in Dynamics only with “Save” (see Managing templates: The template row).

A click in the gray area beside or below the paper puts the cursor at the nearest spot in the text; dragging from there selects.

#### Cancel, Apply and Esc

| Button | What it does |
|---|---|
| “Apply” | Writes the text and formats into the text (for a version, into the version). Renamed markers go into the template with their display name, the base style that you switched with B, I or U on the entirely selected text goes into the text itself. Then the window closes, and the page, properties and structure show the new state. In the branch of a dynamic text, “Apply” only returns the text to the window “Dynamic text”; it is saved only with “Apply” in the main window. |
| “Cancel” | Closes the window. If you have changed something (even just the base style of the whole text), the designer first asks “Discard the changed text?” in the window “Please confirm” with “Cancel” and “Discard”; the focus is on “Cancel”, so Enter discards nothing; Esc or a click beside it mean “Cancel” there. “Discard” also reverts renamed markers. A mere click in a marker is not a change; the window then closes without a question. From a branch it goes back to the window “Dynamic text”. |

The Esc key always acts on the topmost thing first:

1. An open small window (formula, special characters, ⓘ help, color picker, date format) closes.
2. If you are currently renaming a marker, only that is canceled.
3. If a selection window is on top (link, image, confirmation, field picker), that window decides.
4. If a dropdown (font color, highlight, font size) or the right-click menu is open, or the focus is in the toolbar, for example after opening a list, in the size field or on the “?”, Esc leads back into the text.
5. Otherwise Esc acts like “Cancel”, with the same confirmation.

#### Text box size

Below the variable list is the section “Text box size” with “Width (mm)”, “Automatic height (fit to content)”, “Height (mm)” and “Advanced (limits)”. The fields are the same as under Texts: Width and height.

- The section appears for a text that has a width. It is missing in the branch of a dynamic text and when editing a version; there you change the dimensions in the properties of the text.
- Changes here apply to the text immediately. “Cancel” does not undo them.
- As things stand, the paper takes over a width changed here only the next time it is opened; open the window again afterward so that the wrapping in the window matches the print again. Likewise, the field “Height (mm)” becomes unlocked or locked here after turning “Automatic height” off or on only after reopening. The easiest way to set the height is therefore in the properties on the right.

#### Keyboard in the editor

| Key | Effect |
|---|---|
| Enter | New line; in a list the next item. A set line spacing carries over into the new line. |
| Shift+Enter | New line; in a list a new line in the same item, without a new bullet |
| Enter on an empty list item | One level back; at the first level the list ends |
| Backspace at the start of a list item | Removes first the list symbol, then the indent |
| Tab, Shift+Tab | Indents or outdents the paragraph by one level, in every paragraph as in Word; the cursor stays in the text. When renaming a marker, Tab accepts the name. |
| Ctrl+B, Ctrl+I, Ctrl+U | Bold, italic, underline, like the buttons B, I, U; if the cursor is in the middle of a word, it applies to the whole word |
| Ctrl+L, Ctrl+E, Ctrl+R, Ctrl+J | Align left, center, align right, justify for the paragraph. A second press resets center, align right and justify to align left. Ctrl+R does not reload the page while the window is open. |
| Ctrl+Space | Like “Clear formatting”: removes the formats from the selection, without a selection from the word at the cursor |
| Ctrl+Shift+>, Ctrl+< | Font one step larger or smaller, like “A+” and “A−”; on an English keyboard “smaller” is Ctrl+Shift+< |
| Ctrl+Shift+L | Bulleted list on or off for the paragraph |
| Ctrl+K | Opens the window for a link, like “🔗 Link” |
| Menu key, Shift+F10 | With a selection or a selected marker, opens the editor menu, see Right-click in the text |
| Ctrl+A | Selects the whole text; B, I or U then switch the whole text, see Bold, italic, underline and the whole text. When renaming a marker, Ctrl+A selects its whole name. |
| Ctrl+Z; Ctrl+Y or Ctrl+Shift+Z | Undo and redo within the window, with a history of its own, like the buttons “↶” and “↷” at the front of the toolbar. When typing, each word is one step: it ends with the space or punctuation mark after it, with Enter, when you put the cursor somewhere else, after 40 characters at the latest or after a pause of 1.5 seconds. Every formatting, list and insertion step is one step, and so is one pass in the color picker and one choice in the color dropdown. |
| Ctrl+C, Ctrl+X, Ctrl+V | Copy, cut, paste, see Copying, pasting and dragging in the editor |
| Del, Backspace | Deletes a selected marker as a whole; see Markers in the text |
| Esc | Closes the topmost window, see Cancel, Apply and Esc |
| Ctrl+mouse wheel | Zoom of the window; if a selection window is over it, the browser zooms |
| Ctrl+P, Ctrl+S, Ctrl+D, Ctrl+F, Ctrl+G, Ctrl+H, Ctrl+O, Ctrl+Shift+R | Blocked in the window; otherwise they would make the browser print, save, search or reload the page |

The keyboard shortcuts outside the window are explained under Keyboard shortcuts: The keys at a glance.

#### Copying, pasting and dragging in the editor

- When copying, the designer reports “… copied – paste with Ctrl+V.”. What you copied in the editor keeps markers, pills, images and formats when pasted.
- Text from other programs arrives as plain text, without formats; tabs and multiple spaces remain visibly preserved.
- The editor does not accept an image from the clipboard; it refers you to “🖼 Image”.
- If pasted text leaves the table row it comes from, the assignment window asks (see Data sources and relationships: Assigning fields).
- If you paste a link into a link, the inner one is dissolved; the designer reports it.
- You drag a field from the list to any spot on the paper; a marker is created there. A selected passage in the editor can be moved, with markers and formats going along.
- The following are rejected with a message: dropping on the name of another marker (“… while renaming it — drop the text next to it.”), a file or an image (with a reference to “🖼 Image”) as well as tools, tables and rules (“This cannot be dragged into the text. Drag tools, tables and rules onto the page — outside the text editor.”).

#### Right-click in the text

A right-click on selected text or on a marker opens the editor menu. Without a selection the browser’s menu with its spelling suggestions stays; a web page cannot take the suggestions over into a menu of its own.

- **Always:** “Cut”, “Copy” and “Paste” (Ctrl+X, Ctrl+C, Ctrl+V); “Bold”, “Italic”, “Underline” and “Strikethrough”, with a checkmark when it applies at the spot; “Font color” and “Highlight” with the colors of the dropdown, “Font size” with the steps; “Clear formatting”, “Link …” and “Insert variable …”, which opens the field picker and puts the field at the place of the selection.
- **On a marker additionally:** “Replace variable …” (another field at the same spot, the formats stay), “Rename”, for a date “Date format …”, for a green pill “Edit dynamic text …” and “Go to variable”: for a custom variable it opens its window, otherwise the variable list on the right searches for the field. Inserting is called “Insert variable before …” on a marker.
- “Paste” in the menu reads the clipboard through the browser. If it does not allow that, the designer reports “The browser does not allow pasting from the menu here — please press Ctrl+V.”
- The menu key and Shift+F10 open the same menu at the selection. Esc or a click beside it closes it; the cursor is then back in the text.

### The toolbar

The toolbar is at the top of the window “Edit text”. Its buttons act on the selected passage; alignment, list, indent and line spacing act on the whole paragraph in which the cursor is. If nothing is selected and the cursor is in the middle of a word, bold, italic, underline, strikethrough, superscript and subscript, color, highlight, size, font and “Clear formatting” act on the whole word, as in Word; the cursor stays where it is. At a word boundary they apply to what you type next, even several together; a click at another spot or an arrow, Home, End or Page key discards this pending state. If a marker is selected, bold, italic, underline, strikethrough, size, font, color and highlight act on the whole marker. If markers are inside a selection, bold, italic, underline and strikethrough switch them too. The buttons are in fixed groups in the order of Word: “↶” “↷”, font and size, B I U S, x₂ x², color and highlight, “Clear formatting”, alignment, list and indent, line spacing, the buttons for inserting (Ω, ∑, 🖼 Image, 🔗 Link) and “◑ Dynamic text”; in a narrow window the bar wraps between the groups. The “?” at the end shows all explanations of the bar and the keyboard shortcuts in one window. The mouse pointer on a button names its keyboard shortcut.

[Image: The toolbar of the window “Edit text” in a narrow window, in three rows. First row: the gray buttons Undo and Redo, the font list “Font (template)”, the label “Size” with the input field “9” and an arrow, the buttons A+ and A−, the buttons B, I, U and S, then Subscript and Superscript. Second row: the label “Color” with nine color swatches directly next to each other, the box “A” with a small arrow for the font color and the box “ab” with a small arrow for the highlight, the button “Clear formatting”, four alignment buttons (the left-aligned one is pressed), “• List” with an arrow and the two indent buttons. Third row: the selection “Line spacing: as in the template (1)”, Ω, ∑, “Image”, “Link”, “Dynamic text” and at the end a round question mark.]
Caption: The toolbar in a narrow window: it wraps between its groups.
- Image marker 1: Undo and redo.
- Image marker 2: Font and size: a field for any number, the arrow with the steps, A+ and A−.
- Image marker 3: Bold, italic, underline, strikethrough; subscript and superscript.
- Image marker 4: The color: nine color swatches, the font color “A” and the highlight “ab”; both boxes open a dropdown below them.
- Image marker 5: The paragraph: alignment, list and indent; the line spacing is in the row below.
- Image marker 6: Insert and dynamic text; the “?” shows all explanations and keyboard shortcuts.

| Button | Tooltip | Effect |
|---|---|---|
| “↶” “↷” | “Undo (Ctrl+Z)”, “Redo (Ctrl+Y)” | Undoes the last step in the window or restores it. Gray if there is nothing to undo or redo. |
| “B” “I” “U” “S” | “Bold (Ctrl+B)”, “Italic (Ctrl+I)”, “Underline (Ctrl+U)”, “Strikethrough” | Bold, italic, underline or strikethrough for the selected passage, with the cursor in the middle of a word for the whole word. If the whole text is selected, B, I and U switch the base style of the text. When pressed, the button shows what applies at the cursor. See Bold, italic, underline and the whole text. |
| “x₂” “x²” | “Subscript (H₂O) — for units and footnotes. This is not for formulas with fractions.”, “Superscript (m²) — for units and footnotes. This is not for formulas with fractions.” | Sets the selected passage low or high, for example for H₂O, m² or a footnote number. |
| “Ω” | “Insert special character — math, Greek, arrows, currency, fractions …” | Opens the window Special characters. |
| “∑” | “Insert a math formula (LaTeX) — fractions, roots, sums, matrices …” | Opens the window “Formula”, see Math formulas. |
| “Size” with input field and arrow “▾” | Field: “Font size in pt — type any number (also 10.5) and press Enter; the list next to it has the steps”; arrow: “Font size of the selected text — the list shows what applies at the cursor. Empty: the selection contains different sizes, or the size does not come from the text itself (for example from a table column).” | Font size from 1 to 400 pt, typed freely or from the steps 8 to 72 pt. See Size, font and line spacing. |
| “A+” “A−” | “Larger font (Ctrl+Shift+>)”, “Smaller font (Ctrl+Shift+<)” | One step larger or smaller. |
| Font list with the first entry “Font (template)” | “Font of the selected text — you can upload more fonts in the template settings (»Manage fonts«).” | Font of the selected passage. |
| List “Line spacing” | “As in Word: the spacing belongs to the PARAGRAPH. Just placing the cursor in it is enough — the whole paragraph changes, including its automatic line breaks. A selection across several paragraphs changes all of them. Enter: the new paragraph inherits it. »Line spacing« goes back to the value of the text object.” | Line spacing of the paragraph. |
| “Color” with nine color swatches and the box “A ▾” | Color swatches: name and code, such as “Red · #C0392B”; box: “Choose a color — fixed or from a variable” | Font color of the selected passage; the box opens the colors. See Color. |
| Box “ab ▾” (highlight) after the color box | “Highlight — color behind the selected text” | Puts a colored background behind the selected passage, like a highlighter; the box opens the highlight colors. See Highlight. |
| “Clear formatting” | “Clear formatting (Ctrl+Space) — without a selection for the word at the cursor” | Removes the formatting from the selection and unlinks colors that are bound to a variable; markers in the selection lose their formats as well. Without a selection it applies to the word at the cursor; at a word boundary you then keep typing without bold, italic, underline and strikethrough and without superscript or subscript. For a selected marker it removes its own formats; a pill keeps its green display color. |
| four alignment buttons | “Align left (Ctrl+L)”, “Center (Ctrl+E)”, “Align right (Ctrl+R)”, “Justify (Ctrl+J)” | Aligns the paragraph; a second click resets to align left. See Alignment. |
| “◑ Dynamic text” | “Make the selected text or variable dynamic (a default plus rules depending on the data)” | Turns the selected passage into a text that changes depending on the data. See Texts: Dynamic text. |
| “🖼 Image” | “Insert an image in the middle of the text — it flows along with the text. You will be asked for its size and position; to change an image later, double-click it.” | Puts an image at the cursor, stored as a fixed image or from the data. After that the window “Image in text” asks for dimensions and position. Everything else is under An image in the middle of the text. |
| “• List” with the arrow “▾” | Button: “List on/off (Ctrl+Shift+L) — applies to the paragraph with the cursor or to all selected paragraphs. …”; arrow: “Choose symbol” | Bulleted or numbered list. See Lists and indent. |
| “⇥” “⇤” | “Increase indent (Tab) — one level is … mm, at most 5 levels”, “Decrease indent (Shift+Tab)” | Indents or outdents the paragraph by one level, even without a list symbol. |
| “📅 Format” | “Change the date format of this field (click the date chip, then here)” | Appears only if a date marker is selected. Opens the window for the date format of this one field. See Numbers, currency and dates: The date format of a single field. |
| “🔗 Link” | “Insert a link (Ctrl+K): display name and address, both can also come from a field. If text is selected, the display name is already filled in; if the cursor is in a link, the button edits it — including a way to remove it again.” | See Links. |
| “◑ Edit dynamic text” | “Open the rules of this dynamic text (double-clicking the pill does the same)” | Appears only if a green pill is selected, and opens its window “Dynamic text”. |
| “?” at the end of the bar | “Help for this window: all buttons and keyboard shortcuts” | Opens a window with the keyboard shortcuts, font color and highlight, and the explanations for superscript and subscript, special characters, formula, alignment, list, indent, image in text and link. “✕ Close”, Esc or a click beside it lead back into the text. |

#### Bold, italic, underline and the whole text

- **B, I, U** act on the selected passage; if a marker is selected, on the whole marker. If markers are inside the selection, they switch along, as in Word: if everything is already set that way, the click turns it off, otherwise on. If the cursor is in the middle of a word and nothing is selected, it applies to the whole word. When pressed, they show what applies at the cursor, over a selection with markers whether everything is set that way, and also the base style of the text. The formatting is printed exactly like this.
- **The whole text:** If you select everything (Ctrl+A, for a single-line text also with a triple-click), B, I and U switch the base style of the whole text object, such as a heading; whatever in the text itself was already bold, italic or underlined, or reverted from it, is adjusted in the process. You see it on the paper immediately; it is saved only with “Apply”, and “Cancel” leaves the template untouched. Every click is a separate step for Ctrl+Z. This applies when you edit a text (also in a grid cell) or a version of it. The base style belongs to the whole text object: in a version it applies to all versions of the text, not just the open one, and the designer reports “Bold, italic and underline for the whole text apply to all versions of this text, not just this one.”. In the branch of a dynamic text, B, I and U switch the selected passage; the paper nevertheless shows the base style of the text there. Strikethrough has no base style and always applies to the selection.
- **Regular in bold text:** If a text is set up as bold as a whole, such as a heading or table header, or a passage is inside a bold passage, B sets the selected passage to regular, as in Word; a second B makes it bold again. This also applies to a selected marker and to Ctrl+B. Without a selection it applies to what you type next. When pressed, B shows what is printed at the cursor: in the regular passage it is not pressed.
- **Upright in italic text:** If a text is set up as italic as a whole or a passage is inside an italic passage, I sets the selected passage upright, as in Word; a second I makes it italic again. This also applies to a selected marker and to Ctrl+I. Without a selection it applies to what you type next. When pressed, I shows what is printed at the cursor: in the upright passage it is not pressed.
- **What cannot be undone:** If a text is set up as underlined as a whole, an individual passage in it cannot be set back to no underline; it would still be printed underlined. The designer then reports: “This text is underlined as a whole (for example as a heading or table header). For the whole text, select everything (Ctrl+A) and switch it with »U« above; individual passages in it cannot be reverted — they would still be printed underlined.” In a branch the sentence reads: “In a branch of a dynamic text this cannot be switched, only in the main editor (select everything there, then U) …”. The same applies to Ctrl+U.
- **Strikethrough:** “S” strikes through the selected passage; a second “S” removes the line again. Underline and strikethrough work together. Over a superscript the line runs straight through, at the height of the text next to it; if only the superscript is selected, it strikes it through in its own middle. A colored word gets the line in its color. If a marker is selected, the whole marker is struck through. In the editor, on the canvas and in the PDF the line is at the same place. Exception: if the struck-through passage contains a subscript (as in H₂O) or a word in a different font size, the line there is slightly higher or lower in the editor and on the canvas than in the PDF.
- **Superscript and subscript** (x² and x₂) reduce the characters to 65 % and raise or lower them; the line does not become taller as a result. A second click on the same button reverts it; when pressed, the button shows that the selection or the spot at the cursor is superscript or subscript. In the editor, on the canvas and in the PDF it looks the same. A chosen font size applies to the text, and 65 % of it is displayed. It does not work for a whole marker; the designer reports “Superscript and subscript apply to selected text, not to a whole variable.”. Fractions, roots and multi-line expressions are set with “∑”, see Math formulas.

#### Size, font and line spacing

- **“Size”:** In the field you type any size between 1 and 400 pt, also with a decimal comma such as 10.5 pt, and confirm with Enter or Tab; afterward the cursor is back in the text. While you type in the field, a blue highlight shows which passage gets the size. Esc discards the entry; for a number outside the range the designer reports “Please enter a font size between 1 and 400 pt, for example 10.5.”. The arrow “▾” next to it opens the steps: 8, 9, 10, 10.5, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48 and 72 pt. “A+” and “A−” (Ctrl+Shift+> and Ctrl+<) go one step further, above 72 pt in tens. Field and list show the size at the cursor, without a size of its own that of the text, otherwise 10 pt; a size that the list does not know is appended to it. They stay empty if the selection contains different sizes or the size does not come from the text itself, for example from a table column; “A+” and “A−” then start from the size at the beginning of the selection. A size with a decimal comma looks the same in the editor, on the canvas and in the PDF.
- **Font list:** The first entry “Font (template)” removes a font set there from the selection; then the default font applies. Below it are the fonts of your environment, each in its own typeface; in Dynamics always including “Arimo”, even if no font has been uploaded. If the list is empty, for example outside Dynamics or if the font list could not be loaded, “more fonts in the template settings” appears there in gray and not selectable. You upload fonts under Image library and fonts: Managing fonts. The font that is set at the cursor is displayed. Without a font of its own, “Font (template)” appears there, even if an older template gave the whole text object a different font.
- **List “Line spacing”:** The first entry names what applies and where it comes from: “Line spacing: as in the text object (…)”, “… as in the table (…)” or “… as in the template (…)”. If you choose it, this value applies again. Below it are “Line spacing 1 — single”, “Line spacing 1.15”, “Line spacing 1.25”, “Line spacing 1.5 — one and a half”, “Line spacing 1.75”, “Line spacing 2 — double”, “Line spacing 2.5” and “Line spacing 3”. As in Word, the spacing belongs to the paragraph: if the cursor is in it, the whole paragraph changes including its automatic line breaks; for a selection across several paragraphs all of them; after Enter the new paragraph inherits the spacing. Afterward the cursor is back in the text. In the PDF the spacing at the end of each line applies to it. How the spacing relates to the field in the properties is explained under Texts: Line spacing.

#### Color

The nine color swatches color the selected passage with one click: Anthracite #222222, Midnight blue #16234B, Blue #2B4CC4, Violet #6B3FA0, Red #C0392B, Green #2E7D32, Ocher #B7791F, Gray #777777 and White #FFFFFF; the mouse pointer names the name and code. The box with the “A” next to them shows the color at the cursor and opens the colors below it: at the top “No color (like the object)”, below it “Recently used” (up to four, this browser remembers them), the “House colors” and the “Standard colors”, each with name and code in the mouse pointer. If you move the mouse over a color, you see it on the selected passage without anything changing; it is applied with a click or with Enter, the arrow keys choose a color. Esc or a click beside it closes without a change, and the cursor stays in the text. “More colors / color code …” opens the color picker, with a fixed color or a color from a variable. The color field is described in Border, background and colors: Color field and color picker, all buttons of the color picker in Border, background and colors: The window “Choose a color”. A whole pass in the color picker is a single step for Ctrl+Z, as is a choice in the dropdown.

#### Highlight

The box “Highlight” (“ab”) after the color box puts a colored background behind the selected passage. It opens the highlight colors: “No highlight”, the recently used ones and ten light colors (Light yellow, Yellow, Light green, Mint green, Turquoise, Light blue, Pink, Apricot, Lilac, Light gray); preview, Enter and Esc as for the font color. “More colors / color code …” opens the same color picker as for the text color, with a fixed color or a color from a variable; if there is no highlight at the spot yet, a light yellow appears there. “No highlight” or “No color” in the color picker removes the highlight again, as does “Clear formatting”. The area extends from the ascender to the descender of the font, also across several lines and across the stretched spaces in justified text; a superscript character in it does not change it. A selected marker gets the highlight as a whole. In the editor, on the canvas and in the PDF the area looks the same. A marker in a highlighted passage shows no background of its own in the editor and on the canvas, the highlight shows through, with a dashed border around the marker; its value is printed on the highlight.

#### Alignment

The four buttons align the paragraph in which the cursor is, or all selected paragraphs; markers and pills move along. The button that applies at the cursor is pressed, without a setting of its own that of the text. A second click on “Center”, “Align right” or “Justify” resets the paragraph to align left, as in Word; the shortcuts are Ctrl+L, Ctrl+E, Ctrl+R and Ctrl+J. If several paragraphs are selected, a button is pressed only if all are set that way; only then does the click reset them; if they differ, it aligns all of them. Alignment exists only here, not in the properties.

- “Justify” stretches all lines of a paragraph to the full width, except the last; a paragraph of only one line stays as it is. Stretching happens only between words and at a tab, on the canvas as in the PDF, also in table and grid cells and in the column header; a word of which only a part is bold, colored or superscript gets no gap. A non-breaking space is stretched along, but the line never wraps there.
- “Align left” is stored explicitly and overrides an alignment that an older template carries on the whole text.
- If you press Enter at the very top of the text before an aligned paragraph, the document usually prints exactly this empty line. In some cases it prints one more empty line there than you typed: in texts that were saved with an older version of the designer, before a bulleted list, with two or more empty lines at the beginning and when the paragraph begins with a marker, a dynamic text, an image or a formula. Check such texts in the full preview.

#### Lists and indent

The left part of “• List” turns the list on or off for the paragraph with the cursor or all selected paragraphs, with the symbol chosen last. The arrow “▾” opens the choice: under “Bulleted list” •, – and ▪, under “Numbered list” 1., a) and i. A choice sets the symbol immediately; the button then shows it in its label, such as “1. List”, and is pressed as long as the cursor is in a list. A click outside closes the choice.

[Image: The paper of the window “Edit text” with a multi-level numbered list. The numbers are on the left, each deeper level is indented further: “1. Angebot prüfen”, “2. Freigabe einholen”, indented “2.1 durch die Teamleitung” and “2.2 durch die Geschäftsführung”, indented even further “2.2.1 bei Beträgen über 10.000 €” and back at the first level “3. Angebot versenden”.]
Caption: A list with three levels: the designer counts the numbers itself.
- Image marker 1: You do not type the number in front of “Freigabe einholen” yourself; the designer counts.
- Image marker 2: A deeper level counts “2.1”, “2.2”, another one “2.2.1”.

- You do not type the number yourself; the designer counts it, even if you insert or delete an item in the middle. Counting runs across consecutive paragraphs of the same level; a paragraph without a list symbol in between starts again at 1. A deeper level under “2.” counts “2.1”, “2.2”, one level deeper “2.2.1”, as long as the levels above are numbers as well.
- Symbol and number appear in the font, size and color of the paragraph, 2 mm before the text; formatting on individual words does not change them. If an item wraps, the next line begins flush under the text.
- “⇥” and “⇤” indent or outdent by one level, at most 5 levels. One level is as wide as “Indent per bullet level (mm)” in the Template settings: Font (default 5 mm). The indent also works without a symbol and makes the lines narrower; the paragraph then wraps earlier, on the canvas as in the PDF. Tab and Shift+Tab do the same, in every paragraph.
- The keys in lists (Enter, Shift+Enter, Backspace, Tab) are explained under Keyboard in the editor. The document prints empty lines at the end of an item and empty items the way the editor shows them; an empty item counts in the numbering.

#### The window “Special characters”

“Ω” remembers the cursor position and opens the window “Special characters” with 407 characters in 16 groups: Math, Comparison, Sets and logic, Greek lowercase, Greek uppercase, Arrows, Superscript, Subscript, Fractions, Currency, Units and technical symbols, Punctuation and dashes, Quotation marks and brackets, Boxes and marks, Letter variants and Spaces.

[Image: The window “Special characters”. In the header the title, a search field with the entry “pfeil” and the button “Close”. Below it the group heading “Arrows” and a grid of square buttons in two rows, each with an arrow character in different directions and shapes. At the very bottom the footer “32 characters · One click puts the character at the cursor.”]
Caption: The window “Special characters” with a search for “pfeil”.
- Image marker 1: The search field: you search by name or group name or type the character itself.
- Image marker 2: The characters are arranged in groups.
- Image marker 3: The grid of characters: a click puts the character at the cursor; the window stays open.
- Image marker 4: The footer names the number of characters shown.

- The search field “Search — name or character…” searches the name, the group name or the character itself; you may write umlauts out (“groesser”). Without a match it says “Nothing found. The search covers names and group names — or type the character itself.”
- A click puts the character at the cursor and replaces a selection in the process; the window stays open. The mouse pointer names the name and character code. Spaces appear in the window as ␣.
- Characters that the printed font does not contain are pale and carry a warning sign. On the screen you would see them anyway, in the PDF an empty box would appear at that spot. The font at the cursor counts, otherwise that of the text object and, if it has none of its own, the default font of the template.
- The footer names the number of characters shown, if applicable how many of them the font does not have, and “One click puts the character at the cursor.”. If the font is not loaded on this computer, it says: “(The font is not loaded here — whether a character can really be printed is only shown by the designer in Dynamics.)”
- In the group “Spaces”: after the narrow, the hair, the en, the em and the punctuation space the line may wrap; the non-breaking, the narrow non-breaking and the figure space hold together, for example in “Nr. 12345”.
- A tab, for example from a data field or a pasted text, jumps in print as on the canvas to the next tab stop (every eight space widths of the font). The line may wrap after it, not before it.
- As in the browser, a line also wraps after a question mark, for example in an address such as “shop.de/konto?bestellung=4711”, but not before a punctuation mark, most quotation marks, a slash or a closing bracket. It also wraps after a hyphen before a number if a letter or a digit comes before it (“Kunde-” / “4711”), but not at the start of a word (“-5,00”) or after a punctuation mark.
- “✕ Close”, a click beside it or Esc close the window.

#### Links

“🔗 Link” opens the window “Insert link”; if the cursor is already in a link, it is called “Edit link”. At the top it says: “The display name is the text that appears in the document — the address is behind it. Both may contain placeholders.”

[Image: The small window “Insert link”. At the top the title and the gray sentence “The display name is the text that appears in the document — the address is behind it. Both may contain placeholders.”. Below it the label “Display name” with an input field (“unserer Webseite”) and to the right the button “Field”, then “Address” with the field “https://www.example.com” and likewise a button “Field”. At the bottom right “Cancel” and the blue button “Insert link”.]
Caption: The window “Insert link”: display name and address, both can also come from a field.
- Image marker 1: The text that appears in the document.
- Image marker 2: The button “Field” puts a field or a custom variable at the cursor; the address has the same button.
- Image marker 3: Where the link leads; if “https://” is missing, the designer adds it and reports that.
- Image marker 4: Sets the link; Enter in one of the fields does the same.

| Setting | What it does | Default |
|---|---|---|
| “Display name” with button “Field” | The text that appears in the document. If you leave a pre-filled name, the selection is only wrapped with the link and keeps its formats. If you change it, exactly your new text appears. The button “Field” inserts a data field, a relationship or a custom variable at the cursor position in the field (see Data tree and field picker: The field picker). | the selected text |
| “Address” with button “Field” | Where the link leads. If the entry looks like a web address without its beginning (www.firma.de), the designer adds “https://” and reports it. If http://, https://, mailto: or tel: is missing, it reports that the document gets no clickable area; the text is still printed. Without an address: “Without an address there is no link.” If text is selected, the cursor is here when the window opens. | “https://” |
| “Remove link” | Only in “Edit link”. Removes the link including link color and underline; text and other formatting stay. Message: “Link removed — the text stays, without link color and underline.” | – |
| “✦ Default formatting” | Only in “Edit link”. Makes the link blue again (accent color of the template, otherwise #2B4CC4) and underlined, also an older link without formatting. A link color of its own is overwritten; bold, font and size stay. | – |
| “Cancel”, “Insert link” or “Apply” | Enter in one of the two fields triggers the main button. Without a display name the designer reports “The link needs a display name — otherwise nothing would appear in the document.”. A new link is set blue and underlined; across several lines one link piece with the same address is created per line. Esc and a click beside it cancel. | – |

- If the selection contains an image, a formula, a marker or a dynamic text, an orange line warns beforehand: if you change the display name, it is replaced by your text; if you leave it, everything stays as it is.
- A click on a link in the paper of the editor first opens a small window with the display name and address (fields in it appear with their name) and the buttons “✎ Edit link” (“Change the display name and address”), “↗ Open link” (“Open in a new browser tab”) and “Cancel”. “↗ Open link” is grayed out if the address has none of the four beginnings or contains a field; the mouse pointer says why. A click on a marker, an image or a pill in the link does not open this window.
- In the PDF the clickable area lies exactly over the text, also over an image or a formula in the link. If a field is in the address, its finished value counts: “https://www.firma.de” becomes clickable, “www.firma.de” does not.

### Inserting fields

On the left in the window “Edit text”, under “Variables — drag or click to insert”, is everything you can put into the text. A click on an entry puts it as a marker at the cursor position remembered last, otherwise at the end of the text. If you drag it onto the paper, it lands at the spot where you release. What is created when you drag a field from the data tree onto the page is explained under Data tree and field picker: Clicking and dragging.

1. Put the cursor at the spot where the field is to appear, for example after “Rechnung Nr. ”.
2. Find the field in the list, or type part of the name into the search field “🔍 Search variables…”; matches expand.
3. Click the field.
   → It appears in the text as a blue marker with its name.

> **Tip:** Write fixed words around a field before or after it, for example “Rechnung Nr. ” before the invoice number.

The list is built in this order:

[Image: The left column of the window “Edit text”. At the top the heading “Variables — drag or click to insert” and the search field “Search variables…”. Below it the expanded group “Custom variables” with an @ symbol on the right, a search field for this group only and the six entries @Zahlungsziel, @Netto, @USt, @Brutto, @Zahlungsstatus and @Akzentfarbe, each with a type badge (Date, 123 or Abc) and a pencil; the expanded group “System variables” with its own search field and “Current page”, “Total pages”, “Current date”, “Current time”, “Date & time” and “User”; the expanded source “Rechnung ★” with its own search field, the fields Rechnungsnummer, Rechnungsdatum, Leistungsdatum, Fälligkeitsdatum and Bezahlt, the collapsed relationships “Kunde” (N:1) and “Rechnungspositionen” (1:N) and the collapsed rules “Positionen” and “Kennzahlen” (character ƒ); at the very bottom the collapsed source “Own company (sender)”.]
Caption: The variable list in the window “Edit text”.
- Image marker 1: The search field: matches expand.
- Image marker 2: Custom variables; the button “+ New” creates a new one.
- Image marker 3: System variables such as page number and date.
- Image marker 4: The data source with its fields; the star marks the primary source.
- Image marker 5: Relationships lead to fields of other tables, here “Kunde” with the badge N:1; lists carry the badge 1:N.

- **Search field** “🔍 Search variables…”.
- **“Custom variables”**: each as “@Name” with a symbol for its type. A click or drag inserts it, the button “+ New” creates a new one, ✎ opens one for editing (see Variables: Custom variables in the “Data” area and Variables: Inserting a variable).
- **“System variables”** (mouse pointer: “Values the system fills in automatically — independent of the data source.”): “Current page”, “Total pages”, “Current date”, “Current time”, “Date & time” and “User”. Each entry explains itself in the mouse pointer; what they print is explained under Variables: System variables, the page numbers under Pages, header and footer: Page numbers.
- **“Per row · …”**: only if the text is in a cell of a data table, not in the table header and not in a free-form table. It contains the fields of the row or the calculated fields of its rule; in each row its own value is printed (see Cells, header row and page break: Dragging fields into cells).
- **The data sources** with their fields and relationships, built like the data tree on the left of the designer (see Data tree and field picker: The data tree). A field from a list (1:N) is inserted by the editor in free text as the value of the first row (see Data tree and field picker: What the badges and additions mean, addition “first value”).

If the template has no data source yet, only the custom variables are there, with the note “No data source yet. Click ‘⚙ Manage data sources’ above → set the primary source.”; the heading, search and system variables are then missing.

#### Markers in the text: selecting, renaming, deleting

A marker is a whole piece in the text: a field, a variable, a green pill, an image or a formula. The mouse pointer on a field marker names its name and “Source: …”, for a date also “Format: … · Double-click: change”.

- **A single click** on a field, a variable or a pill selects it and starts renaming; the cursor is at the clicked spot in the name. For a field or a variable the new name is a display name: it applies everywhere in the whole template where the same field appears, and goes into the template only with “Apply”. An empty name or the original one resets it. System variables and custom variables can also be renamed this way. For a pill the name is its label; without a label it is called “dynamisch”. What is printed is never the name, always the value or the matching branch.
- **Keys in the name:** Enter makes a line break in the name; Ctrl+Enter, Tab or a click beside it accept it; Esc cancels; Ctrl+A selects the whole name; Home and End jump within the name. Bold, color and size act on the whole marker while renaming.
- **Double-click:** On a date marker it opens the date format of this field (see Numbers, currency and dates: The date format of a single field), on a pill the window “Dynamic text”, on an image in text the window “Image in text” and on a formula the window “Formula”. On other markers it selects the word under the mouse pointer.
- **Del and Backspace:** If the marker is selected, the key deletes the whole marker; Ctrl+Z brings it back. While renaming it deletes a character in the name. At the beginning (Backspace) or end (Del) of the name, the first press selects the whole name, the second removes the whole marker from the text.
- **Color:** A marker in a colored passage appears in the editor and on the canvas in its color, with a light background in the same color and a dashed border: this way you see how it is printed and still recognize it as a marker. In a passage highlighted with the highlighter it stays blue and has a dashed outline, without a background of its own: the highlight shows through, and its value is printed on the highlight. Outside such passages it stays blue; a selected marker shows its selection as always.
- **Right-click** on a marker selects it and opens the editor menu with format, color, size, “Rename”, “Replace variable …” and “Go to variable”, see Right-click in the text.
- **Only text fits in the name.** A field, a formula, a link or an image cannot be put in there, neither by click nor by button, dragging or pasting; the designer reports, for example, “Only text fits in this name — a formula cannot go there. Click next to the name and then choose »∑« again.”. Pasted plain text lands in the name.

#### Dragging a field onto an existing text

On the canvas, a field that you drag onto a text in a group or table cell is appended to the end of this text, with a space before it. If the text has versions, it goes into the currently valid version, otherwise into the version without a condition, otherwise into the first. An image field does not become an image but a marker that prints nothing; the designer points out that an image in text is created through “🖼 Image” in the editor and there “From the data”.

For a text directly on the page this does not work: the drag goes through the text, and a new text with the field is created at the spot. The existing text stays unchanged. If you want the field in this text, insert it in the window “Edit text”.

#### Fields of a rule

> **Caution:** Fields of a rule that is based on a list cannot currently be put into a free text; what works instead is explained under Rules: Using the result. Fields of a rule on a source show a value only if under “Selection” “Only the first”, “Only the last” or “The one at a specific position” is chosen. Without this selection the spot stays empty in the PDF, even if the rule leaves only one record.

### Math formulas

With “∑” you put a math formula in the middle of the text: fractions, roots, sums, integrals, matrices, Greek letters. For simple units such as m², “x²” is enough.

1. Put the cursor at the spot and click “∑” in the toolbar.
   → The window “Formula” opens with the note “Formulas are written in LaTeX — the standard for scientific formulas.”
2. Write the formula in the input field, for example a^2 + b^2 = c^2, or click formula parts below.
   → On the right under “Preview” you immediately see what it looks like.
3. Click “✓ Insert” or press Ctrl+Enter.
   → The formula appears at the cursor; if something was selected there, it replaces it.

[Image: The window “Formula”. In the header the title with the note “Formulas are written in LaTeX — the standard for scientific formulas.”, on the right “Cancel” and the blue button “Insert”. At the top left an input field with the text x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}, below it the formula parts in groups (“Basics”, “Sums, products, integrals”, “Greek”, “Functions and accents”, “Arrows and logic”, “Multi-line”) as rows of small buttons. On the right under “Preview” the typeset formula in large type: x equals fraction of minus b plus/minus root of b squared minus 4ac over 2a. Below it the dimension line “In the document: 31.15 × 8.39 mm at 10 pt · 16 pieces · Ctrl+Enter applies.”]
Caption: The window “Formula” with the quadratic formula.
- Image marker 1: The formula is written here in LaTeX.
- Image marker 2: Formula parts to click, arranged in groups.
- Image marker 3: The preview immediately shows what the formula looks like.
- Image marker 4: The dimension line names the size in the document.
- Image marker 5: “Insert” puts the formula at the cursor.

| Part of the window | What it does |
|---|---|
| Input field “Enter a formula in LaTeX, e.g. a^2 + b^2 = c^2 (or click a formula part below)” | The formula is here. When empty, the preview shows “Nothing entered yet.”, and “✓ Insert” is locked. If the designer cannot read the entry, an orange line with “… — the preview shows the last readable state.” appears at the top, and the button is locked as well. |
| Formula parts in seven groups | Basics; Sums, products, integrals; Greek; Functions and accents; Arrows and logic; Multi-line; Examples to try out. A click inserts the formula part at the cursor in the input field. The mouse pointer names its name, such as “Fraction” or “Quadratic formula”, its notation and “Click: insert at the cursor”. |
| “Preview” with dimension line | Shows the formula enlarged up to four times and below it its size in the document, such as “In the document: … × … mm at 10 pt …”. |
| “✓ Insert” or “✓ Apply” | Inserts the formula; when changing, it replaces the existing one. If the entry produces no visible formula, the window stays open with the line “This input does not produce a visible formula — nothing was inserted or replaced.”. |
| “✕ Cancel” | Closes without confirmation, as do a click beside it and Esc. |

- A double-click on a formula in the text opens it again for changing.
- The formula is typeset once in the designer and stored as a finished drawing. That is why it appears in the PDF at the same place and in the same size as in the designer.
- It follows the font size and font of the text object, not a font that only a text passage carries. This means the base size of the text object, which the dimension line names (10 pt for a new text). As things stand, a size that you choose in the editor, even with Ctrl+A for the whole text, does not apply to the formula. If the default font of the template changes, open the formula once and apply it again. If the text object carries a different font than the template, the page and window show the characters of the formula in the font of the template; the PDF uses the font of the text object.
- It has the color of the text object, on the page as in the document; in the editor itself it appears black. A color that you give only to a text passage does not color it.
- A line spacing never stretches a formula. If it is alone in its line, the line is exactly as tall as the formula.

### An image in the middle of the text

An image can be in the middle of a text, between two words, like a very wide letter. The text flows around it and wraps before it if the image no longer fits in the line; an image is never split. You give the width and height in millimeters, and they are fixed in the text. This is intentional: only this way do the canvas and print wrap at the same place, without the image having to be loaded beforehand. The image may be a fixed image or come from the data; then each row carries its own image.

[Image: Excerpt of the canvas with a text object in a gray dashed frame. The first line says “Mit freundlichen Grüßen”, followed by a signature slanting to the right in dark blue ink that reads “M. Muster”. It is several times as tall as the letters, and the flourish under the name lies on the baseline. To the right of it is the text “Ihr Team”. The first line is much taller than an ordinary line because of the signature. The second line contains the rest “von Dyn365 Smart Templates” at ordinary line height.]
Caption: A signature in the middle of a sentence. The text runs around the image and wraps after it.
- Image marker 1: The image sits on the baseline like a very wide letter. The line is as tall as the image.
- Image marker 2: The text object: at its right edge the text wraps. An image is never split.

#### Putting an image into the text

1. Double-click the text so that the window “Edit text” opens, and put the cursor at the spot where the image is to be.
   → Without a cursor in the text, it is inserted at the end; a selection is replaced by the image.
2. In the toolbar, click “🖼 Image”.
   → The image choice opens, here always with the question “Where does the image come from?”: “Fixed image” or “From the data”. For an image field the quality question follows (see Images: Where the image comes from).
3. Choose the image.
   → The window “Image in text” opens; for a fixed image the title contains the short name, such as “Image in text: firmenlogo”.
4. Enter width and height, choose the position and click “Insert”.
   → The image is at the cursor. An invisible character is before and after the image so that you can keep writing before and after it.

#### The button “🖼 Image”

The button is in the toolbar of the window “Edit text”, with ⓘ after it (see also The toolbar). Its help text reads: “Insert an image in the middle of the text — it flows along with the text. You will be asked for its size and position; to change an image later, double-click it.” If the cursor is in the name of a variable or a pill, the designer refuses before the image choice opens: “Only text fits in this name — an image cannot go there. Click next to the name and then choose »🖼 Image« again.”

**Clipboard and dragging do not work:** If you paste an image file with Ctrl+V, the designer reports: “An image cannot be pasted into the text from the clipboard. Use the »🖼 Image« button in the toolbar — there you can also choose whether it is a stored image or one from the data.” If you drag an image file into the text, it reports: “An image cannot be dragged into the text. Use the »🖼 Image« button in the toolbar — …” If you drag it onto a variable, the message is: “Only text fits in this name — an image cannot go there.”

#### The window “Image in text”

The window appears when inserting and when changing an image in the text. It carries the line “The dimensions determine how much space the image takes up in the text flow — the text wraps accordingly. The position says where the image sits within this space; it does not change the wrapping.” You can resize it by dragging its edges. Esc and a click beside it close it without a change.

[Image: Excerpt of a small window with the heading “Image in text: stamp_paid”. Below it is the gray note “The dimensions determine how much space the image takes up in the text flow — the text wraps accordingly. The position says where the image sits within this space; it does not change the wrapping.” Two input fields follow side by side, “Width (mm)” with the value 25 and “Height (mm)” with the value 15. Below is “Position within its own space” with an ⓘ and a field of nine buttons in three rows of three, with the arrow characters ↖ ↑ ↗ in the top row, ← ● → in the middle one and ↙ ↓ ↘ in the bottom one. The button at the bottom right (↘) has a blue background, the others are white. At the bottom edge on the right are the buttons “Cancel” and the blue button “Insert”.]
Caption: The window “Image in text” with the position “bottom right”.
- Image marker 1: For a fixed image the short name is in the title.
- Image marker 2: The fixed space of the image in the text, in millimeters.
- Image marker 3: The nine positions. The button with the blue background is the chosen position.
- Image marker 4: “Insert” puts the image at the cursor. When changing, the button is called “Apply”.

| Setting | What it does | Default |
|---|---|---|
| “Width (mm)” and “Height (mm)” | The fixed space of the image in the text. The box stays this size even if the image has a different aspect ratio; there is no dimension taken from the pixels, and the image is fitted into the box. Any number greater than 0 is allowed, with a comma or period, with no upper limit. Otherwise the designer reports “Please enter a width and a height in millimeters, e.g. 25 and 15.”, and the window stays open. When it opens, the width field is selected. | 25 and 15; when changing, the previous values |
| “Position within its own space” (with ⓘ) | Where the image sits in the space that width and height give it. Nine buttons in a 3×3 grid (↖ ↑ ↗ ← ● → ↙ ↓ ↘) stand for top left, top center, top right, middle left, center, middle right, bottom left, bottom center and bottom right. The help text of a button names the position, and the chosen button has a colored background. The position changes nothing about the wrapping of the text. An image in text is always fitted, so the position always has an effect. | center (●) |
| “Image quality” (with ⓘ) | Only when changing an image from an image field; when inserting, the image choice has already asked about the quality, and for a fixed image, a file field and a text field there is nothing to choose. Choices: “Original — sharp, costs time and file size” or “Small — fast, visibly softer in print”. A line below names the cost, see below. | Original |
| “Cancel” | Closes the window without a change. | – |
| “Insert” or “Apply” (blue, right) | The main button is called “Insert” when the image is newly placed and “Apply” when an existing image is changed. Enter in a number field triggers it. | – |

- **Too wide:** If the width is larger than the space in the text object, the window shows a warning line as soon as you type: “Wider than the space in the text object (… mm): design and print scale the image down to … × … mm, keeping the aspect ratio. In an indented list item the space is smaller by the indent.” The window knows the space only for a text object with a width, not in a table cell or in the header. Your entry stays as it is.
- **Cost of the quality:** For “Original” it says below: “The original image is fetched separately for each row — measured at about 0.3 seconds and 330 KB per image. With 25 items that is 25 fetches, every time the document is created.” For “Small” it says there: “The small preview image (144 × 144 pixels) comes along for free when the data is loaded — no extra fetch, but visibly softer in print.” In the text, such an image is usually in a table row. An image of 25 × 15 mm is printed small anyway; there “Small” is often barely noticeable. What the two choices do in print and when the preview image is printed instead of the original is explained under Images: Quality.

#### Changing an image that is already placed

A double-click on an image in the text opens the same window again, with dimensions, position and, for an image field, also the quality. Fixed images and images from the data are both recognized. The details with which the large image of an image field is loaded are kept in the process. An image in the text can be selected and deleted like a character.

In the editor the image appears like this:

- A fixed image carries the help text “Short name — width × height mm, position · Double-click to change”.
- An image from the data shows the sample image of the real sample row. Its help text reads “Image from the data: path”, below it “Width × height mm” and “Double-click: change”.
- If the sample row has no image, a gray dashed placeholder with the word “Image” appears there. The help text also says: “There is no image in this sample row — in the document this spot is then left out.” The placeholder is only a handle to grab.

#### What happens in the document

- **If the image for a record is missing,** the spot is dropped entirely: no hole, no gray box, the text closes up. The setting “If there is no image” does not exist for an image in text. A document with a photo therefore wraps at a different place than one without.
- **Images that are too wide** are reduced to the width of their box or column, in an indented list item without the indent. The aspect ratio stays: an image of 80 × 20 mm becomes 60 × 15 mm at 60 mm of space. This applies on the canvas as in the PDF; the document reports it.
- **Baseline and line height:** If there is also text in the line of the image, the image stands on the baseline, like a large letter; the descenders of the text (g, j, p) extend below it. If the image is alone in its line, such as a signature or a logo, the line is exactly as tall as the image. The line spacing applies only to the text of the line, never to the image.
- **Deviation on the canvas:** If a line with an image wraps by itself, the canvas may deviate from print there. If the image ends up alone in a line in the process, that line is about one descender taller on the canvas than in print; with a line spacing above 1, up to half of the additional spacing can come on top. Something similar applies to an image in a bulleted item, in an aligned paragraph and in table cells. If an image in the first line of a bulleted item is taller than the font, the bullet or number is at the top next to the image on the canvas, and at the bottom next to the text in print. Print is authoritative; the full preview shows it.
- **Sample row:** Unlike an image object, the canvas shows strictly the image of the sample row for an image in text.

### What changes in the document?

**On the canvas:** After “Apply”, formatting, size, font, color, line spacing, alignment, lists, superscript and subscript and formulas on the page look as in print; the exception for formulas is explained under Math formulas, how fields and dynamic texts appear there under Texts: How the canvas shows a text. In the window itself, lines with fields can wrap differently than in the PDF, because the name appears there instead of the value, and it shows the line spacing only in part. An image in text shows the image of the sample row; where a line with an image can look different on the canvas than in print is explained under What happens in the document.

**In the PDF:** The value of a field is printed, never the name of its marker; a character that the printed font does not contain appears as an empty box. If a record has no image for an image in text, the spot is dropped, and the text closes up. Links are clickable if the address begins with http://, https://, mailto: or tel:.

---

## Images

*For users · Objects · Page en/bilder.html*

> **In short:** An image is an object of its own with a box (width × height) and an image source. The source is either a fixed image from the image library, such as your logo, or an image from the data, such as the photo of a line item. The image is fitted into the box, can be cropped to a shape and rotated, and with “Except when” it changes depending on the data. Only PNG, JPEG and BMP are printed. What applies equally to all objects, such as Positioning behavior, Visibility and Arrangement, is described on pages of its own; this page explains what is different for the image.

### What an image is

An image consists of a box and a source. The box has a width and a height and sits at a place on the page or in a group. The source says which image is printed in it:

- **A fixed image** is always the same image from the image library, such as your logo or a stamp. It looks the same in every document.
- **An image from the data** is stored in the record: a different one for each invoice, line item or contact. It comes from an image field, a file field or a text field in which the image is stored as text.

The image is fitted into the box and can be cropped to a shape and rotated. With “Except when” an image prints a different one depending on the data; the first rule that applies wins. An image can also appear in the middle of a text (see The “Edit text” window: An image in the middle of the text). An image is never split (see At the page edge).

### Inserting an image

An image only comes into being once you have chosen a source. A click on the button “Image” and dragging the button both first open the window “Where does the image come from?” (see Where the image comes from). If you cancel there, nothing is created.

| Way | What happens |
|---|---|
| Ribbon, section “Elements”: click “Image” | Opens the image choice. After the choice the image is created and selected. Where it goes is explained under Where a click puts the image. |
| Drag the button “Image” onto the page | When you release, the same image choice opens; after the choice the image lies at the drop position. Whether it goes into a group or is created as an object of its own on the page depends on what you release over (see Groups: Which area of the group counts). Where a dragged object goes otherwise and how the blue insertion line works is explained in The ribbon: Dropping by dragging and Working on the canvas: The insertion line. |
| Group designer and column designer: button “Image” in the ribbon of the window | Works like the button in the ribbon of the document and puts the image into the group or cell you are currently editing. If an object is selected there, the image goes into the same group as that object, and for a selected subgroup into that one (position as under Where a click puts the image). You can also drag the button onto the area of the window; then the image lies at the mouse position. |
| Drag an image field or file field from the area “Data” | The field becomes an image, not text. You can drag onto the page, into a group or into a cell; details are under Images from the data. |
| Window “Choose columns”: checkbox at an image or file field | The field becomes an image column of the table, see Images from the data. |
| Window “Edit text”: button “🖼 Image” | Places an image in the middle of the text, see The “Edit text” window: An image in the middle of the text. |
| Right-click on a grid cell: “🖼 Content: Image” | Only in older templates with a grid, see Image in a grid cell. |

#### Inserting a fixed image, such as the logo

1. In the ribbon, in the section “Elements”, click “Image”.
   → The window “Where does the image come from?” opens.
2. Click “Fixed image”.
   → The image library shows all stored images as tiles with their short names. If your logo is not there yet, upload it with “Upload new image” (see Image library and fonts: Uploading a new image).
3. Click the tile of the image you want.
   → The window closes. The image lies on the page or in the group and is selected; on the right “Image source” shows the short name.
4. Adjust size and position: drag the handles of the image, or enter “Width”, “Height”, “X (mm)” and “Y (mm)” on the right (see The properties of an image).

#### Inserting an image from the data, such as a photo

1. In the ribbon click “Image”, and in the window “Where does the image come from?” click “From the data”.
   → The window “Image from the data” shows the data tree with the fields of the type image, file and text.
2. Click the image field, such as an image field of the main record or the photo of the related contact.
   → For an image field a small window asks about the quality.
3. Choose “Large image (recommended)” for a sharp image or “Small preview” if speed matters, for example with many images in a table.
   → The image is created. On the canvas there is a sample image or a blue placeholder, and “Image source” shows the field path.
4. Check the result in the full preview (see Full preview and PDF).
   → Each record shows its own image. If a record has none, “If there is no image” decides what appears at that spot.

For a separate photo per line item, the image belongs in a table row, for example through “Choose columns” (see Ways in tables, groups and cells). On the page, a field from the line items gives only the image of the first line item.

#### Where a click puts the image

A click on “Image” puts the new image in the same places as a click on “Text” or a shape; which containers apply in which order and which gaps and messages go with it is explained under The ribbon: Where a click inserts. Unlike “Text”, the image choice opens first. The new image is then selected, and its properties are on the right.

#### What a new image starts with

The size of the box depends on the way the image is created. The table gives it for each way; the positioning behavior appears there only as a value, because what it does is explained under Positioning behavior: What a new object starts with.

| Way | Size of the box | “Positioning behavior” |
|---|---|---|
| Button “Image” in the ribbon, by click or dragging, also in the ribbon of the group designer and the column designer | 35 × 14 mm | “Flowing on contact” |
| Drag an image field or file field onto the page or onto a group, also onto a group inside a group or in a table cell | 35 × 14 mm, not the 20 × 15 mm of the table column | “Flowing on contact” |
| Drag an image field or file field into a table cell: onto a data column, also one without a cell designer, into a cell designer (data cell or header cell) and into a cell of an extra row or a free-form table | up to 20 × 15 mm (aspect ratio 4:3), never wider than the column minus 3 mm | “Fixed position” |
| Image column from “Choose columns”: checkbox at an image or file field | 20 × 15 mm (aspect ratio 4:3), never wider than the column width minus 3 mm; the height is rounded to whole millimeters | “Fixed position”, at the top left of the cell |
| Right-click on a grid cell: “🖼 Content: Image” (older templates only) | 20 × 12 mm | –; the grid cell has no field for it, see Image in a grid cell |
| Drag an image field onto an empty grid cell (older templates only) | up to 20 × 15 mm, never wider than the drawn cell minus 3 mm | – |

The other image settings start with the defaults from the table under The image settings at a glance. The source is the one you chose in the image choice; for an image field the quality is the answer to the quality question, and without an entry original quality (see Quality). How objects get into a group and out again is explained in Groups: Objects in and out.

### Where the image comes from: the image choice

The image choice is a single window with several stages: first the question where the image comes from, then the data tree or the image library. It opens with “Image” in the ribbon (click and drag), with “Choose image…” in the properties and in the window “Except when — which image when?”, and with “🖼 Image” in the text editor. You can resize it by dragging its edges. Esc and a click beside the window close it like “Cancel”.

After the choice the new source replaces the old one. All other settings of the image are kept: fit, position, shape, preview on the canvas, “If there is no image” and the rules.

#### Stage 1: Where does the image come from?

The window carries the line “Two options — both can be changed later.” It appears only if the image has no source yet: for a new image, an image in text, a rule without an image and a data image without a path. If you change an existing image, the window jumps straight to the branch of the previous kind: for a fixed image to the image library, for a data image to the data tree.

| Button | What it does |
|---|---|
| “From the data” | Opens the data tree. The button explains itself: “The image is stored in the record — a different one for each invoice, line or contact. You choose the field from the data tree.” |
| “Fixed image” | Opens the image library. The button explains itself: “Always the same image, such as a logo or a stamp. From the image library — you can also upload a new one there.” |
| “Cancel” | Closes the window. Nothing is created or changed. |
| “◀ Back” (in the data tree and in the image library) | Goes back to the question. This is how you change the kind of an existing image, from fixed to data or the other way around. |

#### Stage 2: Image from the data

The window “Image from the data” carries the line “Image fields, file fields and text fields — a text field can hold an image as text. If nothing is stored there, the spot in the document stays empty.” It shows the data tree (how it is built is explained in Data tree and field picker: The data tree) with the search field “🔍 Search fields & relationships…”.

[Image: Excerpt of a window with the heading “Image from the data” and the gray note “Image fields, file fields and text fields — a text field can hold an image as text. If nothing is stored there, the spot in the document stays empty.” Below it a frame with the search field “Search fields & relationships…” and a tree. The first row “Custom variables” is collapsed, below it, expanded, is “Rechnung ★” with a second search field “Search in »Rechnung ★«…”. Indented below are three fields, each with a blue badge in front of the name: “Abc” in front of “Rechnungsnummer”, “Image” in front of “Produktfoto” and “File” in front of “Datenblatt”. After that, collapsed, are the relationships “Kunde” (badge N:1) and “Rechnungspositionen” (badge 1:N) as well as the rules “Positionen” and “Kennzahlen”. Below “Rechnung” follows, collapsed, “Own company (sender)”. At the bottom is the button “◀ Back”.]
Caption: The data tree of the image choice. The badge in front of the field names its kind. The fields “Produktfoto” and “Datenblatt” are made up for this example.
- Image marker 1: The search field expands matches by itself.
- Image marker 2: “Rechnungsnummer” with the badge “Abc”: a text field. It prints only if an image is stored in it as text.
- Image marker 3: “Produktfoto” with the badge “Image”: an image field, so an image column in Dynamics. After the click a small window asks about the quality.
- Image marker 4: “Datenblatt” with the badge “File”: a file field. The image is chosen immediately, the quality question does not apply.
- Image marker 5: “◀ Back” goes back to the question “Where does the image come from?” There is no “Cancel” button at this stage.

- The tree starts collapsed and shows only fields of the type image, file and text, recognizable by the badges “Image”, “File” and “Abc” (see Data tree and field picker: What the badges and additions mean). System variables are missing. Rules are offered, because an image can also be behind a rule. Of their calculated fields only the variables of the type text appear there; sums, counts, amounts and dates are missing. If the rule summarizes, only image, file and text fields appear among the attributes.
- A field from a list, such as the line items, is related to the first row of the list. If the image itself is in a row of exactly this list, for example in the cell designer of the line items table, the designer takes the image of the respective row instead. This also applies if “First value” appears on the right of the field, regardless of whether you choose the field under the relationship of the list or under the rule the table is based on. The designer reports it: “In a row of this table, »first(Positionen.foto)« would stay empty — the image of the row is therefore inserted instead: foto.” (see The relation to the row).
- If you have zoomed into a cell or group that is in a row, the row appears as the category “Per row · …” with the name of the row. The image is then bound to this row (see The relation to the row). The same applies to “🖼 Image” in the text editor if the text is in a row, even if you edit it from the page, for example through the structure, and likewise to “Choose image…” of an image and to the image of an image rule if the image is in a row, even when selected from the page. If you drag the tile “Image” from the ribbon, the row of the place where you release applies. If a table is selected, a new image lands next to it and not in its row; its row then does not appear.
- A click on a field chooses it. What happens next depends on the kind of field: for an image field the quality question follows (see Quality); for a file field and for everything else, that is text, the value of a rule or a variable, the image is chosen immediately, without a question. The table under The three kinds compares the kinds.
- At this stage there is no button “Cancel”, only “◀ Back”. Esc and a click beside the window also close it.
- If an image field has no stored table, the warning “No table is stored for this image field — the large image then cannot be loaded later. Please expand the relationship in the data tree once.” appears. Only the small preview image is then printed. This warning does not appear for a file field.
- If you switch an existing image to a text field, the designer forgets the details of the previous image field, including the quality.

### The image library and uploading

The image library from which you choose a fixed image is described in Image library and fonts: The image library. The form for uploading a new image with its fields, the suggestion for the short name and the check messages is under Image library and fonts: Uploading a new image.

### The properties of an image

If you click an image, its properties are on the right under the label “Image”. How the properties window is built and what the small ⓘ next to the labels does is explained under The properties window. For the image there are three variants:

- **Image in a group or table cell** (group designer, column designer): all fields are one below the other, without tabs.
- **Image directly in the document:** two tabs. Under “General” are the heading “Content” with the image fields and below it the heading “Visibility” with the visibility rules. Under “Position & size” are the positioning behavior (with move along and arrangement), a note about the page break, the heading “Position & size” with position, size and rotation, and a note sentence. The tab chosen last stays selected when the window is redrawn.
- **Image in a grid cell** (older templates only): the window “Grid cell” with fewer fields, see Image in a grid cell.

The title row shows only the object type “Image”; there is no name or label to edit. How the object is named in the structure is explained under Working on the canvas: The structure.

For an image in a group, “⬆ Take out of group” is at the top; it lifts the image up one level (see Working on the canvas: Moving, snapping, attaching and detaching). In a table cell and directly in the document it is missing. How objects get into a group and out again is explained in Groups: Objects in and out.

#### The image settings at a glance

The fields under the heading “Content” are the same in all three variants. In the grid cell, instead of the heading there is the locked field “Content” with the word “Image”.

[Image: Excerpt of the right column “Properties” of the designer. At the top is the blue marker “Image”. Below it two tabs: “General” (selected, underlined in blue) and “Position & size”. Next comes the section “Content” with these fields from top to bottom, each label with a small ⓘ: “Image source” with the display field “first(Items.Product.Foto)” and to the right of it the button “Choose image…”; “Quality” with the selection list “Original quality (recommended)”; “Fit” with “fit (nothing cropped)”; “Position in frame” with “center (default)”; “Shape” with “none (rectangular)”; a checked box “Show image on the canvas”; “If there is no image” with “print nothing”; “Except when” with the gray text “none — always the image above” and to the right of it the button “Rule” with a small image rule icon. At the bottom edge the section “Visibility” begins.]
Caption: The properties of an image from the data, “General” tab. For a fixed image, “Quality”, “Show image on the canvas” and “If there is no image” are missing.
- Image marker 1: Image source: shows where the image comes from. It is changed only through “Choose image…”.
- Image marker 2: Quality: original quality or small preview image.
- Image marker 3: Fit: fit, fill or original size.
- Image marker 4: Position in frame: selectable only with “fit”.
- Image marker 5: Shape: crops the image, for example to a circle.
- Image marker 6: If there is no image: what is printed when the record has no image.

| Setting | What it does | Default |
|---|---|---|
| “Image source” with “Choose image…” | Shows where the image comes from and opens the image choice. See Image source. | the source from the image choice |
| “Quality” | How sharp an image from an image field is printed. Only for an image field. See Quality. | Original quality (recommended) |
| “Fit” | How the image fits into its box: entirely inside, filling the box, or at original size. See Fit. | fit |
| “Position in frame” | Where the fitted image sits in the free strip of its box. Selectable only with “fit”. See Position in frame. | center |
| “Shape” | Crops the image to a shape, such as a circle. See Shape. | none (rectangular) |
| “Show image on the canvas” | Shows a real sample image on the canvas or only a blue placeholder. Only for images from the data. See Show image on the canvas. | on |
| “If there is no image” | What happens when the record has no image. Only for images from the data. See If there is no image. | print nothing |
| “Except when” | Prints a different image depending on the data. See A different image depending on a condition. | no rule |

#### Image source and Choose image…

The “Image source” is a display field; you cannot type anything there. Next to the label is ⓘ. The field shows in one line where the image comes from:

- For a fixed image the short name appears. If it has none yet, “(no image)” appears there.
- For an image field the field path appears without the curly braces, with the addition “(low quality)” for small quality.
- For a file field “File:” and the path appear, for a text field with image data “Text:” and the path.
- A field from a list appears as “first(…)”. If the image is in a table row of this list, the field shows the path within the row, such as “foto” or “productid.entityimage”. If the image is in a list below the row, such as the batches of a line item, “first(Chargen.foto)” appears there (see The relation to the row).
- “(no image chosen)” appears only if no text results at all.

Long texts are shortened with …; the mouse pointer shows the full text. You change the source only through the button “Choose image…” next to it. It opens the image choice. If the image already has a source, the window jumps straight to the matching branch; without a source the question “Where does the image come from?” appears first (see Where the image comes from). Whether fields are offered per row depends on where the image is: if it is in a row, the choice refers to this row, whether you have zoomed in or selected the image from the page, for example through the structure.

#### Quality

The selection list “Quality” (with ⓘ) appears only for an image field, that is an image column from Dynamics. For a fixed image, a file field and a text field it does not exist: a file column has no preview image, and each image is fetched individually there.

**The quality question:** If you choose an image field, a second small window asks about the quality. It appears in the image choice, when you drag an image field onto the page, into a group or into a cell, and when you check an image field as a column. The title begins with “Quality for …” and then names the field; for several image columns the number appears there, for example “3 image columns”. The note in the window says: “Dynamics also stores a small preview for every image. It comes along when the data is loaded — the large image has to be loaded separately.”

If you choose an image field in the image choice, the designer closes the previous window first so that no windows pile up. “Cancel” then does not lead back to the data tree but ends the choice; you start again with “Image” or “Choose image…”. If, on the other hand, you check image fields in the window “Choose columns”, that window stays open behind the question, and “Cancel” leads back to it. For all checked image fields the question comes only once; for a file field it never comes.

The same choice is named differently depending on the place (for the window “Image in text” see The “Edit text” window: The “Image in text” window):

| In the properties, field “Quality” | In the quality question | In the window “Image in text”, field “Image quality” | What happens |
|---|---|---|---|
| “Original quality (recommended)” (default) | “Large image (recommended)”: “Sharp in print. Takes a little longer to load.” | “Original — sharp, costs time and file size” | The large image is fetched individually for each record. This takes longer but is clearly sharper in print. |
| “low quality (144 pixels)” | “Small preview”: “Visibly coarse, but available immediately. Good for many images in a table.” | “Small — fast, visibly softer in print” | The small preview image (at most 144 × 144 pixels) is printed, which Dynamics creates itself for every image and delivers when the data is loaded. It costs no additional fetch. |
| – | “Cancel”, also Esc and a click beside it | – | Nothing is created or changed. |

[Image: Excerpt of a PDF page with two square images of equal size side by side, both showing the same drawn sample image: a blue cup with the white word DEMO, fine light horizontal lines, small type below it, steam above it and a tabletop at the bottom. The left image is sharp; the fine lines and the small type are clearly recognizable. The right image is visibly soft and blurred at the edges; the small type is no longer legible.]
Caption: The same product image twice in the PDF, each 80 × 80 mm: on the left in original quality, on the right as a small preview image (144 × 144 pixels). Printed from a demo product.
- Image marker 1: “Original quality (recommended)”: The large image is sharp even when enlarged considerably.
- Image marker 2: “low quality (144 pixels)”: The preview image is stretched to the size of the frame and therefore looks soft.

**On the canvas:** With low quality, the canvas shows the preview image. With original quality, in Dynamics the canvas loads the large image once and shows it as soon as it is there; until then, and if none arrives, the preview image is shown.

**In the PDF:** With original quality, a fetch is needed for each row. In these cases the document prints the small preview image instead:

- The column does not store an original image, because the setting for full images on the column is off or the image was uploaded before it was turned on. The print reports this as a yellow note about the data (see Problems and messages: Notes and warnings). A button in Dynamics shows such a note only together with a warning; therefore check images in the full preview. In that case it is better to choose “low quality” right away: the same is printed, only without the futile fetch per record and without the note.
- The large image cannot be fetched when the document is created, for example because of a timeout, a missing read permission or an invalid reference, or the time for images has run out. Instead of a gap, the preview image appears, and the print reports a warning.
- No table is stored for the image. Then the preview image is printed right away, without a message.

For a sharp image, in Power Apps turn on, on the image column of the table, the setting that stores full images (the designer calls it “Can store full images”), and then upload the image again; see Fonts and images. The quality also applies to the images from “Except when” rules as long as the rule has none of its own. If you choose an image field in a rule, the designer asks for the quality for that rule separately.

#### Fit

The selection list “Fit” (with ⓘ “How the image fits into its frame”) determines how the image fits into the box (width × height). Distortion is deliberately not offered: the aspect ratio of the image is always preserved.

[Image: Excerpt of the canvas with three square boxes side by side. All three contain the same image: a drawn landscape with a blue sky, a yellow sun, green hills, a red house in the middle and two dark green trees at the left and right edge of the image. In the left box, surrounded by a gray dashed frame, the whole image is shown reduced, with white strips above and below; both trees are visible. In the middle box the image fills the whole area; the two trees are cut off at the sides. In the right box the image is greatly enlarged: only the house and the sun are still visible, the sun is cut off at the top edge.]
Caption: The same image in the same box, with three fits.
- Image marker 1: “fit (nothing cropped)”: The whole image is visible. A free strip remains at the top and bottom.
- Image marker 2: “fill (covers the whole frame, crops)”: The box is completely filled. To do so, the same amount is cut off on the left and right.
- Image marker 3: “Original size (300 dpi)”: The image stands in the middle at its real size. Whatever does not fit is cut off.

| Choice | What happens | In the PDF |
|---|---|---|
| “fit (nothing cropped)” (default) | Nothing is cropped. The image is made so large that in one direction it reaches the edge of the box; a small image is enlarged for this too. In the other direction space remains, which “Position in frame” distributes. | The smaller of the two scales applies; the image is then offset according to the position. |
| “fill (covers the whole frame, crops)” | The image fills the box completely and cuts away the same amount on both sides, top and bottom or left and right. | The larger of the two scales applies; the overhang is cropped to the box. |
| “Original size (300 dpi)” | The image stands at its pixel size at 300 dots per inch, centered in the box. Whatever does not fit is cut off. | Pixels divided by 300, times 25.4 mm, centered and cropped to the box. An image of 1200 × 1600 pixels becomes 101.6 × 135.5 mm. Only here is the image not reduced to print resolution when the document is created in Dynamics. |

- **Position:** For “fill” and “Original size”, “Position in frame” is locked and the image is centered (see Position in frame).
- **Phone photos:** A phone image taken in portrait that carries only a rotation flag in the file is printed upright in the PDF.
- **On the canvas:** The canvas recalculates the three choices. For “Original size” it converts pixels at 300 dots per inch into millimeters. For “Original size” and an image field in original quality, the canvas loads the original image and shows its real size; until then the small preview image appears at its size.

Older templates in which an image is still stored without its own image settings are converted by the designer into an image with identical print when the properties are displayed. An old “Distort” becomes “fill”; this is the only conversion that is not print-identical.

#### Position in frame

The selection list “Position in frame” (with ⓘ) says where the fitted image sits in the free strip of its box. An image almost never has exactly the shape of its box. If it is wider in relation to the box, space remains at the top and bottom; if it is narrower in relation, on the left and right. So it is the ratio to the box that counts, not whether the image itself is wider than tall: a landscape logo in an even wider header leaves space on the left and right. The position is useful, for example, for logos in a header that should all stand at the same edge despite different widths.

- **Choices:** top left, top center, top right, middle left, center (default), middle right, bottom left, bottom center, bottom right.
- **Default:** center.
- **When selectable:** The field is always there. For “fill” and “Original size” it is locked and shows “center (default)”. The help text then says: “Only selectable with »fit«. With »fill« there is no space left that a position could distribute; with »Original size« the image is always centered.”
- **The choice is kept:** A position once chosen is not lost when locking. It also applies to the image from an “Except when” rule.
- **In the PDF:** The position only has an effect with “fit”. The canvas distributes the free strip in the same proportion as the PDF.

In the ⓘ two small example images show “center (default)” and “bottom right”. The same nine positions exist for an image in the middle of a text (see The “Edit text” window: The “Image in text” window).

#### Shape

The selection list “Shape” (with ⓘ “Shape (crop)”) crops the image to a shape, such as a round portrait from a square photo. Without a shape the image stays rectangular. For the shape to be filled completely, “fill” as the fit goes with it.

[Image: Excerpt of the canvas with seven images of equal size in two rows, four at the top and three at the bottom. Each shows the same drawn landscape with a blue sky, a yellow sun, green hills and a red house; below each the name of the shape in small gray type. Top row: “none (rectangular)” is a rectangle, “Circle” a circle, “Ellipse” a horizontal ellipse and “rounded corners” a rectangle with slightly rounded corners. Bottom row: “Triangle” is a triangle with the point at the top, “Star” a five-pointed star and “Polygon” a pentagon with the point at the top. Star and pentagon are stretched slightly in width.]
Caption: All shapes on the same image, with the fit “fill”.

| Choice | Crop |
|---|---|
| “none (rectangular)” (default) | The image stays rectangular. |
| “Circle” | The diameter is the shorter side, and the circle is centered. |
| “Ellipse” | The ellipse lies over the whole drawn image. |
| “rounded corners” | The radius is 12 % of the shorter side. |
| “Triangle” | The point faces up. |
| “Star” | A five-pointed star, stretched to the whole drawn image. |
| “Polygon” | A pentagon with the point facing up, stretched to the whole drawn image; it is regular only for a square image. |

In the PDF the shape travels with the image; the PDF and the canvas crop with the same formulas. With “fit” it sits on the drawn image, with “fill” and “Original size” on the box. The blue placeholder on the canvas always crops at the box and therefore looks different from the image with “fit” and a different aspect ratio. With “show placeholder” the gray box has the shape as well. A shape can be combined with a rotation; it then rotates with the image (see Position, size and behavior of the image). The same outlines exist as objects of their own, see Shapes.

#### Show image on the canvas

The checkbox “Show image on the canvas” (with ⓘ) appears only for images from the data; the canvas always shows a fixed image. The default is on.

- **On:** The canvas shows a real sample image from the sample record so that you can judge the crop and aspect ratio.
- **Off:** Only a blue placeholder with the field name appears.
- **In the PDF:** No effect. The setting affects only the canvas.
- **Not printable:** If the print cannot read the image (see Formats), the canvas shows, with the checkbox set, a dashed box “not printable” instead of the image.

#### If there is no image

The selection list “If there is no image” (with ⓘ) determines what happens when the record has no image: when the field is empty or missing, or a text contains no readable image data. It appears only for images from the data, and the source of the image itself counts, not that of a rule. For a fixed image the field does not exist. If a rule of a fixed image delivers an image from the data and it is missing there, the setting of the fixed image applies to it, so for a newly created image “print nothing”; it can be changed only if the image itself comes from the data. For an “Except when” rule the setting of the image applies equally to all rules.

| Choice | What happens in the document | Space |
|---|---|---|
| “print nothing” (default) | The spot silently stays empty. This is the normal case. | takes up no space |
| “print nothing and report” | As before; in addition the print reports a note about the data. | takes up no space |
| “show placeholder” | A visible gray box stands at the spot: filled light gray (#EEEEEE) with a light gray border (#CCCCCC, 0.5 pt), the size of the image box, with the shape and rotation of the image. | takes up the space |

The note for “print nothing and report” reads in English: `image: no picture is stored for this record - the box counts as 0 mm high: a table row, a grid row or a group with automatic height does not grow for it, and objects below are not moved down for it; the space stays empty.`

#### If there is no image: the space below it

If the empty spot takes up no space, the box counts as 0 mm high. This has these consequences:

- A table row, a grid row and a group with “Automatic height (fit to content)” do not grow for the missing image. The group stays at its entered height, which is never undercut.
- Objects below it are not pushed down because of it.
- Nothing moves up as a result. A flowing object below the missing image stays at its drawn position; the gap stays empty (see Positioning behavior: Flowing).
- If something above grows, the object below the missing image moves down at most by the height of the image less than if the image were there. Example: An image is 20 mm tall, and a flowing text sits below it. If nothing above grows, the text stands in the same place with and without the image. If a text above grows a lot, without the image it stands 20 mm higher than with the image, but never higher than drawn.

The help text ⓘ on the field, on the other hand, says that objects with “Flowing” move up. That describes the difference from an existing image, not rising above the drawn position. If the space is to stay in the document, choose “show placeholder”. In a table, “Minimum row height (mm)” also provides uniform rows (see Data tables).

#### If there is no image: what the setting does not control

- **File without a printable image:** A file that is not a printable image (see Formats), and a failed fetch without a preview image (for example with a file column) keep their space. The spot stays empty, and it is always reported, regardless of this setting. For an image field in original quality, a failed fetch shows the preview image instead (see Quality). Even with “show placeholder” no gray box appears there.
- **At the page edge:** If the area in which the image lies is split at the page edge (for example a group with “Keep together at page break” turned off), the document never cuts through a gray box in the shape of a circle, ellipse, triangle, star or polygon, nor through any rotated box. It begins on a following page. An unrotated box without a shape or with rounded corners, on the other hand, is cut through; with rounded corners none of the pieces then has a rounding, not even at the corners that should actually be round. More on this under Images, shapes and lines in a split block.
- **On the canvas:** Outside a data row, the canvas always shows the blue placeholder when the image is missing. In a data row it draws nothing if it finds no image for the field in the whole sample record and “show placeholder” is not chosen. If it finds an image anywhere, it shows it in every row (see What the canvas shows).

#### Position, size and behavior of the image

This also applies here: other objects have these settings too, and each is explained on its own page. The table gives the default for the image, briefly says what is different for the image, and refers to the explanation.

| Setting | Default here | Explained in |
|---|---|---|
| “X (mm)” and “Y (mm)” | the place where the image was created; it determines the position of the image box | Position, size, rotation and arrangement: Position and size |
| “Width” and “Height” | 35 × 14 mm; the other ways of creating are listed under What a new image starts with. This means the size of the box, not of the image: the image is placed in the box after fitting. The two labels carry no ⓘ. Without a usable box (0 or negative) the PDF draws nothing. | Position, size, rotation and arrangement: Width and height for each type of object |
| “Rotation (°)” (with ⓘ) | 0; the image rotates together with its shape around the center of its box, on the canvas as in the PDF. An image in a triangle shape therefore tilts along with it. | Position, size, rotation and arrangement: Rotation |
| “Positioning behavior” | “Flowing on contact”; as an image column or dragged into a cell: “Fixed position”. Which way of creating gives which starting value is listed under What a new image starts with. | Positioning behavior and Positioning behavior: What a new object starts with |
| “Move along with the object below” | on; only for an image directly in the document | Positioning behavior: Move along |
| “Minimum gap above (mm)” | 0 | Positioning behavior: Minimum gap above |
| “Keep together at page break” | –; an image is never split, so the image has no checkbox. Directly in the document a note appears in its place, in a group or cell none. | At the page edge: The note instead of the checkbox and At the page edge |
| “Arrangement” and “Order in the group” | Rank 0 | Position, size, rotation and arrangement: Arrangement: layer order and sequence |
| “Visibility” | always visible; in the grid cell the section is missing | Visibility |

#### Deleting an image

An image is deleted like any object: with “🗑 Delete element” in a group or cell (without confirmation), with “🗑 Delete block” directly in the document (with confirmation) or with the Del key (without confirmation); see Copying, pasting and deleting. In a grid cell there is no delete button.

#### Grabbing the image with the mouse

Moving, size and rotation handles and the keyboard shortcuts apply as for any object (see Working on the canvas: Moving, Handles and Keys on the selected object). For the image, the following also applies: the handles change the box, not the image; its aspect ratio is not locked, and the image in it keeps its own through the fit. If you drag a group or column narrower, an image in it shrinks along, down to a minimum width of 6 mm.

#### Image in a grid cell

A grid can no longer be newly created anywhere in the current designer; grid cells exist only in older templates. There the following applies:

- “🖼 Content: Image” in the right-click menu of a cell turns the content into an image. Without asking, the designer inserts the fixed image `logo_full`, 20 × 12 mm, with the fit “fit”, preview on and “print nothing”. Change the image afterward in the properties with “Choose image…”. The other entries of the same menu are “✎ Edit content” and “𝐓 Content: Text”; the second turns the cell back into an empty text cell.
- The window “Grid cell” carries the subtitle “Row n, column m”, for a merged cell with the addition “· merged (n)”. It has the locked field “Content” with the word “Image”, below it the image fields from “Image source” to “Except when”, the color field “Cell background”, a note about right-click and Shift+click and, if several cells are selected, the button “🔗 Merge n selected cells”.
- Fields for width, height, rotation, position, visibility and positioning behavior do not exist in this variant, and there is no delete button. The image carries the dimensions it got when it was created (see What a new image starts with).

### A different image depending on a condition

Normally the image that is set in the properties appears. With a rule you determine that in certain cases a different image is printed: a Paid stamp as soon as the invoice is paid, or the logo of a specific company when the order belongs to it. The first rule whose condition is met wins. If none is met, the image from the properties stays.

The field “Except when” (with ⓘ) is there for every image, including the fixed one. On the left it shows how many rules there are: “none — always the image above”, “1 rule” or “n rules”. The button next to it is called “Rule” (with the icon of an image rule) as long as there is no rule, and “Edit rules…” after that. It opens the window “Except when — which image when?”. The counter also counts half-filled rules without an image.

#### Creating a rule

Example: A Paid stamp is to appear as soon as the invoice is paid.

1. Under “Except when”, click “Rule”.
   → The window “Except when — which image when?” opens. Without a rule it says there “No rule yet. Without a rule, the image from the properties is always printed.”
2. At the bottom left, click “Add rule”.
   → A new, empty rule appears under the heading “Rule 1”, with the condition builder “If …” and the row “… then: (no image chosen yet)”. An orange note says that a rule without a condition always applies.
3. Under “If …” build the condition; in the example: the field that shows whether the invoice is paid has the value “yes”. How the builder works is explained in Conditions.
   → The orange note stays for now; it disappears as soon as the window is rebuilt, at the latest after choosing the image in the next step.
4. Next to the row “… then: …” click “Choose image…” and choose the other image; in the example the stamp from the image library.
   → The rule window closes, the image choice opens, and after the choice the rule window appears again. The row now shows the chosen source, such as the short name of the stamp.
5. At the bottom right, click “✓ Done”.
   → The window closes. Under “Except when” it now says “1 rule”.

You create more rules with “Add rule”. The higher up a rule is, the earlier it is checked.

[Image: Excerpt of a window with the heading “Except when — which image when?” and the gray note “The first rule whose condition is met wins. If none is met, the image from the properties applies.” Below it are two outlined boxes one below the other. The first carries on the left the bold line “Rule 1” and on the right three small buttons: a grayed-out ▲, a ▼ and a red ✕. Below it is “If …” with the condition builder: the switches “AND” (selected) and “OR” with an ⓘ, a condition with the field “Rechnung › Bezahlt” and the choice “is yes” as well as the buttons “Condition” and “Subgroup”. Below that follows the row “… then: stamp_paid” with the button “Choose image…” on the right. The second box carries “Rule 2” with an active ▲, a grayed-out ▼ and a red ✕, below it a builder with the empty field “Choose field …”, the row “… then: (no image chosen yet)” with the button “Choose image…” and an orange line “Without a condition this rule always applies — the image from the properties is then never printed.” At the bottom edge are, on the left, the button “Add rule” with a small image rule icon and, on the right, wide, the blue button “✓ Done”.]
Caption: The window “Except when” with two rules. The second has just been added and is still empty.
- Image marker 1: The number is the order of checking. ▲ and ▼ change it, ✕ deletes the rule immediately.
- Image marker 2: The condition builder, the same as for visibility and rules.
- Image marker 3: The image that is printed when the condition is met. “Choose image…” opens the image choice.
- Image marker 4: Warning for a rule without a condition: it always applies.
- Image marker 5: “Add rule” appends a new, empty rule at the end.
- Image marker 6: “✓ Done” closes the window and discards rules without an image.

#### The window “Except when — which image when?”

The window can be resized by dragging its edges; Esc and a click beside it close it.

| Element | What it does |
|---|---|
| Title “Except when — which image when?” | Below it the window explains: “The first rule whose condition is met wins. If none is met, the image from the properties applies.” |
| Title row “Rule 1”, “Rule 2” and so on | Numbers the rules. The number is the order of checking: the first rule is checked first. |
| “▲” and “▼” | Change the order. The help text of ▲ reads “move up — the higher up, the earlier it is checked”, that of ▼ “move down”. For the first rule ▲ is locked, for the last one ▼. |
| “✕” (red) | Deletes the rule immediately, without confirmation. The help text reads “Remove rule”. |
| “If …” | Here you put together the condition. It is the same builder as for visibility and in the rules, see Conditions. Special features are explained below. |
| “… then: …” | Display only. Shows the source that this rule delivers, in the same short form as the image source in the properties: short name, path, “File: …”, “Text: …” or “(low quality)”. Before the choice, “(no image chosen yet)” appears there. |
| “Choose image…” in the rule | Closes this window and opens the image choice, with the quality question for an image field; if the rule already had an image, straight in the matching branch. After the choice the rule window opens again. Only the source is taken over. Size, fit, position, shape, preview and “If there is no image” belong to the image and apply jointly to all rules and to the image from the properties. |
| Orange note “Without a condition this rule always applies — the image from the properties is then never printed.” | Appears for every rule without a condition, so also immediately for every newly added one. Such a rule always applies; all rules behind it and the image from the properties then never come into play. This is allowed but made visible. |
| “Add rule” (bold, with image rule icon, bottom left) | Appends a new, empty rule at the end: no condition, no image. |
| “✓ Done” (wide, bottom right) | Closes the window. Rules without an image are discarded in the process, because a rule without an image has no effect anyway. If none is left, the rule list is removed entirely. Then the designer redraws the canvas and properties. |

#### Special features of the builder in this window

The builder is the same as for visibility and in the rules (see Conditions: The builder). A condition written by hand that it cannot display is shown in a box of its own above the condition parts (see Conditions: Conditions written by hand). If the image is in a table row, the rule is evaluated per row; which fields it finds there and how you reach a simple field of the document is explained under Conditions in a table cell. For the field picker see Data tree and field picker: The field picker. The rules can also use the template’s own variables (see Variables).

#### What you should know when closing

- **Closing without “✓ Done”:** If you close the window with Esc or a click beside it, half-filled rules without an image are not discarded. The counter under “Except when” in the properties counts them; nothing is printed or shown on the canvas for them, because a rule without an image is skipped. If you want to get rid of them, close with “✓ Done” or delete them with “✕”.
- **Canceling the image choice:** If you choose “Cancel” (or Esc or a click beside it) in the image choice from a rule, the rule window does not return, and the properties are not rebuilt. Open the window again through “Edit rules…”.

> **Good to know:** A rule delivers only the source of the image; everything else applies to all rules jointly (see the row “Choose image…” in the table under The window “Except when — which image when?”). If a stamp is to have a different size than the main image, create it as an image of its own and give it a visibility rule (see Visibility).

#### The effect of the rules

- **On the canvas:** It evaluates the rules with the sample data and shows the chosen image. In a table row it takes the drawn row, plus the template’s own variables. A condition whose evaluation fails counts there as not met. Image rules therefore take effect on the canvas.
- **In the PDF:** First the source is chosen, namely the first applicable rule with an image, otherwise the image from the properties; then it is loaded. The same order applies as on the canvas. If a rule applies whose image is missing in the record, neither a later rule nor the image from the properties steps in; “If there is no image” applies.

### An image in the middle of a text

An image can also appear in the middle of a text; how you place and change it is explained under The “Edit text” window: An image in the middle of the text.

### Images from the data

An image can be different for each record: the photo for each order line, the portrait for each contact. The designer knows three kinds of fields for this. You can see which kind it is in the data tree from the badge next to the field. How you choose a data image is explained under Stage 2: Image from the data. When the space simply stays empty is explained under If there is no image.

#### The three kinds

| Kind | What it is | After clicking the field in the data tree | Special features |
|---|---|---|---|
| Image field (badge “Image”) | An image column in Dynamics, such as the photo of a product. | The quality question follows (see Quality). | Dynamics creates a small preview image for every image and delivers it with the data; the large image has to be loaded separately. The “Quality” is selectable (see Quality). For the large image to be loaded, the table must be stored on the image; to do that, expand the relationship in the data tree once. |
| File field (badge “File”) | A file column in Dynamics. | The image is chosen immediately, without a question. | There is no choice of quality (reason: see Quality). The file must be a printable image; otherwise the spot stays empty, and the document reports it. |
| Text field with image data (badge “Abc”); a custom variable of the type text or color and a text variable of a rule are treated the same way | A text field in which an image is stored as text, as some applications write it into a text field. | The image is chosen immediately, without a question. | The image data is already in the row; there is no fetch and no choice of quality. The text field is printed only if it contains valid image data. If ordinary text is in it, the image counts as not present. |

#### Which formats are printed

Which formats are printed and what happens with others is explained under Formats. This applies to image columns, file columns and text fields as to images from the library.

#### The relation to the row

- If the image is in a table row or in a group that is in a row, the image is bound to the respective row: each row shows its own image. An image in a table row looks for its field when the document is created only in this row and in the records it points to. It does not find an image field of the main record there, even if the canvas shows an image: the spot stays empty, or an image of the row appears if the row’s record has a field with the same name. For an image that is the same in every row, use a fixed image, and check the result in the full preview.
- The image choice also binds to the row: if you choose there, from the list the table is based on, a field with “First value”, the designer takes the image of the respective row, because the first value of the list would stay empty in every row. This applies to a field under the relationship as well as under the rule of the table. If the field is in a list below the row, such as the batches of a line item, each row shows the first image of its own list. A field of another list stays as it is: the spot stays empty.
- If the image is directly on the page and the field comes from a list, it is bound as “first(…)”: the image of the first row appears. This also applies to an image behind a lookup of the row: for the product image of a line item, the image of the product of the first line item appears. If the first line item has no product or the product has no image, no image comes from a later line item; the setting under If there is no image applies. If the field is in a list below the list, such as a photo of the deliveries of a line item, the image of the first delivery of the first line item appears, as with a text next to it with the same first value. If the first line item has no delivery or its first delivery has no image, no image comes from a later row here either; the same setting applies. For “last(…)” the same applies to the last row of each list.
- Summaries of a list other than first and last row produce no image in the document.

#### Ways in tables, groups and cells

You can drag an image field or file field from the area “Data” onto several targets or check it in a table. With an image column the row grows with the image height, because the cell group has “Automatic height (fit to content)”. A row without an image costs no space with “print nothing”. For an image field choice, the quality question always comes first (see Quality); for a file field never.

| Way | What is created |
|---|---|
| Window “Choose columns”: checkbox at an image or file field | An image column: the column gets a cell designer with an image in it, not a text placeholder. Size and positioning behavior are listed under What a new image starts with. The image starts with the fit “fit”, preview on, “print nothing” and a path that refers to the row; the designer takes the details with which the large image is loaded from the row. After “Apply” the designer asks once about the quality for all checked image fields (see Quality); not for file fields. The window carries the note that an image field becomes an image column with a default size of 20 × 15 mm, freely changeable afterward in the column designer. More in Data tables: The window “Choose columns — …”. |
| Drag an image field onto a table column that does not have a cell designer yet | The column becomes a cell designer. An existing column text moves in as text, the image comes below it and is bound to the respective row (size and positioning behavior: What a new image starts with). For an image field the designer asks about the quality beforehand (see Quality). More in Cells, header row and page break: Dragging fields into cells. |
| Drag an image field into a cell designer (data cell or header cell) | The image is placed in the cell group, below the lowest existing child so that nothing is covered. For a data cell the reference is the row of the table, for a header cell the row above it, so on the page the main record. More in Cells, header row and page break: Dragging fields into cells. |
| Drag an image field into a cell of a free-form table | The image goes into the cell group as an image object, below the lowest child. It is bound to the row above, because the free row has no row of its own. If the table is directly on the page, the designer rewrites a field that applies only per row to “first(…)” or rejects it with an explanation. More in Cells, header row and page break: Dragging fields into cells. |
| Drag an image field into a cell of an extra row | The image goes into the cell group of the extra row, which is created if needed, and is bound to the table’s own row, as in the data column. More in Data tables: Extra rows. |
| Drag an image field onto a group that lies in another group or in a table cell | An image is created in the group at the mouse position (size and positioning behavior: What a new image starts with). It is bound to the row in which the group stands. If it is in no row, the designer rewrites a field that applies only per row to “first(…)” or rejects it. A group directly on the page is treated by the designer like the free page area (see the next row of this table): if you release over the hit area of the group (see Groups: Which area of the group counts), the image goes in; the designer rewrites a field that applies only per row to “first(…)” as on the page, or rejects it. An image field behind a lookup of the row, such as the product image of a line item, then shows the image of the first line item. More in Groups: Objects in and out. |
| Drag an image field onto the free page area | An image is created with the fit “fit”, preview on and “print nothing” (size and positioning behavior: What a new image starts with). An image field triggers the quality question first (see Quality), a file field creates the image immediately; a text field, on the other hand, becomes ordinary text. The placement depends on the spot, as when dragging the ribbon button (see Inserting an image). A field that applies only per row is rewritten by the designer to “first(…)” as with a text field, so to the image of the first row, and reported. If it does not know which list the field belongs to, it creates nothing and reports why. Both messages are under Data tree and field picker: A field “per row” outside a table cell. All other fields it binds to the dragged path as it is. If you have zoomed into the cell designer of a data table, it binds to the row of this table, also a field of the same list that was dragged as “first value”. If an image field has no stored table, the warning appears that is explained under Stage 2. An image field behind a lookup of the row, such as the product image of a line item, shows the image of the first line item. |
| Drag an image field onto a grid cell (older templates only) | It is placed only in an empty grid cell (size: What a new image starts with). If the cell is occupied, its content stays, and the designer reports: “This grid cell is already occupied — the image was not placed. Empty the cell first (right-click → »Content: Text«) or drag the image field into an empty cell.” Conversely, it does not write a text field into a cell with an image: “This grid cell already contains an image — it will not be replaced by text. Empty the cell first (right-click → »Content: Text«).” |
| Drag an image field into a text object as a placeholder | The placeholder is appended, but an image field prints nothing as text. The designer says: “… is an image field — no image is printed for it as a placeholder in the text. To put an image into the text, use »🖼 Image« → »Image from the data« in the text editor; to use it as an image object of its own, drag the field onto the page or into a cell.” In the PDF the document reports: `field '…' holds a picture, not text - nothing was printed. Use an image element for image columns.` See The “Edit text” window: An image in the middle of the text. |

- **Table header:** An image from the data in the simple header text of a table (without a header designer) is not printed, because the print never fills this text with data. The document reports it (see Problems and messages: Images and fonts). As an image object of its own in a header cell of the header designer, it refers to the row above (see Cells, header row and page break: Designing the header row).
- **Permissions:** Smart Templates reads images from records (image and file fields) with the permissions of the user who creates the document. If a permission is missing, the preview image is printed with a warning, or the spot stays empty (see Rights and roles).
- **Setting up sharp images:** How to set up the image column for large images in Dynamics is explained in Fonts and images.

### What the canvas shows

The canvas shows fields as blue markers with the field name. For images it is different: it shows a real sample image or a placeholder. On the page, in the group designer, in the column designer and in grid cells the following applies:

| Display | When it appears and what it means |
|---|---|
| Sample image from the record | For data images the canvas looks in the whole sample record for the first image for this field, first at the path, otherwise anywhere under the same field name, also in lists and neighboring rows, and shows it. In a table the same image therefore appears in every row, not the image of the drawn row. The image serves only to judge the crop and aspect ratio; in the document each row has its own image. If the field is bound as “first(…)” or “last(…)” (first or last row of a list), the canvas does not search further: it shows exactly the image that is printed, in a table row that of the drawn row; if there is none, outside a table the blue placeholder appears, in a table row nothing, except with “show placeholder”. Image rules are evaluated with the drawn row. Strictly the image of the sample row is otherwise shown only by an image in text and a field with “first(…)” or “last(…)”. |
| Blue dashed placeholder with 🖼 and name | Appears when no image can or should be shown: preview off, short name empty or unknown, image not loaded yet (images from the library are loaded as needed in Dynamics), no value in the sample data or a loading error. It carries 🖼 and the same short form as the image source (short name, path, “File: …”, “Text: …” or “(no image)”) as text and help text. It has the shape of the image, on the box, and rotates along. It is only a design aid, a handle to grab; in print the gray box of “show placeholder” looks different (different color, no label). In the column designer the blue placeholder stays as a handle. |
| Blue dashed box “not printable” | Replaces the image when the print would never print it (see Formats). For a data image this happens as long as “Show image on the canvas” is on. For a fixed image from the library it always happens. The box holds the space like the print. |
| Amber dashed box “not loaded” | Replaces the image of a file field whose fetch was disrupted on the canvas, for example by throttling, a server error, missing access or a network drop. It stays until the next change of the sample record; a retry is not built in. It holds the space like the print. |

[Image: Excerpt of the canvas with three image boxes of equal size side by side. On the left is a real image: a drawn landscape with a blue sky, a yellow sun, green hills and a red house. In the middle is a blue box with a dashed outline, rounded corners and a light blue fill, with the image icon 🖼 and the word “Zweitfoto” in blue type. On the right is a similar blue dashed box with square corners and no icon, with the text “not printable”.]
Caption: Three displays of the canvas: sample image, placeholder and “not printable”.
- Image marker 1: Sample image from the sample record. It serves only to judge the crop and aspect ratio.
- Image marker 2: Blue placeholder with 🖼 and the field name: the sample record has no image for the field “Zweitfoto”. The placeholder is only a design aid and is never printed like this.
- Image marker 3: “not printable”: the image here is a GIF. Only PNG, JPEG and BMP are printed; the box holds the space like the print.

The canvas recalculates fit, position, shape and rotation itself.

### What happens when printing

This section describes when an image is printed. Check the result with your data in the full preview (see Full preview and PDF). The messages the document gives about images are listed with meaning and remedy under Problems and messages: Images and fonts; where they appear and how you read them is explained under Problems and messages: Where the messages appear.

#### Formats

PNG, JPEG and BMP are printed, recognized by the content of the file, not by the name. A PNG with 16 bits per color channel, as some graphics programs save it, is also printed; it is converted to 8 bits for this. Everything else, such as GIF, WebP, TIFF, PDF or SVG, is never printed: the spot stays empty and holds its space. At this spot the canvas shows the dashed box “not printable” (see What the canvas shows). The document reports as a warning `image '…' could not be read by the PDF printer (unsupported format?) …`, for a data image with `image from Tabelle.Spalte` or `image from a data field` instead of the short name. If reading an image in a recognized format fails, the same sentence appears with the name of the error in the parentheses. This applies to library, file column, image column and text field. A file column in Dynamics additionally or instead reports `image from Tabelle.Spalte: the file is not a printable image (only PNG, JPEG and BMP can be printed).`

When uploading to the image library the same three formats apply (see Image library and fonts: The fields of the form). When importing a template, on the other hand, the designer accepts PNG, JPEG and SVG and converts an SVG to a PNG (see Managing templates: Images that come with it).

#### Choosing and loading the source

First the source is chosen, namely the first applicable “Except when” rule with an image, otherwise the image itself. Then it is loaded:

- **Fixed image:** It is looked up in the image library by its short name.
- **Image field in original quality:** The column is fetched individually for each record. The ID of the record comes from the same row as the image. If the table or the ID is missing, the preview image from the row is printed.
- **File field:** It is always fetched individually.
- **Text field:** The image data comes from the row.
- **Empty value:** An image or file field whose value is missing or empty in the row is not fetched; this is reported only with “print nothing and report”. This is the normal case when, of 25 line items, about 23 have no photo.

#### Reducing to print resolution

When a document is created in Dynamics, an image is scaled down to 300 dpi of its print size before embedding so that the PDF stays small. This happens only if it has more than 1.3 times as many pixels in the decisive edge as would be needed. It is never scaled up, the edge stays at least 32 pixels long, and with the fit “Original size” it never happens. A phone photo with a rotation flag is straightened in the process.

#### Space and cropping at the wall

How the wall affects all objects is shown in the table under What the wall does to an object; here is what happens to an image. If the top edge of an image lies beyond the wall of the surrounding group or cell with a fixed height, the image is dropped. If it extends beyond the wall only at the bottom, the box is shortened to the wall and the image is fitted again into the shorter box; the aspect ratio stays. With “fit” the image becomes smaller if the shorter box limits it in height; otherwise it keeps its size and moves up at most, such as a wide logo. With “fill” it is cropped differently, with “Original size” whatever does not fit into the shorter box is dropped at the top and bottom. It is not cut off at the wall itself. A rotated image, on the other hand, is cut off at the wall. The document reports both with the millimeters (“… the box of a picture in it is cut off at that edge by up to … mm, so the picture is fitted into the shorter box …”; rotated: “… a picture in it is cut off at that edge, up to … mm were not printed …”). If it lies entirely below the wall when rotated, it is missing, and the document reports `the rotated element '…' lies completely below the fixed bottom edge around it and was NOT printed. …`. If an unrotated image is dropped because its top edge lies below the wall, the document reports `group '…' has a fixed height of … mm - the element '…' starts below that edge and was NOT printed. …`. At a page break an image moves on as a whole (see At the page edge).

#### Time and size

Images that have to be fetched, so images from the library and record images, run under a clock of at most 30 seconds, less if building the data has already used up a lot of time. When the time is up, images from image columns are printed as a preview image; whatever has no preview image is missing. Images that are already in the row, for example with small quality or from a text field, are printed even after the clock. For large images, notes appear: individually from 4 MB, together from 15 MB. What is measured when creating in Dynamics is what is in the PDF, that is after reducing to print resolution. A large photo in a small box therefore usually triggers no note, but a large image at “Original size” does, because it goes into the PDF unreduced.

### What changes in the document?

**On the canvas:** A fixed image appears with its content, an image from the data as a sample image from the sample record or as a blue placeholder; in a table the same image appears in every row. A field with “first(…)” or “last(…)” shows exactly the image that is printed. Fit, position, shape and rotation are recalculated. Image rules “Except when” follow the sample data; visibility rules have no effect (see Visibility). An image that the print cannot read appears as a box “not printable”.

**In the PDF:** The source chosen by the rules is printed, only as PNG, JPEG or BMP, in the chosen fit, position, shape and rotation. If the image is missing, “If there is no image” decides: nothing, nothing with a note, or a gray box. A missing image takes up no space with “print nothing”; objects below it do not move down because of it and never move up beyond their drawn position. An image is never split (see At the page edge). For an image field in original quality, the small preview image can appear instead of the original, with a note or warning. Hidden images are missing (see Visibility: What happens in the PDF).

---

## Shapes

*For users · Objects · Page en/formen.html*

> **In short:** Shapes are drawn objects and do not display any data. Only their colors can come from the data (through a color variable), and whether they are printed (through a visibility rule). The available shapes are line, arrow, rectangle, circle and ellipse, triangle, star and polygon. They get onto the page through the button “Shapes” in the ribbon, by a click or by dragging, and come with default dimensions and default colors. Every shape has colors, a stroke and a rotation; in addition there is whatever belongs to the shape: the corner radius for the rectangle, the second arrowhead for the arrow, the corners for the polygon. What shapes share with all objects, such as the positioning behavior and the colors, is described once each on its own pages, for example under Positioning behavior and Color field and color picker. This page only mentions what is different for shapes.

### Inserting shapes

The button “Shapes” is in the ribbon in the section “Shapes” between “Containers” and “Codes” (see The ribbon). In the group designer and in the windows of a table cell (column designer, header designer, cell designer) the same button is in the toolbar of the window. This page calls the windows of a table cell “cell designer” for short. The button does not insert anything itself and cannot be dragged, unlike “Text”, “Image” and “Group”. It opens a menu from which you choose the shape.

1. In the ribbon, in the section “Shapes”, click “Shapes”.
   → A menu with eight tiles opens below the button.
2. Click a tile, for example “Rectangle”, or drag the tile to the place you want on the page.
   → The shape appears, is selected and has handles on its edges. After a click the designer briefly reports at the top where it landed; when you drag, there is no message.
3. On the right, under “Properties”, set colors, stroke, size and position.
   → The shape changes immediately on the canvas.

#### The selection menu

The menu appears directly below the button, aligned left with it. It has eight tiles in three rows: “Line”, “Arrow”, “Rectangle” / “Circle”, “Ellipse”, “Triangle” / “Star”, “Polygon”. Each tile shows a small image with the name below it. If you point the mouse at a tile, it shows, for example, “Line – click or drag onto the canvas”; on the button “Shapes” itself it shows “Insert shapes – line, arrow, rectangle, circle, ellipse, triangle, star, polygon”. The menu closes:

- when you click a tile;
- at the end of a drag, including a canceled one;
- when you click one of the two buttons “Shapes” again, the one in the ribbon or the one in the window;
- when you click anywhere outside the menu.

[Image: Excerpt of the designer: at the top the button “Shapes” of the ribbon with the shapes icon above the label, to the right of it the section “Codes” with “Barcode”, “QR code” and, cut off at the edge of the image, “GiroCode”. Directly below the button “Shapes” a white menu with rounded corners and a shadow opens, aligned left. It contains eight tiles in three columns and three rows, each with a small image and the name below it. First row: “Line” (horizontal blue line), “Arrow” (blue arrow pointing right), “Rectangle” (light blue rectangle with rounded corners). Second row: “Circle” (light blue circle), “Ellipse” (light blue ellipse), “Triangle” (green triangle). Third row: “Star” (yellow star) and “Polygon” (violet pentagon); the third cell of the row stays empty.]
Caption: The menu behind the button “Shapes” with its eight tiles.
- Image marker 1: The button “Shapes”. It does not insert anything itself; it opens the menu.
- Image marker 2: The menu with eight tiles in three rows.
- Image marker 3: A tile, here “Rectangle”: a click inserts the shape, dragging puts it where the mouse is.

“Circle” and “Ellipse” create the same kind of object, only with different default dimensions. In the window “Properties” the shape is called “Circle/ellipse”; in the structure tree (see Working on the canvas: The structure) and in the header of a multiple selection it is simply “Ellipse”.

> **Good to know:** The images on the tiles are only symbols. The image on the tile “Rectangle” shows rounded corners and a different fill, the one on the tile “Triangle” is green, the one on the tile “Line” has round ends. What is created is a square-cornered rectangle, a blue triangle and a line with straight ends. The actual defaults are listed under Defaults when creating.

#### Inserting by click

A click on a tile creates the shape, selects it and scrolls it into view. Where it goes and at what height it starts is determined by the insertion rule that applies to all objects (see The ribbon: Where a click inserts). The shape has the dimensions of its tile (see Defaults when creating). If it is to be at a specific place on the page, drag the tile there (see Inserting by dragging).

If the shape goes into a group with a fixed height and is taller than the space down to the bottom edge, it extends beyond it. In the PDF it is cut off there, an unrotated rectangle is shortened; the document reports it (see Fixed height of the group). Then move it up, or turn on “Automatic height (fit to content)” on the group.

After inserting, the designer briefly reports where the shape went (wording under Messages about shapes). In the group designer and in the cell designer the message appears in the window itself.

#### Inserting by dragging

Drag a tile onto the canvas with the mouse button held down and release. The top left corner of the shape lands at the mouse position, rounded to 0.5 mm. The tile brings its dimensions with it, that is 24 × 24 mm for the circle and 36 × 22 mm for the ellipse. Whether the shape goes into a group or onto the page as its own object depends on what you release over (see The ribbon: Dropping by dragging); how much of a group on the page counts as a target is explained under Groups: Which area of the group counts. In the group designer and in the cell designer the shape goes into the open group or cell; if you release over a group inside it, it goes into that group. If you release over a text or a table cell, the same rule applies. There is no message when you drop.

While you drag, the target group gets a blue dashed border and a light blue tint. At page level a blue insertion line can also appear (see Working on the canvas: The insertion line).

#### Defaults when creating

Every shape starts with fixed dimensions and colors. The size is that of the box that the width and height span (see The fields in detail).

| Shape | Size (width × height) | Colors | Thickness |
|---|---|---|---|
| “Line” | 50 × 4 mm | Color #2B4CC4 (blue) | 1.5 pt |
| “Arrow” | 50 × 8 mm | Color #2B4CC4 (blue); one arrowhead, on the right | 1.5 pt |
| “Rectangle” | 40 × 15 mm | Background #F5F7FC (very light blue), border #2B4CC4 (blue); square corners | 0.75 pt |
| “Circle” | 24 × 24 mm | Background #DCE6FA (light blue), border #2B4CC4 (blue) | 1 pt |
| “Ellipse” | 36 × 22 mm | Background #DCE6FA, border #2B4CC4 | 1 pt |
| “Triangle” | 30 × 26 mm | Background #DCE6FA, border #2B4CC4 | 1 pt |
| “Star” | 28 × 28 mm | Background #FDE9B8 (light yellow), border #C9971A (ocher) | 1 pt |
| “Polygon” | 30 × 28 mm | Background #E7DAF5 (light violet), border #6B3FA0 (violet); regular pentagon, point at the top | 1 pt |

[Image: Excerpt of the canvas with eight shapes in three rows, each with its name below it in small gray type. First row from left to right: “Line”, a horizontal blue line; “Arrow”, a blue arrow pointing right with a filled head; “Rectangle”, a square-cornered, very light blue rectangle with a thin blue border. Second row: “Circle”, a light blue circle with a blue edge; “Ellipse”, a wider light blue ellipse with a blue edge; “Triangle”, a light blue triangle with a blue edge and the point at the top. Third row: “Star”, a five-pointed light yellow star with an ocher edge; “Polygon”, a light violet pentagon with a violet edge and the point at the top.]
Caption: The eight shapes as they look after inserting.

The line style is solid for all shapes except the rectangle, which has none; the rotation is empty for all, so 0°. You change all values afterward in the window “Properties”.

Every new shape also explicitly carries the positioning behavior “Flowing on contact”, whether by click or by dragging, on the page as well as in a group or cell. Which behavior an existing shape has that you drag into a group is explained under Positioning behavior: What a new object starts with and Positioning behavior: What changes when you drag in and take out.

### The properties window of a shape

If exactly one shape is selected, its window is on the right under “Properties”. How the window is built in general and which sections appear for which object is explained in The properties window. At the top a blue marker shows the name of the shape: “Line”, “Arrow”, “Rectangle”, “Circle/ellipse”, “Triangle”, “Star” or “Polygon” (see The properties window: The header of the window).

[Image: Excerpt of the right column “Properties” of the designer. At the top is the blue marker “Rectangle”. Below it two tabs: “General” (selected, underlined in blue) and “Position & size”. Next comes the section “Style” with these fields from top to bottom: “Background” with a very light color swatch and the color code #F5F7FC, “Border” with a blue color swatch and the color code #2B4CC4, “Border (pt)” with the value 0.75, “Corner radius (mm)” with the value 3 and “Rotation (°)” with an empty field. Each label carries a small ⓘ. Below it follows the section “Visibility” with a checkbox “Turn visibility rules on/off”.]
Caption: The properties window of a rectangle, “General” tab.
- Image marker 1: The label names the shape.
- Image marker 2: The tabs. The one chosen last stays selected when the window is redrawn.
- Image marker 3: Background and border: each a color swatch and a text field with the color code.
- Image marker 4: The corner radius rounds the corners. Empty means square-cornered.
- Image marker 5: The rotation around the center of the box, clockwise.
- Image marker 6: The section “Visibility”: here you can set the condition under which the shape is printed.

#### Where the fields are

Which sections are on which tab is shown in the table under The properties window: Which sections are where. For shapes, the following applies in addition:

- **Directly on the page,** the fields of the shape are on the “General” tab, in the section “Style”. For line and arrow, “Line style” is followed by the field “Rotation (°)” and, for the arrow, then “Arrowhead at both ends”; for the rectangle, “Corner radius (mm)” comes before “Rotation (°)”. For the polygon the section “Corners” comes after that. For all shapes, the section “Visibility” comes last on the “General” tab. On the “Position & size” tab there is the checkbox “Keep together at page break” for the unrotated rectangle, otherwise a note about it (see The rectangle at the end of the page). The general note at the end of the tab is explained under Position directly in the document. Under both tabs the section “Actions” with “🗑 Delete block” comes last.
- **In a group or table cell** there are no tabs. The section “Position & size” is at the very top (after “⬆ Take out of group”, which appears only in a group) and also contains “Rotation (°)”. After that comes “Style”. For the arrow, “Arrowhead at both ends” comes after “Line style”; for the rectangle, “Corner radius (mm)” is the last field; for the polygon the section “Corners” follows. After that come “Positioning behavior” (without “Move along”), “Arrangement”, “Order in the group” and the visibility without its own heading; at the very bottom is the section “Actions” with “🗑 Delete element”.

#### Which shape has which field

| Shape | Own fields | Special features |
|---|---|---|
| “Line” | “Color”, “Thickness (pt)”, “Line style”, “Rotation (°)” | In a group and a cell, “Width” is called “Length” here. The height is not the thickness of the line. |
| “Arrow” | like the line, plus “Arrowhead at both ends” | Shaft with a filled arrowhead. |
| “Rectangle” | “Background”, “Border”, “Border (pt)”, “Corner radius (mm)”, “Rotation (°)” | No line style. The only shape that can be split at the end of the page (see The rectangle at the end of the page). |
| “Circle/ellipse” | “Background”, “Border”, “Border (pt)”, “Line style”, “Rotation (°)” | No corner radius. |
| “Triangle” | like circle/ellipse | No corner radius. |
| “Star” | like circle/ellipse | No corner radius. |
| “Polygon” | like circle/ellipse, plus the section “Corners” with “Corner” and “－ Corner” | No corner radius. Corners can be dragged on the canvas (see Dragging the corner points). |

All seven shapes also have “X (mm)”, “Y (mm)”, “Width”, “Height”, positioning behavior, arrangement, visibility and deleting (see What applies to shapes as to all objects). No field of a shape is grayed out; only the shared field “Minimum gap above (mm)” can be.

#### The help behind the fields

Behind most shape fields is a small ⓘ; how the help opens and closes is explained under The properties window: Sections, collapsible areas and the ⓘ.

- With ⓘ: “Color” (title “Line color”), “Thickness (pt)” and “Border (pt)” (both with the title “Border thickness (pt)”), “Line style”, “Arrowhead at both ends”, “Rotation (°)”, “Background”, “Border” (title “Border color”) and “Corner radius (mm)”. Except for “Color” and “Border”, the help shows small example images.
- Without ⓘ: “X (mm)”, “Y (mm)”, “Width” and “Length”, “Height”, “Corner” and “－ Corner”.
- The help text for “Background” speaks only of “this group or cell”; it applies equally to shapes.

### The fields in detail

Every shape sits in a box, the rectangle that the width and height span. The box is invisible; a click always hits the whole box, not just the drawn area. The table names each field with what it does and its default. Fields that all objects share are mentioned only briefly and refer to the page that explains them.

| Setting | What it does | Default |
|---|---|---|
| “X (mm)” and “Y (mm)” | Position of the top left corner of the box, on the page as in a group or cell (see Position directly in the document and Position in a group or cell). | Click: X 2 mm; dragging: mouse |
| “Width”, for line and arrow in a group and cell “Length” | Width of the box in millimeters; for line and arrow the length of the segment. For the polygon, all corners move along. See Length, width and height. | depends on the shape |
| “Height” | Height of the box in millimeters; for the height of line and arrow see Line and arrow. A shape has no checkbox “Automatic height (fit to content)”; its height is always fixed (see Automatic height and limits). | depends on the shape |
| “Rotation (°)” | Rotates the shape around the center of the box, clockwise. Available for all seven shapes. See Rotation for shapes and Rotation. | empty (0°) |
| “Color” | Only for line and arrow: the color of the stroke, for the arrow also the fill color of the arrowheads. See Colors for shapes. | #2B4CC4 |
| “Thickness (pt)” | Only for line and arrow: the thickness of the stroke in points. See Thickness and border (pt). | 1.5 |
| “Line style” | How the stroke is drawn: “solid”, “dashed” or “dotted”. See Line style. | solid |
| “Arrowhead at both ends” | Only for the arrow: turns it into a double arrow. See The arrowhead. | off |
| “Background” | The fill color of rectangle, circle/ellipse, triangle, star and polygon. Empty means: only the outline, the area is transparent (see Border and background: What the fields do). | depends on the shape |
| “Border” | The color of the border or outline of these five shapes. Empty means: no border. | depends on the shape |
| “Border (pt)” | The thickness of the border in points. See Thickness and border (pt). | 0.75 (rectangle), otherwise 1 |
| “Corner radius (mm)” | Only for the rectangle: rounds the corners of the area and the border. See Rounded corners. | empty (square-cornered) |
| “Corner” and “－ Corner” | Only for the polygon: add a corner point or remove the last one. See The buttons in the Corners section. | 5 corners |

#### Length, width and height

- **Limits in the field:** step 0.5 mm, at most 5000 mm, no lower limit. An empty field counts as “no value”; therefore always enter a number greater than 0 for width and height. The limits when dragging with the handles are explained under Working on the canvas: Size handles.
- **Aspect ratio:** It is not preserved when dragging. For an exact circle or a square, enter the same value for width and height.

#### Rotation for shapes

The effect, space requirement and limits of rotation are explained in Position, size, rotation and arrangement: Rotation. For shapes, the following applies in addition:

- **The position in the width:** The field “X (mm)” applies to the unrotated box, and the rotation is around its center. A line rotated by 90° therefore stands vertically, in the horizontal middle of its previous box: if a 40 mm long line began at X = 10 mm, it stands at 30 mm when rotated; the field “X (mm)” still says 10.
- **Consequences for individual shapes:** The corners of a polygon can only be dragged at rotation 0. A rotated rectangle loses the checkbox “Keep together at page break”, because a rotated shape is never split (see At the page edge: The note instead of the checkbox). At a fixed group wall, a rotated shape is cut off instead of shortened (see Fixed height of the group).

#### Colors for shapes

“Color”, “Background” and “Border” consist of a color swatch and a text field with the placeholder “none”. Valid color codes, the color picker, empty and invalid fields and color variables are explained in Border, background and colors: Color field and color picker. For shapes, the following applies:

- **Empty:** For “Background” and “Border”, what Empty color field explains applies. For “Color” of line and arrow something different applies, see the box below.
- **Invalid:** For line and arrow the whole shape is missing, but its space stays free; more under Invalid color. The PDF reports the invalid value (see Problems and messages: Numbers, dates and values).
- **Color variable:** If it gives no color with the real data, the whole shape is likewise missing for line and arrow; more under Color from a variable.

> **Caution:** For line and arrow, the canvas and the PDF draw black when the field “Color” is empty, although the field says “none”. This also applies if you choose “No color” in the color picker. If a line is not to appear, set “Thickness (pt)” to 0.

#### Thickness and border (pt)

“Thickness (pt)” for line and arrow and “Border (pt)” for the other shapes are the same setting: the thickness of the stroke in points. Limits, defaults, an empty field and the 0 are explained in Border and background: What the fields do. For shapes there is one more thing: at 0 the box stays clickable and keeps taking up its space, even for the arrow, which then disappears completely. What looks different on the canvas and in the PDF is explained under Canvas and PDF compared.

#### Line style

- **Choices:** “solid”, “dashed”, “dotted”. The help window shows three example images and recommends dashed or dotted strokes for subtle dividing or fold lines.
- **Where:** for line, arrow, circle/ellipse, triangle, star and polygon. For the arrow only the shaft is patterned; the arrowheads stay filled. The rectangle has no line style, neither in the window nor in print: its border is solid in both.
- **Canvas:** fixed patterns that do not grow with the thickness: dashed with short dashes and gaps, dotted with round dots.
- **PDF:** The pattern depends on the thickness. Dashed: the dash is three times and the gap twice as long as the thickness. Dotted: the dash is once and the gap twice as long as the thickness.
- **Consequence:** Because the patterns are formed differently, a dashed or dotted line can look different on the canvas than in the PDF, especially at large thickness. Check such lines in the “Full preview”.

### Line and arrow

Line and arrow are a horizontal segment that runs through the middle of their box. The length of the segment is the width of the box. You set the thickness with “Thickness (pt)”; the height of the box has nothing to do with it: it determines where the segment lies, how much height it takes up on the page and around which point it is rotated. In the PDF the line runs from left to right through the middle of the box and is rotated around the center of the box. Color, thickness and line style are explained in Colors for shapes, Thickness and border (pt) and Line style; those also explain why a dashed line can look different on the canvas than in the PDF.

1. Insert a “Line” through “Shapes”.
   → The line lies horizontally, 50 mm long.
2. Enter 90 under “Rotation (°)” (directly on the page on the “General” tab, in a group or cell at the top under “Position & size”), or drag the rotation handle above the line to 90° while holding Shift.
   → The line stands vertically, in the horizontal middle of its previous box. It now takes up 50 mm of height; flowing objects below it move down accordingly (see Rotation).
3. If needed, change the length under “Width” (directly on the page on the “Position & size” tab; in a group the field is called “Length”) and the position under “X (mm)”. The vertical line stands at X plus half the length.
   → A vertical dividing line of the length you want stands in its place.

#### The arrowhead

- **Shape:** The arrowhead is a filled triangle in the stroke color at the right end. It is a good quarter as long as the arrow (28 % of the length), but at least 4 mm and at most 11 mm; its width is 85 % of its length. The arrowhead depends neither on the height of the box nor on the thickness. In the PDF the dimensions are the same.
- **Direction:** The arrow points left, up or down only if you rotate it: 180° for left, 270° or −90° for up, 90° for down.
- **Double arrow:** “Arrowhead at both ends” adds a second arrowhead on the left, and the shaft runs between the arrowheads. For arrows shorter than 8 mm the two arrowheads overlap, because each is at least 4 mm long.
- **Stroke:** Color, thickness and line style apply to the shaft. At “Thickness (pt)” 0 the whole arrow disappears, including the arrowheads.

[Image: Excerpt of the canvas with five blue arrows side by side, each with its label below it in small gray type. The first arrow (“0° (default)”) lies horizontally, the head points right. The second (“90°”) stands vertically, the head points down. The third (“180°”) lies horizontally, the head points left. The fourth (“270°”) stands vertically, the head points up. The fifth (“Arrowhead at both ends”) lies horizontally and has a filled head on the left and on the right.]
Caption: The direction of the arrow depends on the rotation. Rotation is clockwise.

> **Good to know:** If you open an older template that contains a line with a start point and an end point, the designer converts it into a box when opening; the stroke stays where it is printed, even near the left or top edge of a group or cell and in the header or footer. Only a horizontal line directly in the document that lies less than 2 mm below the top edge of the printable area stands up to 2 mm lower after saving, because a box cannot begin above the edge there.

### Rectangle

The rectangle has an area and a border. Unlike text and group, it has neither a checkbox “Turn on border” nor “Border lines (sides)” (see Border, background and colors: What the fields are called): the border is always all the way around and appears as soon as a color and a thickness greater than 0 are present. Without a border, empty the color or set the thickness to 0. In the PDF the border sits centered on the edge, on the canvas entirely inside (see Where the line sits); how to get the rectangle to exact outer dimensions in the PDF is explained under Canvas and PDF compared.

> **Tip:** A rectangle works well as a colored backdrop for a text. If both lie directly in the document and the rectangle covers enough of the area of the text, the text moves along with it when the document is created (see Move along; that page also says from what point).

#### Rounded corners

The field “Corner radius (mm)” rounds the corners of the area and the border (see Border and background: What the fields do). The step is 0.5, the highest value 5000; values of 0 or less mean square-cornered. Among the shapes the field appears only for the rectangle. Its help text also mentions text objects, groups and tables; for the rectangle the first paragraph applies.

The same setting controls the yellow diamond on the canvas (see Working on the canvas: Rotation, rounding and corner point handles). It sits at the top edge of the selected rectangle, on the page, in a group and in a cell. When you drag, the diamond moves to the right with the radius. The radius changes in steps of 0.5 mm; the grid has no effect here. At 0 the field is empty again.

#### The rectangle at the end of the page

The unrotated rectangle is the only shape that can be split at the end of the page. Directly in the document it has the checkbox “Keep together at page break”; it is missing for “Fixed position” and for a rotated rectangle (see At the page edge: Where the checkbox is).

[Image: Three views side by side, each with a heading. On the left “Canvas”: a light blue rectangle with a blue edge stands at the bottom of the page and extends beyond the page edge; it is drawn as one continuous rectangle. An orange dashed line with an orange hatched strip below it shows where the printable area ends. In the middle “PDF, page 1”: at the bottom of the page is a flatter light blue rectangle with a closed border all around; below it a white strip remains to the page edge. On the right “PDF, page 2”: at the top of the next page is a second light blue rectangle, likewise with a closed border all around and with no connection to the first. Gray strips at the bottom edge of the first two views and at the top edge of the third show the area outside the page.]
Caption: Canvas on the left, PDF on the right: with “Keep together at page break” unchecked, the rectangle is split at the end of the page, and each piece has its own border.
- Image marker 1: On the canvas the rectangle stands in one piece. The orange hatched strip shows how far it extends beyond the end of the printable area.
- Image marker 2: In the PDF the first piece ends at the end of the printable area, with a closed border.
- Image marker 3: The second piece begins at the top of the next page, likewise with its own border.

- **Checked** (default): If the rectangle no longer fits on the page at the bottom, it moves to the next page as a whole.
- **Unchecked:** The rectangle may be split at the end of the page. How the border and rounded corners of the pieces look is explained under Border, background and colors: Across several pages.
- **Exceptions:** Separate rules apply to the first object on a page and to a rectangle that is taller than a whole page (see At the page edge: The first object on a page).
- **All other shapes** and the rotated rectangle do not have the checkbox. Instead, a note appears on the “Position & size” tab (see At the page edge: The note instead of the checkbox); what happens to them at the page edge is explained under At the page edge: What happens at the page edge.
- **In a group** something different applies, see Group across several pages.

### Circle and ellipse

“Circle” and “Ellipse” are the same kind of object. The shape fills the whole box: the center is the center of the box, the radii are half the width and half the height. If width and height are equal, the shape is a circle, otherwise an ellipse. The outline sits centered on the edge, on the canvas as in the PDF (see Where the line sits).

### Triangle

The triangle is isosceles: the apex is at the top in the middle, the base at the bottom across the full width. The corners are always pointed. You get other orientations through rotation: with “Rotation (°)” 180 the apex points down, with 90 to the right. Rotation is around the center of the box.

### Star

The star has five points, one of them at the top. The inner corners are at about 42 % of the radius of the points. The number of points cannot be set; draw a star with a different number of points as a “Polygon” by adding and dragging corners. If width and height differ, the star is stretched; the radius is half the width or half the height.

### Polygon

The polygon is a freely designable area. It begins as a regular pentagon with the point at the top; you drag the corners, add some or remove some. The corners are given as a percentage of the box. If you change the width or height, the shape moves along. The fields are in the overview, the position of the section “Corners” under Where the fields are.

#### The buttons in the section “Corners”

- “Corner” (button with a square symbol): Inserts a corner point in the middle of the longest edge. The shape still looks the same afterward until you drag the new point. There is no upper limit on the number of corners. The button also works for a rotated polygon.
- “－ Corner”: Removes the corner point that comes last in the order of the points of the shape, not necessarily the one added last. At least three corners remain; with three corners nothing happens, without a message. The help text of the button reads “Remove the last corner (min. 3)”.
- Below the buttons is the gray note “Drag corners directly on the canvas · double-click a corner to remove it.” It does not say that the corner points appear only at rotation 0.

#### Dragging the corner points

On the selected polygon, a violet dot with a white edge sits on every corner. It appears only if the rotation is empty or 0.

[Image: Excerpt of the canvas with a selected polygon: a light violet body with a violet edge that looks like a pentagon with the point at the top but has an additional sixth corner in the middle of the top right edge. A violet dot with a white edge sits on each of the six corners. Around the whole shape is a blue frame with small square handles on the left, right, bottom and bottom right. Above the middle of the top edge, on a short stem, is a small circle, the rotation handle.]
Caption: A selected polygon. A violet dot for dragging sits on every corner.
- Image marker 1: A corner point: dragging moves the corner, a double-click removes it (at least three remain).
- Image marker 2: The rotation handle. As soon as the polygon is rotated, the corner points disappear.
- Image marker 3: A handle changes width and height; all corners move along.

- **Dragging** moves the corner; the help text reads “Drag: move corner · double-click: remove corner”.
- **Double-click** on the corner removes it; at least three remain.
- **Limits:** The point stays in the box, from 0 to 100 % in steps of 0.1 %. The grid has no effect here.
- **Crossing** is allowed, for example for a butterfly or a pentagram. If an area is circled twice in the process, such as in the middle of a pentagram, it stays empty, on the canvas as in the PDF.
- **Rotated polygon:** Set “Rotation (°)” to 0 temporarily, change the corners and then rotate the shape again.

1. Insert a “Polygon” through “Shapes”.
   → A pentagon with the point at the top appears; a violet dot sits on every corner.
2. Under “Corners”, click “Corner” to add a corner, and drag the new point to the place you want.
   → The polygon has one more corner and follows your shape.
3. Remove an unnecessary corner by double-clicking its point.
   → The shape closes between the remaining corners.

### Handles and special handles

The handles on a selected shape are described in general in Working on the canvas: Handles; rotation handle, diamond and corner points are there under Rotation, rounding and corner point handles. For shapes, the following applies:

- **Handles:** Line and arrow have only the left and the right one; they change the length. You change the height there only through the field “Height”. The other shapes have four on the page, eight in a group or cell.
- **Rotation handle:** on all seven shapes; it writes to “Rotation (°)” (see Rotation for shapes).
- **Diamond:** only for the rectangle (see Rounded corners).
- **Corner points:** only for the polygon (see Dragging the corner points).
- **Selecting and operating:** A click anywhere on the box selects the shape. Only a double-click on a corner point does anything: it removes the point. Moving, arrow keys, Del, Ctrl+C, Ctrl+X, Ctrl+V, Ctrl+D, Ctrl+Z and Ctrl+Y work as for any object (see Working on the canvas: Moving, snapping, attaching and detaching, Working on the canvas: Keys on the selected object and Keyboard shortcuts).

### What applies to shapes as to all objects

This also applies here: all objects have these settings, and each is explained on its own page. The table gives the default for shapes, briefly says what is different for shapes, and refers to the explanation.

| Setting | Default here | Explained in |
|---|---|---|
| Positioning behavior (“Behavior” in the section “Positioning behavior”) | “Flowing on contact”, also in a group or cell, although the list entry there is called “Fixed position (default)” | Positioning behavior and Positioning behavior: What a new object starts with |
| Move along (“Move along with the object below”) | checked; the calculation uses the box, not the visible shape | Positioning behavior: Move along |
| “Minimum gap above (mm)” | no value; grayed out for “Flowing” directly in the document | Positioning behavior: Minimum gap above and Positioning behavior: Which gap applies where |
| “Layer order” with “⤒ Bring to front”, “⤓ Send to back”, “↑ Bring forward” and “↓ Send backward” | 0 (nothing set); because new shapes avoid each other, the yellow note that the rank only has an effect where objects overlap usually appears right below it | Position, size, rotation and arrangement: The layer order |
| “Keep together at page break” | only for the rectangle, where it is checked | The rectangle at the end of the page and At the page edge: Where the checkbox is |
| “Order in the group” with “⇤ To the start”, “⇥ To the end”, “← One step earlier” and “→ One step later” | order of creation; only in a group or cell with at least two objects | Position, size, rotation and arrangement: Order in the group |
| “Turn visibility rules on/off” with “↳ Edit rule” | always visible | Visibility |
| “⬆ Take out of group” | –; only for a shape in a group, not in a cell | Groups: Taking objects out and Positioning behavior: What changes when you drag in and take out |
| “🗑 Delete block” (on the page) and “🗑 Delete element” (in group and cell) | –; on the page the window “Please confirm” asks first | Working on the canvas: Copying, pasting and deleting |
| Indicators on the canvas (blue frame, ⇕, orange frame with warning sign, hatched strip at the page edge) | –; also appear on shapes, but only on the canvas | Working on the canvas: Markings and warning signs on the canvas |

#### Selecting several shapes

How the multiple selection works is explained under Working on the canvas: Several objects at once. For shapes, the following applies:

- “Border color” and “Border thickness (pt)” set, for line and arrow, the fields that are called “Color” and “Thickness (pt)” individually, and for the other shapes “Border” and “Border (pt)”. With a line or an arrow in the selection, “Fill color” is missing.
- A “Line style” never exists in the multiple selection. If no style field fits all selected objects, it says “No common style properties for this selection.”
- “Align”, “⇳ Distribute vertically”, “⇿ Distribute horizontally”, “⧉ Copy” and “🗑 Delete” apply as for all objects. For shapes, the unrotated width counts, and as the height the space requirement of the rotated shape.

### Shapes in groups and table cells

Shapes can be placed in a group and created in the group designer (see Groups: Objects in and out and Groups: The group designer), likewise in the cells of a table: in the column designer of a data table (see Cells, header row and page break: Designing with a double-click) and in the cell designer of a free-form table (see Cells, header row and page break: Designing cells). The target of a new shape is explained under Inserting by click, its layout in the window under Where the fields are and its positioning behavior under Defaults when creating. For shapes, the following also applies there:

- **Line in a group:** A line, not the arrow, does not count there. Other objects do not snap to it when dragging and resizing, and it does not stop the group when you make it narrower or shorter: the group can become smaller than the line reaches.

#### Fixed height of the group

What the fixed bottom edge of a group, a cell or a table row does to the individual objects is shown in the table Position, size, rotation and arrangement: What the wall does to an object; where the PDF cuts off otherwise is explained under The fixed bottom edge and where the PDF cuts off. For shapes, the following applies:

- **Unrotated rectangle:** It is shortened: the box ends at the edge, including its border. The PDF cuts off all other unrotated shapes at the edge. The document reports both with the missing millimeters; if the stroke of a line lies below the edge, it is missing entirely, and that is also reported.
- **Rotated shape:** It is cut at the edge, and the document reports it; its box stays whole. If it lies entirely below, it is not printed, and the document reports it.

#### Group across several pages

If a group runs across a page edge, an unrotated rectangle in it is cut along with it, one piece per page. Circle/ellipse, triangle, star, polygon and rotated shapes are not cut through: if one of them extends beyond the edge, it begins the piece on the next page. Lines are exempt from this rule, including the stroke of an arrow. Whether a group is split at all and what happens to a shape that is taller than a whole page is explained under At the page edge: Images, shapes and lines in a split block and At the page edge: The checkbox “Keep together at page break”.

### Canvas and PDF compared

The canvas shows shapes almost like the PDF. The “Full preview” or the PDF is always authoritative. What applies to all objects, for example for color variables, visibility rules, the page edge and the indicators on the canvas, is explained under Full preview and PDF: What the canvas shows differently from the PDF. For shapes these differences come in addition:

| Topic | Canvas and PDF |
|---|---|
| Position of the border for the rectangle | In the PDF the rectangle is larger on the outside by one stroke thickness than on the canvas (see Where the line sits). The help for “Border (pt)” points this out. If the rectangle is to have exactly the outer dimensions you entered in the PDF, reduce width and height by the border thickness (1 pt corresponds to about 0.35 mm) and increase X and Y by half the border thickness; on the canvas it then looks correspondingly smaller. |
| Line style | The canvas shows fixed patterns, the PDF patterns that grow with the thickness (see Line style). |
| Thickness 0 and empty thickness | No difference (see Thickness and border (pt)). In the PDF exactly the set thickness applies; only the display has a minimum thickness so that very thin strokes stay visible. |
| Polygon | The fill rule is the same: an area circled twice stays empty. A polygon with fewer than three corners, for example from an imported template, is shown by the canvas as a pentagon, by the PDF not at all. As soon as you select it once unrotated, the pentagon is in the template and is also printed. A click on “Corner” also writes it into the template, then right away with a sixth corner. |

### Messages about shapes

The designer’s short messages appear at the top in the middle. The print warnings that arise when a document is created are mostly in English; how to deal with them is explained under Problems and messages. For shapes you will find their wording with meaning and remedy under Problems and messages: Numbers, dates and values (invalid color code) and under Problems and messages: Pages and space (shape below the fixed height of a group, shape shortened or cut at the fixed bottom edge, rotated shape below the fixed bottom edge, shape beyond the paper edge). The messages when dragging into or out of a group, when typing a position under “Y (mm)” where a header or footer lies, and for the buttons for the layer order apply to all objects (see Working on the canvas: Into and out of a group, Position directly in the document and The layer order).

| Message | When it appears | What you can do |
|---|---|---|
| “Line inserted – freely movable.” or “Line inserted at the bottom of the document – now selected, freely movable.” | After inserting by click, for 2.8 seconds: the first when the target is in a group or cell, the second without such a target. It appears on every click insert, even if something was selected before, and never when dragging. Instead of “Line” it shows the name of the tile. | Nothing; it only says where the shape went. |

### What changes in the document?

**On the canvas:** Shapes are drawn with their colors, strokes and rotations. Stroke patterns have fixed sizes, and the border of a rectangle sits entirely inside (see Where the line sits). What applies to all objects, such as color variables, visibility rules, handles and indicators, is explained under Full preview and PDF: What the canvas shows differently from the PDF.

**In the PDF:** Lines, areas and outlines appear with the exact thickness, the outline centered on the edge. Rotated shapes take up the height from the highest to the lowest corner (see Rotation); only an unrotated rectangle is split at the end of the page, all other shapes move on as a whole. A shape that begins below the fixed height of a group is missing in the PDF; where the PDF cuts off otherwise is explained under Where the PDF really cuts off.

---

## Barcode, QR code and GiroCode

*For users · Objects · Page en/codes.html*

> **In short:** A code is an object like an image: a box in which Smart Templates draws a barcode, a QR code or a GiroCode (the EPC QR code for SEPA transfers) when the document is generated. The content is a variable, that is a field or a custom variable, a fixed text such as a web address, or a value with if-then; in the “Properties” window a variable appears as a blue placeholder. A double-click on the code asks for the content or opens what is stored; for the GiroCode it opens a window with all fields. The code is fitted print-sharp and never split. If it cannot be formed from the data of a document, it is not printed, its place stays empty, and the document reports it. Only a visible GiroCode that is invalid prevents the whole document. A hidden code is not checked; its values may then be empty.

### What a code is

A code consists of a box and a content. The box has a width and a height and sits at a place on the sheet, in a group or in a table cell. The content is a text that a scanner or an app reads from the code: a document number, an item number, a link or the data of a transfer. The three buttons in the ribbon all create the same object; they differ in the type of code:

| Button | Type | What for |
|---|---|---|
| “Barcode” | Barcode: Code 128, EAN-13, EAN-8, Code 39 or ITF (see The barcode types and their characters) | Document numbers, item numbers, for example the EAN per line item on a delivery note. |
| “QR code” | QR code (see The QR code) | Links, texts and numbers that a phone reads. |
| “EPC QR code (GiroCode)” | GiroCode (EPC QR code per EPC069-12, known in Germany as GiroCode; see The GiroCode) | A transfer in euros: The customer’s banking app reads beneficiary, IBAN, amount and remittance text and fills in the transfer. |

[Image: A group with a light blue background and a blue dashed edge. At the top left the bold heading “So bezahlen Sie”. Below it three codes side by side, each on a white area: on the left a square QR code with the caption “GiroCode: Überweisung in der Banking-App”, in the middle a somewhat smaller QR code with the caption “QR-Code: Rechnung online ansehen” and on the right a barcode with the plain text “RE-2026-1042” and the caption “Rechnungsnummer als Strichcode”.]
Caption: A payment group on an invoice with all three codes. Name, IBAN and numbers are invented.
- Image marker 1: A GiroCode of 32 × 32 mm. Beneficiary, IBAN, amount and remittance text come from fields.
- Image marker 2: A QR code of 26 × 26 mm with a link that contains the document number.
- Image marker 3: A barcode (Code 128) with the document number and the plain text below it.

You can use a code anywhere an image may stand: directly in the document, in a group, in the header and footer and in a table cell. The names “GiroCode” and “QR Code” and the note on the trademarks are under Names and trademarks.

### Inserting a code

The ribbon has the section “Codes” with the buttons “Barcode”, “QR code” and “EPC QR code (GiroCode)”, to the right of “Shapes” and to the left of “Tables”. A code is created immediately, without asking, and is selected afterwards.

[Image: Excerpt from the ribbon. On the left the button “Shapes” with the section name “Shapes” below it. To the right of it the section “Codes” with three buttons: “Barcode” with a symbol of vertical bars, “QR code” with a symbol of three corner squares and small dots and “EPC QR code (GiroCode)” with a similar symbol with a blue circle with a euro sign in its lower right corner. Below it is the section name “Codes”.]
Caption: The “Codes” section in the ribbon.
- Image marker 1: “Barcode” creates a barcode.
- Image marker 2: “QR code” creates a QR code.
- Image marker 3: “EPC QR code (GiroCode)” creates a QR code for SEPA transfers.

| Way | What happens |
|---|---|
| Ribbon, section “Codes”: click one of the three buttons | The code is created in the same place as an image after a click on “Image” (see The ribbon: Where a click inserts). |
| Drag one of the three buttons onto the sheet | The code is created at the drop point. Whether it goes into a group or is created as an object of its own on the sheet depends on what you release over (see The ribbon: Dropping by dragging and Groups: Which area of the group counts). |
| Group designer, column designer and cell designer: section “Codes” in the window’s ribbon | Works as in the main window. The code goes into the opened group or cell; when dragged, it lies at the mouse position (see The ribbon in the group designer). |

The type can later be changed only within the barcodes: For a barcode you choose another barcode under “Type”. A barcode does not turn into a QR code or vice versa; to do that, delete it and insert the other code.

#### The document number as a barcode

1. In the ribbon, in the “Codes” section, click “Barcode”.
   → A barcode of 50 × 15 mm lies on the sheet and is selected. On the right, the “Properties” window shows the label “Barcode”. On the canvas the box shows a gray pattern with the sentence “Sample — empty with the sample record” because no content has been entered yet.
2. Double-click the code.
   → The window “What should go into the barcode?” asks for the content (see The double-click on a code).
3. Click “Fixed variable” and, in the “Choose variable” window, choose the field with the document number.
   → In the “Content” field the document number appears as a blue placeholder with its name, for example “Rechnungsnummer”. Below it is “Result with the sample record:” with the number, and on the canvas the code appears with the number as plain text below it. Instead of the double-click, the button “Variable” under “Content” also leads to the same window.
4. Adjust size and position: Drag the code’s handles, or enter width and height in the “Position & size” tab.
   → The code fills the box as far as print-sharp fitting allows (see Fitted print-sharp).
5. Check the result in the full preview (see Full preview and PDF).
   → Every record shows its own code. If the code cannot be formed from the data of a document, nothing appears at that place, and the document reports the reason.

#### Inserting a GiroCode for the invoice

1. In the ribbon, in the “Codes” section, click “EPC QR code (GiroCode)”.
   → A GiroCode of 30 × 30 mm lies on the sheet and is selected. On the right are the fields of the transfer. The amount and the remittance text are prefilled if the primary source knows the matching fields; beneficiary and IBAN are empty and outlined in red.
2. Double-click the code.
   → The GiroCode window opens with all fields, the check and the appearance; at the top is the button “Visibility …” (see The double-click on a code). The same fields are also on the right in the “Properties” window.
3. Under “Beneficiary” enter the name of the account holder, usually your company name, and under “IBAN” your IBAN. If both are in fields or custom variables, choose them with the button with the curly braces.
   → The borders are no longer red; a chosen variable appears as a blue placeholder in the field. If something is still missing or invalid, a red line with the reason appears under the field.
4. If the code should be missing for credit notes or without payment, click “Visibility …” and create a rule, for example “only if the amount is greater than 0”.
   → At the top of the window it says “Printed only if:” with the rule. If the code is hidden, it is not checked.
5. Check “Amount” and “Remittance text”. The amount must be a field without a formatter, for example `{{totalamount}}`, or a custom variable of type number or currency.
   → Expanded, “Content of the code” shows what the code contains and how many of the permitted 331 bytes it is.
6. Check the code in the full preview, and scan it with a banking app.
   → The app shows beneficiary, IBAN, amount and remittance text.

#### What a new code starts with

| Button | Box | Settings |
|---|---|---|
| “Barcode” | 50 × 15 mm | Type Code 128; “Human-readable text below the code” on at 8 pt; “White margin (quiet zone)” on; bar color #000000, background #FFFFFF; no content; “If the content is empty”: print nothing. Tooltip: “Barcode (Code 128, EAN-13, EAN-8, Code 39 or ITF) — content from a field, a variable or fixed text”. |
| “QR code” | 25 × 25 mm | “Error correction” M; white margin on; colors as for the barcode; no content; print nothing if the content is empty. Tooltip: “QR code — content from a field, a variable or fixed text, for example a link”. |
| “EPC QR code (GiroCode)” | 30 × 30 mm | “Amount” and “Remittance text” prefilled, each on its own: amount `{{totalamount}}` if the primary source knows the field `totalamount`; remittance text “Rechnung {{invoicenumber}}” if it knows one of the fields `invoicenumber`, `quotenumber` or `ordernumber` (for a quote “Angebot …”, for an order “Auftrag …”, in the language of the template). Because text and variable stand together in it, the remittance text is stored as an if-then without a condition branch; the field shows “Rechnung” and the number as a blue placeholder. Beneficiary and IBAN stay empty. Tooltip: “EPC QR code (GiroCode) per EPC069-12 — QR code for SEPA credit transfers in euros”. |

A new code starts with “Flowing on contact”, like a new image (see Positioning behavior: What a new object starts with).

### What goes into the code

The content of a barcode or QR code is in the field “Content”. It is a variable, that is a field of the record or a custom variable, a fixed text or a value with if-then. As long as nothing is stored, the three buttons “Variable”, “If-then” and “Fixed text” are there; the double-click on the code asks the same (see The double-click on a code).

- **Variable:** The button “Variable” (tooltip “Choose a variable — a field of the record or a custom variable, also a new one”) opens the field picker with the heading “Choose variable” (see Data tree and field picker: The field picker). The list does not offer image and file fields. At the bottom of the window, “New custom variable …” creates a custom variable and inserts it after saving. The chosen variable appears as a blue placeholder in the field, just like a variable in a text; a click on the placeholder chooses a different one, ✕ removes it. For a custom variable, the button with the @ sign opens the variable itself.
- **Only a variable, nothing next to it:** You cannot write anything next to the placeholder. If the content is to be composed or calculated, for example `Kd {{Customer.accountnumber}}-{{invoicenumber}}`, create a custom variable for it and choose that (see Variables).
- **If-then:** The button “If-then” opens the variable window with a fixed type Text and the heading “Value for »Content of the code«”. There is a default value and condition branches, for example a different number for a certain product type; the first branch whose condition is met wins (see Variables: If-then). In the default value and in the branches, text and fields may stand together. Afterwards the field shows the default value with placeholders and below it, for example, “If-then with 1 condition branch”; a click on it opens the window again, ✕ removes the value, as does “Delete” in the window.
- **Fixed text:** The button “Fixed text” (tooltip “Fixed text — always the same content, for example a web address”) opens a small window “Fixed text for the barcode” or “… for the QR code”. What you enter there, for example `https://www.example.com`, goes into the code exactly like that; Enter or “Apply” accepts, “Cancel” and Esc change nothing. The window does not accept placeholders: “Placeholders do not belong in fixed text — use »Fixed variable« or »If-then«.” Afterwards the text appears as an ordinary input field under “Content”, without a blue placeholder; it can be changed there, ✕ removes it. The field does not accept placeholders there either.
- **Literal:** The content goes into the code character by character, without formatting and without markup. A number or currency field yields the number with a decimal point, for example `1234.5`. If you need a particular notation, use a custom variable of type Text with a formatter, for example `{{Date:createdon|de-DE|yyyyMMdd}}`.
- **Older templates:** If the content mixes text and variable, for example from an older template or from the AI assistant, it is printed as before. The field shows it in gray, with the variables as placeholders, and below it “Older content: text and variables mixed — it is printed as before. You can change it as a custom variable or via if-then.” “Convert to custom variable” creates a custom variable of type Text with exactly this value and inserts it as a placeholder; the same is printed. “Edit as if-then” takes it as the default value of an if-then. Nothing is rewritten automatically.
- **In a table row** the content belongs to the row: A field of the row yields its value in every row (see Codes in tables).
- **Page number:** `{{Page.Total}}` (the total number of pages) works in the content of a code only in a group that appears on every sheet (header or footer). In the main part of the document the code is otherwise not printed: A barcode or QR code is left out and the document warns; for a GiroCode the document is not created.
- **Check:** Under the field it says “Result with the sample record:” with the text that goes into the code, set in ‹ ›. A content consisting only of spaces counts as empty.

### The double-click on a code

A double-click on a code opens what fits its content. This applies directly in the document, in a group, in a table cell and in a grid cell:

| Double-click on | What opens |
|---|---|
| a barcode or QR code without content | The window “What should go into the barcode?” or “What should go into the QR code?” with the choice “Fixed variable”, “If-then” or “Fixed text”. “Fixed variable” opens the field picker “Choose variable”, “If-then” the variable window, “Fixed text” the window for fixed text. At the bottom left, “Visibility …” opens the visibility rule. “Cancel”, Esc or a click next to it change nothing. |
| a barcode or QR code with a variable | The field picker “Choose variable” right away; another choice replaces the variable, closing without a choice changes nothing. |
| a barcode or QR code with if-then | The variable window with the if-then right away. |
| a barcode or QR code with fixed text | The window for fixed text right away, prefilled with the previous text. |
| a barcode or QR code with older content (text and variable mixed) | The window with the choice, above it the previous content and the button “Convert to custom variable”. “Fixed variable” replaces the content, “If-then” takes it as the default value. |
| a GiroCode | The GiroCode window with all fields, their check, “Content of the code” and the appearance, at the top the button “Visibility …”. “Done”, the ✕, Esc or a click next to it close it; every entry applies immediately. |

If you remove the variable or the if-then, in the “Properties” window with ✕ or in the variable window with “Delete”, the next double-click asks again what should go into the code.

[Image: A window with the heading “What should go into the QR code?” and a ✕ at the top right. Below it the gray sentence “You can change or remove the content later in the »Properties« pane or again with a double-click.”. Three large buttons with borders follow: at the top, with a blue @ sign, “Fixed variable” and the explanation “Always the same variable: a field of the record, such as the invoice number, or a custom variable. If something is to be combined or calculated, create a new custom variable at the bottom of the next window.”, below it, with a blue diamond with a question mark, “If-then” and the explanation “A different content depending on a condition, for example a different number for a certain product type.”, at the bottom, with a large T, “Fixed text” and the explanation “Always the same fixed content, for example a web address or a fixed number — without a variable.”. At the bottom left the button “Visibility …”, at the bottom right “Cancel”.]
Caption: The double-click on a QR code without content.
- Image marker 1: “Fixed variable”: a field or a custom variable; the field picker opens.
- Image marker 2: “If-then”: a different content depending on a condition; the variable window opens.
- Image marker 3: “Fixed text”: a fixed content such as a web address, without a variable; a small window asks for the text.
- Image marker 4: “Visibility …” opens the visibility rule of the code.

[Image: A window with the heading “GiroCode” and a ✕ at the top right. At the top a gray box with the blue button “Visibility …” and next to it “Printed only if: Gesamt greater than 0”. Below it the sentence “The customer’s banking app fills in the credit transfer from this code — euros only.” with an ⓘ. The fields follow: “Beneficiary” with the blue placeholder “Firmenname” and a ✕, “IBAN” with the placeholder “IBAN” and a ✕, “BIC” as an empty input field with the gray text “leave empty or enter a BIC” and two buttons (curly braces and a diamond with a question mark), “Amount” with the placeholder “Gesamt”, “Currency (check)” empty, the dropdown “Purpose of payment” with “Remittance text (free text)”, “Remittance text” with “Rechnung” and the placeholder “Rechnungsnummer”, below it “If-then without a condition branch”, then “Purpose code” and “Note to the payer” empty. At the bottom “Content of the code” to expand, the green line “QR code version 6, error correction M, one dot 0.593 mm.” and at the bottom right the blue button “Done”.]
Caption: The double-click on a GiroCode. The field names are invented.
- Image marker 1: “Visibility …” opens the visibility rule; next to it the rule is shown in words. If the code is hidden, it is not checked.
- Image marker 2: A field with a variable: the blue placeholder, next to it ✕ to remove it.
- Image marker 3: An empty field: type fixed text, choose a variable with the curly braces or create an if-then with the diamond.
- Image marker 4: “Done” closes the window; your entries already apply.

### The barcode types and their characters

For a barcode you choose the type under “Type”. Each type accepts only certain characters. If the content does not fit, the document does not print the code and names object and reason (see Empty and invalid); a wrong code is never printed.

| Type | Accepts | Special features |
|---|---|---|
| “Code 128 (letters, digits, characters)” | Letters without umlauts, digits, spaces and the usual punctuation (ASCII without control characters). | The default and the best choice for document numbers. Spaces at the edge are part of the content. A line break or a character such as “€” is rejected. A formatter such as `{{Currency:…}}` brings such characters along, usually first the non-breaking space before the € sign, which the message calls `U+00A0`. If the content looks like it came from a formatter, the message asks about it. Insert numbers without a formatter. |
| “EAN-13 (article number)” | 12 digits (the check digit is added) or 13 digits with check digit. | If the check digit is wrong, the code is not printed; the message names the correct digit and the one present. Blank space at the edge is trimmed. The first digit appears in plain text to the left of the code. |
| “EAN-8 (short article number)” | 7 digits (the check digit is added) or 8 digits with check digit. | As for EAN-13, but without a digit to the left of the code. |
| “Code 39 (older scanners)” | Digits, capital letters A–Z, spaces and the characters `- . $ / + %`. | Only for older scanners that require it. Lowercase letters are not silently capitalized, because the scanner would get different data than in the field; the message recommends Code 128. The plain text shows the content without the start and stop characters. |
| “ITF (digits, even count)” | Digits only, and an even number of them. | An odd number is rejected; no zero is prepended. Blank space at the edge is trimmed. With fewer than 6 digits the code is printed, but the document writes a note on the data, and the “Properties” window warns: Many scanners read ITF only from 6 digits. |

### The QR code

A QR code accepts any text, including umlauts and special characters. Smart Templates chooses the size, that is the number of dots, itself: It takes the smallest QR code the content fits into. Write a link in full, for example `https://www.example.com/rechnung/{{invoicenumber}}`.

With “Error correction” you choose how much of the code may be damaged or covered before it can no longer be read:

| Level | What it means |
|---|---|
| “L — 7 %” | About 7% of the code may be unreadable. Few, large dots. |
| “M — 15 % (recommended)” | About 15%. The default and the usual middle course. |
| “Q — 25 %” | About 25%. |
| “H — 30 %” | About 30%. The code becomes denser; at the same size the dots are smaller. |

Exactly the chosen level applies; Smart Templates does not switch the code to a higher one by itself. If the content is too long for the largest QR code, at level M about 2,300 characters of text (umlauts count several times), the code is not printed, and the message gives the length and the maximum. The GiroCode always has level M; there is no choice of error correction for it.

### The GiroCode

The GiroCode (EPC QR code per EPC069-12, known in Germany as GiroCode) is a QR code for SEPA transfers in euros. The customer’s banking app reads it and fills in the transfer. Print it on invoices that the customer pays by transfer. Unlike the other codes, it has fixed fields instead of a free content.

#### The fields

[Image: Excerpt of the right column “Properties” for a selected GiroCode. At the top the blue marker “GiroCode”, below it the tabs “General” (selected) and “Position & size”. First the section “Visibility” with the checkbox “Turn visibility rules on/off” and an ⓘ. Then the section “Content”: a gray sentence “The customer’s banking app fills in the credit transfer from this code — euros only.” with an ⓘ. The fields follow: “Beneficiary” with the blue placeholder “Firmenname”, “IBAN” with the placeholder “IBAN” and “Amount” with the placeholder “Gesamt”, each with a ✕ next to it; “BIC” and “Currency (check)” as empty input fields with gray text and two small buttons next to them (curly braces and a diamond with a question mark); the dropdown “Purpose of payment” with “Remittance text (free text)”; “Remittance text” with the word “Rechnung” and the placeholder “Rechnungsnummer”, next to it the diamond, an @ sign and a ✕, below it “If-then without a condition branch”; “Purpose code” and “Note to the payer” empty. Every label carries an ⓘ. Below it “Content of the code” is expanded and shows in typewriter font the lines BCD, 002, 1, SCT, an empty line, “Smart Templates Scantest”, the IBAN without spaces, EUR1486.91, two empty lines and “Rechnung RE-2026-1042”, plus “97 of 331 bytes” and in green “QR code version 6, error correction M, one dot 0.593 mm.”. At the bottom the section “Appearance” begins with the checkbox “White margin (quiet zone)”.]
Caption: The properties of a GiroCode. The field names, the beneficiary and the IBAN are invented.
- Image marker 1: “Visibility” is at the top, above the content: A hidden code is not checked, so its fields may be empty.
- Image marker 2: A field with a variable: the blue placeholder, like a variable in a text. A click on it chooses a different one, ✕ removes it; you cannot write anything next to it.
- Image marker 3: An empty field: type fixed text, choose a variable with the curly braces or create an if-then with the diamond. As long as a required field is empty, it has a red border.
- Image marker 4: A value with if-then: text and variable together, here the prefill of the remittance text. The diamond opens the if-then, the @ sign saves the value as a custom variable.
- Image marker 5: “Content of the code” shows what is in the code and how many of the permitted 331 bytes it is. The green line gives the size of the code.
- Image marker 6: Below follow color, background and position as for the barcode.

Every field takes one of three forms: **fixed text** that you type into the input field, for example your IBAN; **a variable**, a field or a custom variable, chosen with the button with the curly braces (tooltip “Choose a variable — a field of the record or a custom variable, also a new one”), which then appears as a blue placeholder in the field; or **if-then**, created with the button with the diamond (tooltip “If-then — a different value depending on a condition”). Text and variable together, like “Rechnung” before the invoice number, go through if-then or a custom variable; you cannot write anything next to a placeholder. The input field does not accept curly braces: When you leave it, the previous text returns, and the message “Placeholders do not belong in fixed text — use »Variable« or »If-then«.” appears. ✕ empties a field again. A field in which text and variable are mixed from an older template is printed as before and shows the buttons “Convert to custom variable” and “Edit as if-then” (see What goes into the code).

| Field | What goes in | Rules |
|---|---|---|
| “Beneficiary” | The name of the account holder to whose account the money is transferred, usually your company name. | Required, at most 70 characters. |
| “IBAN” | The IBAN of this account. | Required. Spaces and lowercase are allowed and are cleaned up. The form, the length for the country and the check digits are checked, and the country must take part in the SEPA scheme. |
| “BIC” | The BIC of the bank of this account. | Within the European Economic Area it may be missing. It is required for an IBAN from AD, AL, CH, GB, GI, MC, MD, ME, MK, RS, SM or VA. If a BIC is entered, it is always in the code; it must have 8 or 11 characters. If you have customers with a bank in Switzerland or in Great Britain, enter the BIC. |
| “Amount” | The amount to be paid in euros. | See The amount. |
| “Currency (check)” | A field with the currency code of the document, for example the ISO code of the document currency. | For checking only; it does not go into the code. If it yields anything other than EUR (or the € sign), the code is invalid. Empty means: no check. |
| “Purpose of payment” with “Remittance text” or “Reference” | A free text, for example “Rechnung {{invoicenumber}}”, or a structured reference. | The code carries only one of the two; the dropdown “Purpose of payment” switches; a value already entered moves along. The remittance text has at most 140 characters. The reference has at most 35 characters; an RF creditor reference per ISO 11649 is checked (check digits) and written without spaces and in capital letters, other structured references pass through unchanged. |
| “Purpose code” | Optional: four capital letters per ISO 20022, for example GDDS (purchase of goods). | Only the form is checked. The field usually stays empty. |
| “Note to the payer” | Optional: a short note that the banking app shows to the payer. | At most 70 characters. It is not transferred along with the payment. |

All fields together may amount to at most 331 bytes; umlauts count double. The expandable area “Content of the code” shows the current state. A line break in a field becomes a space, and a character that many banks do not accept triggers a note; the code is created in both cases (see Problems and messages: Barcode, QR code and GiroCode).

#### The amount

Insert the field without a formatter: `{{totalamount}}`, not `{{Currency:totalamount}}`. With a formatter you get text such as “1.234,56 €”, and that is not an amount; the “Properties” window then shows the reason under the field. It is rounded to two decimal places. A summary such as `{{sum(Positionen.betrag)}}` rounds each line item to the “Decimal places (currency)” of the template before adding — the code contains the same amount as with `{{Currency:sum(…)}}`, even if the document shows the total as a number with more decimal places (`{{Number:sum(…)}}`). €0.01 to €999,999,999.99 are allowed. Zero and negative amounts make the code invalid. If the field stays empty, there is no amount in the code, and the payer enters it themselves.

You can insert a custom variable of type number or currency in the same way, for example `{{@Brutto}}`. Its value goes into the code, not its notation in the document: If `{{@Brutto}}` prints “1.486,91 €” in the text, the code contains `EUR1486.91`. If the value has more than two decimal places, for example 1486.905 from an invoice, it is rounded to two places, so to 1486.91, just as a variable of type currency with two decimal places prints it. If the variable shows different decimal places in the document, for example none, the code still contains the value rounded to two places. A variable of type Text is suitable if it contains the field without a formatter, for example `{{totalamount}}`; if `{{Currency:…}}` is in it, its value is not a number (see Variables: Type Text).

#### Saving as a custom variable

The button with the @ sign (tooltip “Save as custom variable — creates a custom variable with this value and inserts it here; then it can also be printed elsewhere”) is next to a field with fixed text or with if-then. It opens the window for a new custom variable of type Text, prefilled with the value of the field and a name such as “Zahlung IBAN”. Name and value can be changed in the window; Cancel changes nothing. After saving, the variable appears as the blue placeholder “Zahlung IBAN” in the field. This is how you also print the same IBAN as text in the footer. If the field already contains a custom variable, the same button opens that variable.

If “Beneficiary”, “IBAN” or “BIC” is empty and there is already a custom variable whose name looks like the field, for example “IBAN”, the designer offers it with a button under the field (label roughly: Use “@IBAN”). It never inserts it by itself.

#### What is checked

A GiroCode is checked with every record. If it is invalid, the document is not created, and the message names all reasons.

> **Caution:** There is no built-in special handling for credit notes, amounts of 0 or currencies other than euro. If the GiroCode is visible there, it is invalid, and the document is not created. Hide it for those cases with a visibility rule, for example “only if the amount is greater than 0 and the currency is euro” (see Visibility: The visibility rule). A hidden GiroCode is not checked and not printed; its fields may then be empty. You open the rule in the “Properties” window at the very top under “Visibility” or in the GiroCode window (double-click) with “Visibility …”.

Also print beneficiary, IBAN and amount as text on the document; this is what the guideline provides for, and the customer can then transfer the money even without an app. The code should be at least 20 mm in size; below that a note appears (see Fitted print-sharp).

### The settings of a code

The settings of a barcode or QR code are in the “Properties” window in the “General” tab, the position in the “Position & size” tab; in a group or cell everything is listed one below the other without tabs (see The properties panel: Which sections are where). At the very top of every code, also in a group or cell, is the section “Visibility”, below it “Content”. For the GiroCode, the fields of the transfer are under “Content”, below them the same “Appearance” as for a QR code, without “Error correction” and without “If the content is empty”.

[Image: Excerpt of the right column “Properties” for a selected barcode. At the top the blue marker “Barcode”, below it the tabs “General” (selected) and “Position & size”. First the section “Visibility” with the checkbox “Turn visibility rules on/off” and an ⓘ. Then the section “Content”: the dropdown “Type” with “Code 128 (letters, digits, characters)”, the field “Content” with the blue placeholder “Rechnungsnummer” and to the right of it a button with ✕. Below it “Result with the sample record: ‹RE-2026-1042›” and in green “Code 128, bar width 0.339 mm.”. Section “Appearance”: the checked checkbox “Human-readable text below the code”, the field “Text size (pt)” with 8, the checked checkbox “White margin (quiet zone)”, “Bar color” with a black field and #000000, “Background” with a white field and #FFFFFF, the dropdown “Position in frame” with “center (default)” and the dropdown “If the content is empty” with “print nothing”. The labels carry an ⓘ.]
Caption: The properties of a barcode, “General” tab.
- Image marker 1: “Visibility” is at the top, above the content.
- Image marker 2: “Type”: only for a barcode; a QR code has “Error correction” here under “Appearance”.
- Image marker 3: “Content”: the chosen variable as a blue placeholder. A click on it chooses a different one, ✕ removes it. Without content, the buttons “Variable”, “If-then” and “Fixed text” are here.
- Image marker 4: What comes out with the sample record, and in green the size of the code. If there is a problem, a ⚠ with the reason appears here.
- Image marker 5: “Human-readable text below the code”: only for barcodes.
- Image marker 6: “White margin (quiet zone)”: the free margin that scanners need.
- Image marker 7: “Position in frame”: where the code sits in the box.
- Image marker 8: “If the content is empty”: what happens with a record without content.

| Setting | What it does | Default |
|---|---|---|
| “Visibility” | At the top, above the content. Prints the code only if a condition is met; a hidden code is not checked, so its values may be empty (see Visibility). | always |
| “Type” | Barcode only: Code 128, EAN-13, EAN-8, Code 39 or ITF (see The barcode types and their characters). | Code 128 |
| “Content” | What the code contains: a variable as a blue placeholder, fixed text or a value with if-then (see What goes into the code). For the GiroCode, the fields of the transfer replace this row. | empty |
| “Error correction” | QR code only: L, M, Q or H (see The QR code). | M |
| “Human-readable text below the code” | Barcode only: prints the content legibly below the bars, helpful when a scanner refuses. For EAN the edge bars extend somewhat lower, and for EAN-13 the first digit is to the left of the code. The bars become shorter by the height of the plain text. | on |
| “Text size (pt)” | Font size of the plain text, 5 to 14 pt; the font is the default font of the template. A number outside is set to the limit, and the document reports it. | 8 pt |
| “White margin (quiet zone)” | The free margin around the code lies inside the box; the box is then everything the code needs. Turned off, the code fills the box without a margin; this is only right if there is enough free space around the box. | on |
| “Bar color” | The color of the bars or dots. Scanners read dark bars on a light background most reliably. If the bars are lighter than the background or differ too little, the window warns under the field “Content”. | #000000 |
| “Background” | The area behind the code including the white margin, for a barcode the whole height of the box. An empty field makes the background transparent. | #FFFFFF |
| “Position in frame” | Where the code sits in the box if it is smaller than the box: in a corner, at an edge or centered. The same nine positions as for the image. A barcode fills the height completely; for it only left, center or right counts. | center |
| “If the content is empty” | Not for the GiroCode: “print nothing”, “print nothing and report” or “show placeholder” (see Empty and invalid). | print nothing |
| “Position & size” tab | “Positioning behavior”, “Width”, “Height” and “Rotation”, as for an image. The rotation allows only 0°, 90°, 180° and 270° (see Position, size, rotation and arrangement: Rotation). The code has no rotation handle. If the template contains a different angle, for example written by hand or by an AI, the code is printed that way; for a barcode the document then writes a note on the data, and the “Properties” window warns, because many scanners do not read slanted bars. A QR code and a GiroCode remain readable even when slanted. | see What a new code starts with |

A code has no border, padding or corner radius; put it in a group with a border for that (see Groups: Settings of the group).

### Fitted print-sharp: size, quiet zone and plain text

The box is the largest area the code may take up. So that every bar becomes equally wide on the printer, a bar or a dot of the QR code is always a whole multiple of 1/600 inch (about 0.042 mm). The code is therefore often somewhat smaller than its box: a QR code by up to about 2 mm, a long barcode by up to about 8 mm. Where it sits in the box is determined by “Position in frame”. The sharpness applies when printing at original size; “Fit to page” in the print dialog cancels it.

#### The white margin

Every code needs a free margin, otherwise the scanner does not find it. With the checkbox “White margin (quiet zone)” it lies inside the box:

| Type | Margin left | Margin right |
|---|---|---|
| QR code and GiroCode | 4 dots, likewise top and bottom | 4 dots |
| Code 128, Code 39, ITF | 10 bar widths | 10 bar widths |
| EAN-13 | 11 bar widths | 7 bar widths |
| EAN-8 | 7 bar widths | 7 bar widths |

#### Too small for the code

If the box is not enough for every bar and dot to be at least one print dot of 1/600 inch wide, or if it is too low for bars and plain text, the code is not printed (see Empty and invalid). In addition there are guideline values; if the code falls below them, it still prints, and the document writes a note on the data:

| Code | Guideline value |
|---|---|
| Barcode | A bar at least 0.25 mm wide; for EAN at least 0.264 mm. |
| QR code | A dot at least 0.4 mm, so that phone cameras read it reliably. |
| GiroCode | An edge length of at least 20 mm, measured including the white margin. |

The “Properties” window shows the size of the code in green under the field “Content”, for example “Code 128, bar width 0.339 mm.”, and additionally warns if the bars are lower than 6 mm.

### Empty and invalid

An empty content and an invalid content are two different cases:

| Case | What happens |
|---|---|
| The content yields nothing for a record, for example an item without an EAN (not for the GiroCode) | “If the content is empty” decides. With “print nothing” the spot stays silently empty and takes up no space: Objects below it do not move down because of it and never move up beyond their drawn position; a table row becomes only as high as its remaining content. With “print nothing and report” a note on the data is added. With “show placeholder” a gray box appears and keeps the space. |
| The content is invalid: a wrong EAN check digit, a character the type cannot handle, a content that is too long or a box that is too small | The code is not printed, its spot keeps the space, and the document warns and names object and reason. With many table rows, the warning comes once per object and reason, with the number of further values. |
| A visible GiroCode is invalid or does not quite fit into its space | The document is not created. The message names all reasons of all GiroCodes of the document; values from the document, for example IBAN and amount, are not in the text for privacy reasons but appear as ‹…› (see Problems and messages: When no document is created). |
| A code is hidden via its visibility rule | It is not checked and not printed, even if its content were empty or invalid: no note, no warning, and a GiroCode does not stop the document. Its values may then be empty. In a table the rule applies per row. |

### Page edge and fixed bottom edge

A code is never split. If it no longer fits at the bottom of the sheet, it moves as a whole to the next one (see At the page edge: keep together or split). If it is the first object on its sheet, it stays like an image and extends beyond the bottom (see At the page edge: The first object on a sheet). A code is never cut off in the process: If it extends more than 0.5 mm beyond an edge of the paper, at the bottom, top or side, a barcode or QR code is left out, its spot stays empty, and the document warns; for a GiroCode the document is not created. What is measured is the outline the code takes up on the sheet, for a rotated code therefore the rotated one. This also applies in a group, a grid and in headers and footers. If the document splits a group at the page edge, a code in it goes completely onto the next sheet. So place a code so that it lies completely on the sheet. A group or cell with a fixed height cuts an image at its bottom edge, a code never: Half a QR code is unreadable, and a shortened barcode can be read incorrectly. It cuts only the gray placeholder of an empty code (“show placeholder”), like an image, and the document then warns as for a shape. If a code extends beyond the fixed bottom edge, it is left out and the document reports it; for a GiroCode the document is not created. If it starts only at or below it, it is not printed there, like any object, and the document reports it; a visible GiroCode prevents the document in that case as well. The canvas shows the part up to the wall with the sentence “The code extends beyond the fixed height — it is not printed.” or, for the GiroCode, “The code extends beyond the fixed height — the document is then not created.” (see Position, size, rotation and arrangement: What the wall does to an object). The gray placeholder of an empty code is also cut by the canvas like an image, without this sentence. A hidden code (visibility rule) is cut at the bottom edge there like any other object. If a group with a fixed height is inside another, the narrower bottom edge counts. At the edge of the paper it shows the code with a red dashed outline and the sentence “The code extends beyond the edge of the paper — it is not printed.” or, for the GiroCode, “The code extends beyond the edge of the paper — the document is then not created.”

### Codes in tables: the EAN per line item

A code can be in a table cell, for example the EAN of every line item on a delivery note. To do this, you design the column in the column designer (see Cells, header row and page break: Designing with the double-click):

1. Double-click a data cell of the column.
   → The column designer opens.
2. In the window’s ribbon, in the “Codes” section, click “Barcode”, and under “Type” choose the type, for example “EAN-13 (article number)”.
   → The code lies in the cell and is selected.
3. In the field “Content”, click “Variable” (or double-click the code and choose “Fixed variable”), and in the window choose the field of the row that contains the number.
   → The field appears as a blue placeholder, for example “Produktnummer”. In every printed row it yields the number of that row’s record.
4. Click “✕ Close” or press Esc.
   → You are back on the sheet; the sample row shows the code.

[Image: A data table on the sheet with a blue header row and the columns “Pos.”, “Bezeichnung”, “Menge” and “EAN”. In the sample row below, the first three columns contain blue field markers (“Pos.-Nr.”, “Bezeichnung”, “Menge” and “Einheit”). In the “EAN” column is an EAN-13 barcode with the digits 4 006381 333931 below it.]
Caption: A table with a column for the EAN. The numbers are invented.
- Image marker 1: The column “EAN” has a barcode in the cell in the column designer.
- Image marker 2: The canvas shows a sample row; in print, every row contains the code of its record.

The content belongs to the row: In every printed row the code with the number of its record appears. If an item has no EAN, the cell stays empty with “print nothing” and takes up no height; the row becomes as high as its remaining content. If the space should stay, choose “show placeholder” or set the minimum row height of the table (see Data tables: “General” tab: “Cells” section). A wrong EAN omits only this code: The row keeps its space, the other rows print, and the document reports it once per column and reason with the number of further values.

### What the canvas shows

The canvas calculates every code itself, with the same method as printing, and shows it dot for dot the same. The content comes from the sample record; in a table from the sample row. Visibility rules otherwise have no effect on the canvas (see Visibility); for a code they decide whether it is checked (see below). A code can have four appearances:

[Image: A white group with a blue dashed edge and four boxes side by side. On the far left an EAN-13 barcode with the digits 4 006381 333931 below it. Next to it a red dashed box with the red text “⚠ EAN-13 ›4006381333932‹: The last digit should be 1, not 2 — probably a typo in the product data.”. Next to it a gray dashed box with pale gray bars and the caption “Sample — empty with the sample record”. On the far right a flat gray box with the caption “Placeholder (empty content)”.]
Caption: The four appearances of a code on the canvas.
- Image marker 1: A valid code, here an EAN-13 with plain text. This is how it appears in print.
- Image marker 2: An invalid code: red dashed with the reason. In print nothing appears at that spot, and the space stays.
- Image marker 3: An empty content: a gray pattern with the sentence “Sample — empty with the sample record”. It shows where and how large the code would be, and is never printed.
- Image marker 4: An empty content with “show placeholder”: a gray box, as it is also printed.

If the visibility rule of a code is not met with the sample record, so it is hidden, the canvas shows a pale gray pattern with the sentence “Hidden (visibility rule) — not printed” and never a red error, even if its content were empty or invalid; that is also how it is printed, namely not at all. The “Properties” window then says under the content “With the sample record the code is hidden (visibility rule) — it is then neither printed nor checked; empty fields do no harm.” and shows no red lines. The same applies if the code itself has no rule but a group or table above it is hidden with the sample record: It is then also neither printed nor checked.

A code is also shown red dashed if it extends beyond the fixed height of a group or beyond the edge of the paper (see Page edge and fixed bottom edge); the gray placeholder of an empty code is not, it is cut at the fixed height. The canvas shows the part up to the fixed bottom edge; if less than 3 mm of the code lie above it, it shows the whole code red dashed — otherwise the marker would hardly be visible. In a data row, an empty code shows nothing, like an empty image, except with “show placeholder”. If the files for the encoding are missing, the box says “Encoders not loaded”, and the “Properties” window says under the field “Content”: “The encoders are not loaded — the canvas cannot show the code. It is printed anyway.”

### What happens when printing

In the PDF a code is drawn from rectangles, not embedded as an image. It is never split (see Page edge and fixed bottom edge) and, according to Fitted print-sharp, is as large as the box allows. The messages that the document gives about codes are described with meaning and remedy under Problems and messages: Barcode, QR code and GiroCode.

> **Tip:** Scan a new code before using it from the full preview or from a printout: a barcode with the scanner you will use later, a QR code with a phone and a GiroCode with a banking app.

### Names and trademarks

GiroCode is the name commonly used in Germany for the EPC QR code (guideline EPC069-12 of the European Payments Council). All product and brand names mentioned belong to their respective owners. Smart Templates has no connection with the European Payments Council, the Deutsche Kreditwirtschaft, the Sparkassen-Finanzgruppe or S-Public Services GmbH.

QR Code is a registered trademark of DENSO WAVE INCORPORATED.

### What changes in the document?

**On the canvas:** The code appears with the content of the sample record, dot for dot as in print, with plain text, white margin and position. Without content a gray pattern appears, with an invalid content a red dashed box with the reason, with “show placeholder” a gray box (see What the canvas shows). If the code is hidden with the sample record, a pale pattern with “Hidden (visibility rule) — not printed” appears, without an error; otherwise visibility rules have no effect on the canvas.

**In the PDF:** The code stands in the box fitted print-sharp, with the chosen color, the background and the rotation. An invalid barcode or QR code is missing, its spot keeps the space, and the document warns; an empty one takes up no space with “print nothing”. A visible, invalid GiroCode prevents the document. A code is never split and never cut off, neither at a fixed bottom edge nor at the edge of the paper (see Page edge and fixed bottom edge).

---

## Groups

*For users · Objects · Page en/gruppen.html*

> **In short:** A group is a container on the sheet. It keeps together what belongs together, for example an address block or a totals block: Texts, images, codes, shapes, tables and further groups inside it move together. On request it gets a background and a border. You edit the content by double-clicking in the group designer. A group that repeats on every page becomes a header or footer.

### Creating a group

1. At the top in the ribbon, in the “Containers” section, click “Group”. You can also drag the button to a free spot on the sheet.
   → After a click, the new group is placed below the lowest existing content. After dragging, it is placed at the height where you released it, but always starts at the left margin. It is as wide as the page between the margins, 25 mm high, without background and border, and selected right away: You can tell by the blue frame with the small handles.
2. The first time in a template, a speech bubble points at the group: “Double-click to edit the content”.
   → When it appears, when it disappears again and how the browser remembers that it has already been shown is described under The ribbon: Speech bubbles on first insertion.

[Image: Excerpt of the canvas. At the top is the heading “ANGEBOT”. Below it lies a newly inserted, empty group across the whole width of the excerpt. It is selected: blue frame with small square handles on the left, on the right, at the bottom center and at the bottom right. Above the group is a dark blue speech bubble with the text “Double-click to edit the content”; its arrow points down at the group.]
Caption: A newly inserted group below the heading “ANGEBOT”.
- Image marker 1: The speech bubble with the hint about the double-click.
- Image marker 2: The new, still empty group. The blue frame shows: It is selected.
- Image marker 3: Handles: Drag them to make the group larger or smaller.

If you drag the button between two objects that are close together, a blue insertion line shows the gap. If you release there, the group goes exactly into that gap, and everything below it moves down by its height (see The insertion line). You then fill the content in the group designer.

#### Where the new group is created

The same button has different results depending on the selection. Where a click on “Text”, “Image”, a code or a shape inserts an object is described under The ribbon: Where a click inserts; for the group the following applies:

| How you create it | Where the group is created |
|---|---|
| Click, when nothing is selected or an object directly in the document, including a group | Below the lowest content of the document, as wide as the page and 25 mm high. It does not go into a selected group directly in the document either, unlike text, image, codes and shapes. |
| Click, when an object in a group is selected, for example a text | Also at the bottom of the document, not next to the text. |
| Click, when a group is selected that is itself in a group or table cell | In that group (see A group in the group). |
| Click on “Group” in the ribbon of the group designer | In the selected group. If another object is selected, next to it in the same group. If nothing is selected, in the opened group. |
| Drag onto a free spot on the sheet | Directly in the document at the height of the release point, starting at the left, as wide as the page and 25 mm high. |
| Drag onto an existing group | In that group, at the place where you release. The target group shows a blue frame while you drag. For a group directly in the document, only a middle strip counts (see Which area of the group counts); if you release near its top or bottom edge, a new group is created on the sheet. |
| Drag onto a free spot in the group designer | In the opened group, at the release point. |

#### A group in the group

Groups can be nested as deeply as you like. A group in a group is initially 60 × 30 mm, has a very light, bluish background (#F5F7FC) and a blue border (#2B4CC4, 0.75 pt).

- Created by a click, it is placed like any object that a click inserts into a group (see The ribbon: Where a click inserts). The designer does not adjust its height of 30 mm in the process. It therefore does not quite fit into a freshly created group (25 mm); whatever extends below the bottom edge is cut off on the canvas and in the PDF. Before that, turn on “Automatic height (fit to content)” on the outer group, make it taller or make the new group lower.
- Created by dragging, it is placed exactly where you release. If it extends below the bottom edge of a group with a fixed height, whatever extends below is missing in the PDF (see What the wall does to an object).
- An inner group has essentially the same settings as a group directly in the document. What it lacks and what it has in addition is shown by the overview Which fields appear where.

> **Good to know:** If you point at the button “Group” with the mouse in the main window, the hint “Group: a container for elements, with its own designer. It flows by default; each element can be set to fixed or anchored.” appears. This refers to the positioning behavior (see Positioning behavior): “fixed” is called “Fixed position” there. A setting “anchored” no longer exists.

### Moving objects in and out

An object always belongs to exactly one level: directly to the document or to a group. If it changes level, its settings sometimes change as well; which ones is described under What changes when you drag in and take out.

#### Which area of the group counts

What matters is always the smallest group under the mouse pointer when you release. How much of it counts depends on what you drag:

- **An object from the sheet, a button from the ribbon, a field from the data tree:** For a group directly in the document, only its middle strip counts. The top 35% and the bottom 35% of its height do not count, the middle (30%) does. If you release in the top or bottom strip, what happens is what happens on a free spot on the sheet: A new object is created on the sheet, an object from the sheet is placed there. For a group in a group, every spot counts. A field that you drag onto a text in the group, on the other hand, is appended to that text, even in the top or bottom strip (see The “Edit text” window: Dragging a field onto an existing text).
- **An object that is already in a group:** The whole area of the smallest group under the mouse pointer counts, even for a group directly in the document.

#### New objects into a group

- **Text, image, codes and shapes by click:** The new object goes into the selected group, next to a selected object in a group, or otherwise into the first group of the document that is not repeated on every page; if there is none, it is placed at the bottom of the document. The whole rule including the messages is described under The ribbon: Where a click inserts.
- **Tables by click:** “Data table” and “Free-form table” go into a group only if the group designer is open or a group is selected that is itself in a group. If a group directly in the document is selected, the table is created at the bottom of the document. In that case, drag the button onto the group.
- **By dragging:** Drag a button from the ribbon onto the group; the object is created at the release point (see The ribbon: Dropping by dragging). Where the object goes if you release near the top or bottom edge of a group is described under Which area of the group counts.
- **From the data tree:** A field that you drag from the “Data” area onto a group becomes a text with that field at the release point; its width and positioning behavior are described under Texts: Dragging a field onto the sheet. The area from Which area of the group counts applies here as well. What else can be created, for example an image or a data table, and how the designer treats a field that applies per row of a list, is described under Data tree and field picker: Clicking and dragging. Fields of a rule on a list cannot currently be placed in a text, not even in a group; the way that works is described in Rules: Using the result.

Which positioning behavior a new object starts with in the group depends on the way it is created (see What a new object starts with).

#### Dragging existing objects in

Drag the object onto the group. A blue dashed edge shows the group it will fall into. What matters is where the mouse pointer is when you release (see Which area of the group counts).

- **From the sheet into a group:** The designer reports “Moved into group ‘Group’.” In the messages the name is always “Group”, also when taking out.
- **From one group into another:** The designer reports “Moved into group ‘Group’ – can now be placed freely.”

In both cases the following also happens:

- Which positioning behavior the object has afterwards and what happens to its “Minimum gap above (mm)” is described under What changes when you drag in and take out.
- The designer fits it in. The target group gets an entered width: directly in the document the width of the page, in another group or in a table cell the width of that container, so exactly the width it was already drawn with without an entry. The field “Width (mm) — empty = full width” is then no longer empty. If necessary it becomes wider, at most up to the right page margin or the right edge of its container, measured from its own left edge as at the handle; it never becomes narrower in the process. If the object is even wider, it extends beyond the group. If it has a fixed height, it becomes taller so that the object fits. The object itself moves within the limits of the group. If you drag in a group without a width of its own, it gets the width of the target group.
- Headers and footers, that is groups with “🔁 Repeat on every page”, and page breaks cannot be dragged into a group. The designer does not attach several selected objects to a group together; drag them one by one.

#### Taking objects out

There are two ways. They work slightly differently:

| Way | The group is directly in the document | The group is in another group |
|---|---|---|
| “⬆ Take out of group”, at the very top in the properties of the selected object | The object becomes an object of its own on the sheet of the group, 2 mm below the group and horizontally at the same place as before. Message: “Taken out of the group – now a block of its own.” | The object moves into the outer group and stays at the same place on the sheet. Message: “Taken out of the group.” |
| Dragging out: release outside the group and over no other group | The object is on the sheet at the release point; the sheet shows a blue edge while you drag. Message: “Taken out of the group → top level.” | The object moves into the outer group. Message: “Taken out of the group → ‘Group’.” |

Positioning behavior and minimum gap change depending on the way; the table for that is under What changes when you drag in and take out. With “⬆ Take out of group”, an entered “Minimum gap above (mm)” stays.

- While dragging, the object stays visible in its group until you release; it bumps against the group’s edge. All that matters is where the mouse pointer is when you release.
- The button “⬆ Take out of group” does not exist for an object in a table cell: The table is above it, and it does not accept free objects.

> **Good to know:** Several selected objects cannot be turned into a group at once, and a group cannot be dissolved. Create a group and drag the objects in one by one. To dissolve it, take the objects out and delete the empty group. There is no right-click menu for groups.

#### Copying and pasting

Ctrl+C, Ctrl+V, Ctrl+D and Ctrl+X work for groups as for any object, also in the group designer. Where a copy goes is described under Copying, pasting and deleting. For groups the following also applies:

- A copied group takes its whole content along.
- If you paste a group that was directly in the document into the group designer, it goes below the content of the opened group; if it has no entered width, it gets the width of that group.
- The copy of a header or footer is 5 mm further to the right and lower. How you put it back in its place is described under Selecting, moving, copying.

### Editing the content: the group designer

The double-click is the way into a group. It opens the group in the group designer, a window of its own: In the middle lies the group itself as a work area, above it is a ribbon of its own, on the left as usual the “Data”, on the right the “Properties”. All parts of the window are described in The window at a glance.

1. Double-click a free spot in the group. You can also select the group and, on the right in the “General” tab, click “↳ Zoom in (edit content)”.
   → The group designer opens. At the top left it shows where you are: “📄 Document › Group”. Nothing is selected, and on the right are the settings of the opened group.
2. Use the window’s ribbon to insert what belongs in the group, for example “Text” or “Image”, or drag fields from the “Data” area onto the work area. You change the size of the group at the handles of the work area.
3. At the top right, click “✕ Close” or press the Esc key.
   → You are one level further up, here back in the document, and the group shows its new content. Nothing is selected afterwards; to keep adjusting the group, click it again.

#### Opening, going deeper, going back

- The double-click must hit a free spot in the group. A double-click on a text in the group does not open the group but the “Edit text” window, and for a text with conditional content the window with its versions (see The “Edit text” window).
- A double-click on a group in the group opens that group. In the group designer this takes you one level deeper, and the path at the top left gets longer, for example “📄 Document › Group › Group”. On the sheet, the double-click opens an inner group directly; the path is then only “📄 Document › Group”, and “✕ Close” leads straight back into the document.
- You also open headers and footers by double-clicking.
- “✕ Close” and Esc always go back only one level. It is faster to click a part of the path at the top left: It takes you directly there, “📄 Document” closes the window. The last part of the path cannot be clicked; that is where you are.
- Esc goes back one level even if an object is selected or you are in an input field. Before that, Esc closes a window that is open above the group designer and cancels a multiple selection, each with a separate press (see Keyboard shortcuts: Esc in detail).

#### The window at a glance

[Image: The “Group designer” window with an opened totals block. At the top left the path “Document › Group”, at the top right the zoom slider with the value 229 percent and the blue button “✕ Close”. Below it the ribbon with the buttons “Text” and “Image” (section “Elements”), “Group” (“Containers”), “Shapes”, “Barcode”, “QR code” and “EPC QR code (GiroCode)” (“Codes”) as well as “Data table” and “Free-form table” (“Tables”). On the left the column “Data” with the hint “Drag a field onto the canvas.”, a search box and the entries “Custom variables”, “System variables”, “Rechnung ★” and “Eigene Firma (Absender)”. In the middle on a gray background lies the group as a work area: light blue background and blue border, the corners not rounded, in it the lines “Zwischensumme (netto)” with the field marker “Summe”, “zzgl. 19 % USt.” with “USt” and in bold “Gesamtbetrag” with “Brutto”. On the work area sit five small square handles: left, right, bottom center and at the two bottom corners. On the right the column “Properties” with the marker “Group” and the addition “zoomed in”, the tabs “General” and “Position & size”, the fields for background, border and corner radius (entered: 3), the section “Visibility”, the sentence “Click on an empty area to show the settings of this group.” and the button “Delete this group”.]
Caption: The group designer with an opened totals block: at the top the path and the buttons, on the left the data, in the middle the group itself, on the right its settings.
- Image marker 1: The path: This is where you are. A click on a part leads there.
- Image marker 2: “✕ Close”: one level back, as does the Esc key.
- Image marker 3: The ribbon: creates objects in the opened group.
- Image marker 4: “Data”: drag fields from here onto the work area.
- Image marker 5: The work area is the group itself, with background and border; it does not show rounded corners. The handles change its size.
- Image marker 6: The settings of the opened group, as long as nothing is selected.

| Part | What it does |
|---|---|
| Path at the top left, for example “📄 Document › Group” | Shows which level is open; how you go back with it is described under Opening, going deeper, going back. For table cells, the last part names the cell, for example “Column 2” or “Row 1 · Column 3”. |
| “Zoom” with slider and number field (%) | Works like the zoom of the header bar (40 to 300%, also with Ctrl and the mouse wheel), but only on the work area of this window. Every level has its own zoom, and when opening, the designer sets it once so that the group fills the work area well (see The header bar: Zoom). |
| “✕ Close” | One level back. |
| Ribbon with “Text” and “Image” (“Elements”), “Group” (“Containers”), “Shapes”, “Barcode”, “QR code” and “EPC QR code (GiroCode)” (“Codes”), “Data table” and “Free-form table” (“Tables”) | A smaller ribbon of its own that creates objects in the opened group. Which buttons it has, where a click inserts, which messages appear and what happens when you drag is described under The ribbon: The ribbon in the group designer and The ribbon: Where a click inserts. |
| “Data” with the hint “Drag a field onto the canvas.” | The data tree of the main window (see Data tree and field picker). A field dragged onto the work area becomes a text with that field. On the work area it appears as a blue marker with the field name, not with the value. |
| Work area | The group itself, as wide as it is in the document. With a fixed height it is exactly that high, and whatever extends below is cut off here as well. With “Automatic height (fit to content)” it is as high as the content, but at least 20 mm for working. You see background and border immediately, but not a “Corner radius (mm)”: The work area stays square-cornered, while on the sheet and in the PDF the corners are round. The grid of the main window applies here as well (see The header bar: Gridlines). |
| Handles of the work area on the left, right, bottom, bottom left and bottom right (hint “Drag to resize the group”) | Change the size of the group; see Size with the mouse. They appear only as long as nothing in the group is selected. |
| “Properties” | If nothing is selected, the settings of the opened group: at the top the marker “Group” with the addition “zoomed in”, at the bottom above the “Actions” the sentence “Click on an empty area to show the settings of this group.” If an object is selected, its settings. |
| Size of the window | The window takes up almost the whole screen. At its top and left edge it can be dragged smaller and larger. You drag the columns “Data” and “Properties” wider at their inner edge. |

A click on a free spot of the work area or on the gray margin around it cancels the selection; on the right, the settings of the opened group appear again. A selection rectangle that you drag on a free area works as on the sheet (see Working on the canvas: Selecting several objects) and captures only the objects of the opened group.

The same window also opens for the cells of a table, as column designer, header designer or cell designer. Path, “Zoom”, “✕ Close”, Esc, ribbon and “Data” are described on this page; what is different in a table cell is covered with the tables: Cells, header row and page break: Designing with the double-click, Cells, header row and page break: Designing the header row, Data tables: Extra rows and Cells, header row and page break: Designing cells.

### Settings of the group

If the group is selected, its settings are on the right in the “Properties” area, spread over the tabs “General” and “Position & size”. At the top is the marker “Group”, for a header or footer with the addition “repeats on every page”, in the group designer with “zoomed in”. What is outside the tabs you see under both: at the top, where applicable, “⬆ Take out of group”, at the bottom under “Actions” the button for deleting. Next to most settings there is a small ⓘ; how it works is described under The properties panel: Sections, collapsible areas and the ⓘ. How the area is built in general is described under The properties panel.

You select a group directly in the document with a click on a free spot in it or via its row “Group” in the “Structure” (see Working on the canvas). A click on an object in the group selects that object.

#### Which fields appear where

The same group shows somewhat different fields depending on its position. The “General” tab is the same everywhere; only “↳ Zoom in (edit content)” is missing in the group designer of the group itself. The differences are in the “Position & size” tab and in deleting:

| Position | “Position & size” tab | Delete with |
|---|---|---|
| Directly in the document | Positioning behavior with “Move along” and “Minimum gap above (mm)”, arrangement, X and Y from the printed area (sometimes only “X (mm)” is shown; when is described under Position directly in the document), size, “Keep together at page break”, “🔁 Repeat on every page” | “🗑 Delete block” |
| As a header or footer (“🔁 Repeat on every page” on) | No positioning behavior, only the arrangement; X and Y from the corner of the printed area; instead of the keep-together checkbox a note sentence (see The note instead of the checkbox); plus “Show on pages” and “Exclude these pages” | “🗑 Delete block” |
| In another group, selected from outside | At the top additionally “⬆ Take out of group”. Positioning behavior without “Move along”, arrangement, “Order in the group” (from two objects in the group), X and Y from the corner of the outer group, size, instead of the keep-together checkbox a note sentence, no 🔁 | “🗑 Delete element” |
| In a table cell, selected from outside | As in a group, but without “⬆ Take out of group” | “🗑 Delete element” |
| Opened in the group designer, the group is directly in the document | As directly in the document | “🗑 Delete this group” |
| Opened in the group designer, the group is in a group | Only X, Y, size and the note sentence. Positioning behavior, arrangement and order are missing here; you set them by selecting the group one level higher. | “🗑 Delete this group”; missing if you opened the inner group directly from the sheet |

#### “General” tab

The tab begins with the button “↳ Zoom in (edit content)”. Below it follow the section “Background & border” with the corner radius and the section “Visibility”.

[Image: Excerpt of the right column “Properties” with a group selected. At the top the blue marker “Group”, below it two tabs: “General” (underlined, active) and “Position & size”. Then the wide blue button “↳ Zoom in (edit content)” and the section “Background & border” with the color field “Background” (very light blue, value #EAF0FC), the checked “Turn on border”, the “Border color” (blue, #2B4CC4), the “Border thickness (pt)” 1.5, the four checked “Border lines (sides)” Top, Right, Bottom and Left and the “Corner radius (mm)” 3. Below it the section “Visibility” with the unchecked field “Turn visibility rules on/off” and at the very bottom the section “Actions” with the red button “Delete block”. Next to most fields there is a small ⓘ.]
Caption: “General” tab of a group with the border turned on.
- Image marker 1: The two tabs: “General” and “Position & size”.
- Image marker 2: “↳ Zoom in (edit content)” opens the group in the group designer, like the double-click.
- Image marker 3: “Background”: the fill color of the group.
- Image marker 4: “Turn on border” turns the border on; only then do color, thickness and lines appear below it.
- Image marker 5: “Border lines (sides)”: on which sides a line is drawn.
- Image marker 6: “Corner radius (mm)”: rounds background and border.

Every group has these settings. The table gives the defaults for groups; what the fields do is described under Border and background: What the fields do.

| Setting | For groups | Default |
|---|---|---|
| “↳ Zoom in (edit content)” | Opens the group in the group designer, like the double-click. Missing in the group designer of the group itself. | – |
| “Background” | – | no color; group in a group: #F5F7FC |
| “Turn on border” | – | off; group in a group: on |
| “Border color” | – | #333333; group in a group: #2B4CC4 |
| “Border thickness (pt)” | The canvas draws the border completely inside the group, the PDF centered on the edge (see Where the line sits). | empty (1 pt); group in a group: 0.75 |
| “Border lines (sides)” with “Top”, “Right”, “Bottom” and “Left” | – | all four |
| “Corner radius (mm)” | – | empty (square) |
| Section “Visibility” with “Turn visibility rules on/off”, “↳ Edit rule” and the line “Rule: …” | The group is printed together with its content only if a condition is met (see Visibility; what applies to a group and to a header or footer is described under Per object). | off (always printed) |

How the color picker works is described under Color field and color picker. A group has no inner margins (see Inner margins): You determine the distance to the edge through the position of the objects in it.

#### “Position & size” tab

The sections are, from top to bottom: “Positioning behavior”, “Arrangement”, for an inner group “Order in the group”, “Position”, “Size & spacing” and, at the very bottom, a second section called “Behavior”. What is missing in a position (see above) is simply omitted.

[Image: Excerpt of the right column “Properties” of a group directly in the document, “Position & size” tab (active, underlined in blue). From top to bottom: section “Positioning behavior” with the dropdown “Behavior” (“Flowing on contact (default)”), below it “Move along” with the checked “Move along with the object below”, a gray sentence that explains the chosen behavior, and the empty field “Minimum gap above (mm)”. Section “Arrangement” with “Layer order” 0, a note box with a yellow background and four buttons “Bring to front”, “Send to back”, “Bring forward” and “Send backward”. Section “Position” with “X (mm)” 100 and “Y (mm)” 87. Section “Size & spacing” with the unchecked “Automatic height (fit to content)”, “Width (mm) — empty = full width” 75, “Height (mm)” 24 and empty “Spacing between objects (mm)”. Section “Behavior” with the checked “Keep together at page break” and the unchecked “Repeat on every page”. At the very bottom the section “Actions” with the red button “Delete block”.]
Caption: “Position & size” tab of a group directly in the document: five sections from top to bottom.
- Image marker 1: “Positioning behavior”: the behavior, moving along and the minimum gap above.
- Image marker 2: “Arrangement”: the layer order and the four buttons for the layer.
- Image marker 3: “Position”: X and Y.
- Image marker 4: “Size & spacing”: automatic height, width, height and the spacing between the objects in it.
- Image marker 5: “Behavior”: keep together at page break and repeat on every page.

The table follows the tab from top to bottom. It gives the default for groups and says what is different for groups; the explanation is on the page the link points to.

| Setting | For groups | Default |
|---|---|---|
| “Behavior” under “Positioning behavior” | How the group reacts when something above it grows (see The three options). Difference for groups: In every position, “Flowing on contact” carries the addition “(default)”, also in a group or cell (see Which behavior an object has). | “Flowing on contact” |
| “Move along with the object below” under “Move along” | Also applies to groups, only directly in the document, not with “Fixed position” and not for headers and footers (see Move along). | on |
| “Minimum gap above (mm)” | As for all objects (see Minimum gap above). | empty |
| “Layer order” and the buttons “⤒ Bring to front”, “⤓ Send to back”, “↑ Bring forward” and “↓ Send backward” under “Arrangement” | As for all objects (see Arrangement). For groups the following also applies: The layer order of the group also applies to everything in it that has no layer order of its own (see The layer order). | empty (0) |
| “Order in the group” with “⇤ To the start”, “⇥ To the end”, “← One step earlier” and “→ One step later” | Only for a group in a group or cell (see Order in the group). | order of creation |
| “X (mm)” and “Y (mm)” under “Position” | Where the group is (see Position directly in the document and Position in a group or cell). A group without a width of its own cannot be shifted sideways (see Width and position). | position at creation |
| “Automatic height (fit to content)” | On: The group grows with its content. Off: It has a fixed height. See Automatic height or fixed height. | off |
| “Width (mm) — empty = full width” | The width of the group. Empty or 0 means: as wide as the space it is in. See Width and position. | empty; group in a group: 60 |
| “Height (mm)” | The height of the group (see Automatic height and limits). | 25; group in a group: 30 |
| “Spacing between objects (mm)” | If an object in the group with “Flowing on contact” makes way for another, this distance stays between them. It works only inward, not on the position of the group itself; the distance above the group is the “Minimum gap above (mm)”. Which distance applies where is described under Which gap applies where. | 0 |
| “Keep together at page break” in the lower section “Behavior” | The checkbox exists only for groups directly in the document, not with “Fixed position” and not for headers and footers (see Where the checkbox is); what it does is described under The checkbox “Keep together at page break”. Together with the height: see Automatic height or fixed height. | on |
| “🔁 Repeat on every page” | Makes the group a header or footer or an area that stands in the same place on every page. Only for groups directly in the document. See Repeating on every page. | off |
| “Show on pages” and “Exclude these pages” | Only with 🔁 checked: on which pages the area appears. Described under Pages, header and footer. | All pages; none excluded |

If a group is inside another group, a note sentence appears instead of the checkbox; you set the checkbox on the group directly in the document (see The note instead of the checkbox).

#### Automatic height or fixed height

A new group has a fixed height: 25 mm on the sheet, 30 mm in a group. The checkbox “Automatic height (fit to content)” is initially off, unlike for text. If you turn it on later, this height stays the minimum height: The group does not become smaller. How the checkbox, the field “Height (mm)” and the minimum height work together is described under Automatic height and limits.

With a fixed height (checkbox off), the bottom edge of the group is a wall; what it does to the objects in it is described under The fixed bottom edge and where the PDF cuts off. For the group there is an addition: A table in the group stops at the wall. The rows behind it are missing, and if not even the header row fits, the whole table is missing. The message when generating names the table and the number of missing rows; the PDF itself says nothing about it. If the fixed height cuts or shortens text, a shape, a line or an image, a message when generating gives the missing millimeters. How much is really missing you see only in the “Full preview”.

[Image: Excerpt of the canvas: a group across the whole width, with a very light bluish background and a fine edge dashed in blue and gray. In it, one below the other, are the lines “Allgemeine Geschäftsbedingungen”, “1. Geltungsbereich: …”, “2. Zahlung: …”, “3. Eigentumsvorbehalt: …”, “4. Gewährleistung: …” and “5. Haftung: …”. The following line (“6. Datenschutz: …”) is cut off horizontally at the bottom edge of the group, only the upper parts of the letters are visible. Clauses 7 and 8 are missing.]
Caption: A group with a fixed height of 25 mm: Whatever extends below the bottom edge is missing, here from the sixth clause on. The same is missing in the PDF.
- Image marker 1: The bottom edge of the group: This is where printing ends. The sixth clause is cut off, clauses 7 and 8 are missing.

You let a long text, for example general terms and conditions, run across the page edge, as described in the Recipe: a long text across several pages.

One exception applies with the checkbox as without: If the group is the first object on its sheet and no longer fits at the bottom although it would fit on a whole sheet, it stays where it is and extends beyond the bottom (see At the page edge: The first object on a sheet). What background and border of a split group look like is described under Border, background and colors: Across several sheets.

#### Width and position

- **Width empty, directly in the document:** The group is as wide as the page between the margins, with “Ignore page margins (use the full page)” as wide as the sheet. Such a group cannot be shifted sideways, and an X number would push it beyond the right margin (see Working on the canvas: Moving, snapping, hooking in and out). Enter a width or drag the right edge, then you can move it freely and place a second one next to it.
- **Width empty, in a group:** The inner group is as wide as the outer one, counted from its own left edge. If it is not completely at the left, it extends beyond the right edge by exactly that distance, on the canvas as in print; enter a width then.
- The width applies to background and border and determines where texts in the group wrap.
- If you drag an object into a group whose width is empty, the designer enters a width (see Dragging existing objects in).

### Repeating on every page

With the checkbox “🔁 Repeat on every page” in the “Position & size” tab, a group directly in the document becomes a header or footer or an area that stands in the same place on every page, for example a margin note. How you build header and footer, on which pages they appear and for which groups the checkbox exists is described under Building your own header or footer and Header and footer.

What changes on the group: The positioning behavior no longer applies, X and Y are counted from the top left corner of the printed area, and instead of “Keep together at page break” there is a note sentence; in addition, “Show on pages” and “Exclude these pages” appear under the checkbox (see Which fields appear where). It can neither be dragged nor pasted into another group.

### Moving, size, deleting

#### Moving

Drag the group to its place at a free spot, or move the selected group with the arrow keys. Snapping, the insertion line, headers and footers in the way, and moving together work as for any object (see Moving, Keyboard and Multiple selection). For groups the following also applies:

- A group directly in the document without a width of its own cannot be shifted sideways; first enter a width (see Width and position).
- Released over another group, the group moves into it (see Which area of the group counts).
- A group in a group stays within the width and above the fixed bottom edge of the outer group while you drag; if you release it with the mouse pointer outside, it leaves the outer group (see Taking objects out).
- In a multiple selection, fill color, border color and border thickness can be set together for groups.

#### Size with the mouse

A group has four handles directly in the document (right, bottom, bottom right, left), eight in a group, and five on the work area of the group designer (see Handles). For groups the following also applies:

- A group does not become narrower than its content needs and stays at least 8 mm wide. It does not become lower than its content needs when stacked, and stays at least 6 mm high. In the field “Height (mm)”, on the other hand, the lower limit is 4 mm.
- Dragged wider, a group directly in the document grows at most up to the right page margin, and a group in another group at most up to its right edge. This applies in the group designer just as on the sheet. Up to 1.2 mm from this limit the edge snaps (see Working on the canvas: Snapping to edges and centers). In the group designer the outer group is not visible; there a magenta dashed line shows the limit as long as the edge is at it, and disappears when you release. If the content is wider than this limit, the group stays as wide as the content.
- The left handles of the work area in the group designer move the left edge as on the sheet: The value in the field “X (mm)” becomes smaller by as much as the group becomes wider, and the right edge stays in place. Its limit is X = 0, that is the left edge of the outer group or the left page margin; up to 1.2 mm from it the edge snaps there, and the line is at the left edge of the work area. If the content needs more width, X stays at 0, and the group becomes wider toward the right.
- If a group in a group has no width of its own, the drag at its handle starts at the width with which it is drawn, that is as wide as the outer group (see Width and position). If it is not completely at the left and therefore extends beyond the right edge, dragged at the right handle it ends at most at the right edge of the outer group.
- If you drag a handle up or down, the designer turns off “Automatic height (fit to content)” from the first vertical movement and enters the dragged height as fixed (see Working on the canvas: Size handles); the objects in it are fitted in. If you drag only sideways, even at a corner handle, the height stays as it is.
- A group has no handle for rotating or for rounding the corners. It cannot be rotated at all (see Rotation); it gets rounded corners with “Corner radius (mm)”.
- If you drag a group directly in the document or the work area of the group designer wider or narrower, the objects in it follow. Objects standing in the middle (at most 2 mm difference in space between left and right) and those that fill almost the whole width (at most 2 mm of space on the left, at most 4 mm on the right) become wider or narrower along with it; an image keeps its aspect ratio in the process. A table is excluded: It keeps its column widths and the distance to the left edge, even if it almost completely fills the group. When dragging wider, the other objects keep the distance to the edge of the group they are closer to. When dragging narrower, they keep the distance to the left edge until the right edge reaches them; then it pushes them ahead of it, and an image first becomes smaller. If you drag a group in a group at its own handles, the distance to the left edge always applies: Dragged wider, the objects stay where they are; dragged narrower, the right edge pushes them ahead of it as just described.

#### Deleting

Every way deletes the group with its whole content; Ctrl+Z brings it back, also in the group designer (see Undo and redo). Which ways there are and which one asks first is described under Copying, pasting and deleting: Deleting; which button your group has is shown by the column “Delete with” under Which fields appear where.

Only in the group designer is there “🗑 Delete this group”: If nothing is selected, the button leaves the opened group and deletes it without asking; if it was in another group, you are afterwards in that group’s group designer. Message: “Group deleted — Ctrl+Z undoes it.” It is missing in the column, header and cell designer and for an inner group that you opened directly from the sheet.

### What changes in the document?

**On the canvas:** A thin dashed line shows the outline of every group so that you can find and click it, even without background and border; for headers and footers it is blue. It is one of the guides that can be turned off for the whole template (see Grid, snap lines and guides). You see background, border and a fixed height as in the PDF; the border, however, lies completely inside the group (see Where the line sits). Visibility rules have no effect (see Visibility). If a group extends beyond the end of the sheet, the overhang is hatched in orange; how it is split in print is shown only by the “Full preview” (see Markers and warning symbols on the canvas).

**In the PDF:** Nothing of the group itself appears, only its content. It becomes visible only with a color under “Background” or with “Turn on border”; the border is centered on the edge (see Where the line sits). With a fixed height, whatever extends below the bottom edge is missing (see The fixed bottom edge and where the PDF cuts off). A split group carries its piece of background and border on every sheet (see Across several sheets). If its visibility rule is not met, it is missing together with its content (see What happens in the PDF).

---

## Building blocks

*For users · Objects · Page en/bausteine.html*

> **In short:** A building block is an area that looks the same in selected templates: for example a header with the details of the opportunity, an address block, terms, or a footer with the bank details. You edit it like a small template of its own with its own data source (or with no data at all). You insert it into a template as a building block object and say where its record comes from. Only the reference is saved in the template; if you change the building block, the change takes effect immediately in every template that uses it. On its own, a building block does not create a document.

### What a building block is

A building block is a small template whose content is exactly one area. It either needs a record of a certain table, for example an opportunity, or it needs no data and carries only fixed content. Its fields, relationships, rules and variables belong to it alone.

- **The template contains only a reference.** Which building block, through which connection it gets its record, and which prefix its variables carry. Smart Templates inserts the content only when the document is generated. That is why every change to the building block takes effect immediately in all templates that use it; there are no older versions.
- **A building block is not a document.** It does not appear in the template picker, in the button assistant or in the flows. If a button or flow points at a building block anyway, nothing is created; the message says “… is a building block and does not create a document on its own.”
- **For one record, not for every row.** A building block hangs on the main record of the template or on a lookup (N:1), never on a list (1:N) and not in a table cell.
- **License:** Building blocks are included without a feature of their own; as with templates and documents, nothing is counted (see Prices and licensing options).

A building block is meant for a header, address block, terms, signatures or a footer. Long lists belong in the template itself (see What is different in a building block).

### The “Building blocks” window

In the template row at the top, click “Building blocks” (the symbol with the puzzle piece). When it opens, the window reads all building blocks and the templates they are in. The header and buttons of the window stay in place; if the list is long, only the list scrolls.

| Column or button | Meaning |
|---|---|
| “Name” | The name of the building block. A gray addition notes something special: “inactive”, “rule cycle” (red) or “not readable”. |
| “needs” | The table whose record it needs, or “— without data”. |
| “Used in” | How many templates it is in, or “nowhere”. |
| “changed” | When it was last changed. |
| Below the list | The uses of the selected building block: for each template its connection there (column “Connection”), its prefix and the button “Open template”. |
| “+ New” | Creates a building block (see Creating a building block). |
| “Edit” | Opens the selected building block (see Editing a building block). |
| “Insert into this template” | Inserts it into the open template (see Inserting a building block). A building block with a rule cycle and an inactive one are not offered; the mouse pointer gives the reason. |
| “Export” | Saves the selected building block on its own as a file (see Exporting and importing). |
| “Import” | Fetches a building block from such a file. The open template stays open; afterwards the imported building block is selected in the list (see Exporting and importing). |
| “Delete” | Deletes it after a confirmation. Locked as long as it is in a template; the mouse pointer names the templates: “Locked: the building block is still in …. Remove it there first.” If the uses cannot be read at the moment, “Delete” stays locked as well. |

If there is no building block yet, the window says “No building block yet — create the first one with »+ New«.”

> **Good to know:** An inactive building block (set to “Inactive” in Dynamics) is no longer offered for insertion. Where it is already placed, it continues to be inserted; for a building block, inactive therefore does not mean “print empty”.

### Creating a building block

1. In the “Building blocks” window, click “+ New”.
   → The “New building block” window appears.
2. Enter a “Name”, for example “Chancenkopf”.
3. Under “Needs”, choose what the building block reads: “Data from a table” (you choose the table in the next step) or “without data” (fixed content only, for example a footer with bank details).
4. Enter the size of the “Area”: width × height in millimeters, at least 10 × 5. The defaults are the width of the type area of the open template and a height of 40 mm.
5. Click “Create”.
   → The building block is created and opens as a document of its own, with a yellow band at the top (see Editing a building block). With “Data from a table”, the designer asks right away for the primary source, as under “⚙ Manage data sources” (see Data sources and relationships). The area contains a first text with the name of the building block; you can delete it.

The width of the area is the same in every template. The height is the minimum height: The area grows with its content like a group with “Automatic height (fit to content)”.

#### What is different in a building block

As long as a building block is open, the designer lacks what belongs only to a document: “Manage buttons in Dynamics”, the flows, “Duplicate”, “Blank page”, “Page break”, the buttons for adding and removing pages on the sheet, and “Building block”: A building block inside a building block is not possible. The Template settings have no “E-invoice” tab, no “Keep warm” and no “PDF name”; at the top a yellow note says that the settings there apply only to the preview of the building block.

- **The area is the building block.** It cannot be deleted, only emptied (“The area belongs to the building block and cannot be deleted — delete the objects in it.”). New objects go into the area. On the area you set only what is the same in every template: size, background, border, corners and spacing. Visibility, position, positioning behavior, keep together and “Repeat on every page” you set on the building block object in the template (see The building block object in the template).
- **Inside, the rules of a group apply**, in the building block as when inserted (see Groups): Texts, images, codes and shapes stay fixed without a setting of their own, nothing moves along, and a table has no page break of its own. At the end of a page the whole area is split, and only if “Keep together at page break” is off on the building block object.
- **Language, number and currency format and font** come from the template the building block is in when printing. What you set in the template settings of the building block applies only to its own preview. Fixed settings on a variable of the building block (symbol, decimal places) stay.

### Editing a building block

You open a building block in three ways: in the “Building blocks” window with “Edit”, by double-clicking the building block object in a template, or in the object’s properties window with “Edit building block …”.

1. The designer asks “Edit building block »…«?” and says where it is placed: “Caution: this building block is embedded in: … Every change takes effect immediately in all of them.” If the open template has unsaved changes, that is mentioned as well.
2. Click “Open building block”.
   → The building block appears in the designer as a document of its own. At the top is the yellow band with the building block symbol and “Building block »…« — embedded in: … Changes take effect immediately in all of them.”, plus “← Back to »…«” (the template you came from) and “Building blocks …”.
3. Change the content as in a template and save with “Save”.

#### What is checked when saving

- **The designer creates field lists itself.** On the primary source, on further sources and on every relationship with a rule, it then records which fields the building block reads. Without a field list, a building block could not be saved.
- **Errors block saving** with the list of reasons: “The building block cannot be saved like this: …”. This applies above all to a reference that the building block does not have, for example a field that does not exist in its table, or a typo (see What a building block may read).
- **If the building block is already in templates**, saving asks loudly (“Caution when saving the building block: … Save anyway?”) if its rules depend on each other (rule cycle), if you removed or renamed a variable that a template uses (the template is named), or if it has been given a different primary source. With “Save anyway” it is saved; the designer does not rewrite the templates themselves.

> **Caution:** A removed variable that a template uses in its text stays empty there. If it appears there only in a condition, printing takes the else branch and reports it as a warning (“variable '@…' in a condition: there is no variable with this name …”). That is why the question when saving names every template and place; correct them afterwards in the template.

### Inserting a building block

1. Open the template and, in the ribbon in the “Containers” section, click “Building block”. Or choose a building block in the “Building blocks” window and click “Insert into this template”.
   → The “Insert building block” window appears. At the bottom left, “Manage building blocks” leads to the “Building blocks” window with the chosen building block preselected; you also create a new one there.
2. Under “Building block”, choose the building block. Inactive and unreadable ones are gray and cannot be chosen; a building block with a rule cycle carries the addition “rule cycle” and cannot be inserted.
3. Under “Connection”, choose where its record comes from. The sentence above says what it needs, for example “»Chancenkopf« needs: Verkaufschance (opportunity). Choose where it comes from in »Angebot«:”. The button shows the chosen connection with display names, for example “Angebot › Verkaufschance”; if exactly one connection in the loaded part leads to this table, it is already chosen. A building block without data needs no connection; the row is then missing.
   → A click on the button opens the “Choose connection” window, built like the field picker: at the top the search box, below it a line that says how many connections lead there, and the tree with the lookups (N:1) of the main record, without fields, lists (1:N), rules and variables. It has two parts: at the top, expanded, “Leads directly to »…«”, below it, collapsed, “Via another lookup”.
   - Under “Leads directly to »…«” are the main record, if it has this table, and every lookup that points directly to it. You see them right when the window opens, even if the template has hundreds of lookups. If none leads directly there, it says “No lookup leads there directly — expand »Via another lookup« below.”
   - “✓ Use this connection” appears on the main record, if it has this table, and on every lookup that leads to it. The one already chosen carries “✓ Selected”. A click takes over the connection and closes the window.
   - For a path over several levels, expand “Via another lookup” and there a lookup with ▸, for example Angebot › Verkaufschance › Firma, down to the sixth level. A lookup at the top can be expanded this way as well.
   - Relationships are printed down to the sixth level, and what the building block itself reads through its relationships lies below the connection. If both together reach deeper, the row shows in gray “too deep for this building block — its own relationships reach 1 more level” instead of the button; something would stay empty in print there. Then choose a connection closer to the main record.
   - The search finds lookups by their display name and by their internal name, in both parts, but only in what is already loaded. What lies behind a lookup that has not been expanded yet it finds only after you have expanded it.
   - Expanding, searching and closing (×, Escape or a click outside) change nothing in the template. Afterwards the focus is back on the button under “Connection”.
4. Check the “Prefix”. The name of the building block is suggested, with “_” instead of spaces (“Adresse Kunde” becomes “Adresse_Kunde”). Letters, digits and “_” are allowed, but not a digit at the start. The prefix must be unique in the template and must not have the same name as a variable of your own. Next to it is how the variables will then be named: “Variables are then called »@Chancenkopf.Name«”.
5. Read the lines below. A red sentence “The area would stay empty like this …” blocks insertion. The last line gives the cost, for example “Queries of this template afterwards: 2 instead of 1 (+1). Joins of the main query: 3 of 10. The table of the connection itself costs no query — it becomes a join.” (see What a building block costs in queries).
6. Click “Insert”.
   → The building block object is at the bottom of the document and is selected. Move it to its place. Undo (Ctrl+Z) reverts the insertion in one step.

- **If no connection leads there,** as far as the template is loaded, a gray line under the button says: “No connection selected yet — open »Choose connection« and expand lookups.” Usually it is just behind a lookup that has not been expanded yet. The sentence is red only if there really is none: “In »…«, no connection that this building block can use leads to the table … — neither the main record nor a lookup (N:1), not even over several steps. Choose a different building block.”
- **Field list:** When inserting, the chosen lookup gets its field list so that the building block reliably gets its fields. If the fields of the table cannot be loaded at the moment and the template itself reads fields through this lookup, “Insert” stays locked and gives the reason; try again a little later. “Cancel” changes nothing in the template.
- **Not possible:** in an open building block (“A building block cannot be inserted into another building block (version 1).”), in a new template that is still a draft, and in a template without a primary source.
- **The same building block twice** in one template is possible, for example one address block for the invoice customer and one for the delivery customer, with two prefixes.

### The building block object in the template

On the canvas, the building block object has a purple, dashed frame and, at the top left, the label with the building block symbol, the name and the connection, for example “Chancenkopf · Connection: Verkaufschance (opportunityid)”. Its content appears slightly gray and cannot be clicked: A click always hits the object itself. In the structure it is called, again with the symbol, “Building block »Name«”, without the content below it.

- **Move yes, size no.** Drag the object to its place. It has no handles: Width, height, background, border and content come from the building block. The height of the area is the minimum height; if the content grows, the object grows with it. An object below it with “Flowing” keeps the drawn distance in the process (see Positioning behavior). The canvas shows the height from the building block, as with every group.
- **What you set on the object:** the visibility, the position, the positioning behavior, “Keep together at page break” and “🔁 Repeat on every page”. With these, the building block becomes a header or footer, for example for bank details and management in selected templates (see Pages, header and footer).
- **The properties window** shows, in the “Building block object” box, the building block, its connection (“Connection”), its prefix, its status and its variables, plus “Edit building block …”. Connection and prefix cannot be changed there: To do that, insert the building block again and delete the old object.
- **Copy, cut, Ctrl+D:** Only the reference is copied. When pasting, the prefix gets a number if it is already taken (“Chancenkopf2”). In another template without a matching record, the object shows the label “Connection missing”.
- **Delete** the object like any other. The building block itself stays; as soon as the template is saved, it no longer counts among its uses in the “Building blocks” window.

#### The variables of the building block

Of a building block, the template sees only its variables. In the Data tree and in every field picker they are in a category of their own, “Building block »Chancenkopf«”, with the prefix before the name: “Farbe” becomes “@Chancenkopf.Farbe”. If the same building block is in the template twice or the prefix differs from the name, the prefix is shown in parentheses.

- You use them like a variable of your own: in text as `{{@Chancenkopf.Farbe}}`, in conditions as `@Chancenkopf.Farbe` (see Variables). It has a value in the whole document; it is calculated with the record of the building block.
- They can be edited only in the building block itself. A dot in the name exists only for building blocks; the name field of a variable of your own does not accept one.
- If a variable of your own in the template has the same name as the prefix of a building block, the designer warns, and the area of the building block stays empty.
- Fields, relationships and rules of the building block appear nowhere in the template: not in the data tree, not in the field pickers, not under “⚙ Manage data sources”. What a building block brings along belongs to it.

### What a building block may read

A building block must work the same in every template. That is why a fixed rule applies: **A building block reads only what it has itself and never looks above its connection.** A field that is empty or missing on the record of the connection stays empty, even if the template has a field of the same name. An example: The budget of the opportunity is empty, the quote has a budget of €5,000. The building block on the opportunity shows an empty budget, never the €5,000 of the quote.

- **Unknown references** in the building block, for example a typo or a field that its table does not have, already block saving (see What is checked when saving).
- **If a rule of the building block names something it does not have** or something that, on the record of the connection, only the template provides (a relationship or a rule result of the template, and for the connection to the main record also a source of the template), the whole area stays empty. The object then shows the label “Rule reads unknown names” or “Rule reads the main template”, and the document is not sent out by email or flow (see When the area stays empty).
- **A lookup field** is read by the building block through a relationship of its own: In the building block, expand the lookup in the data tree and take the field from there. There is one exception today: If the content of a building block names a field behind a lookup, for example `{{parentaccountid.name}}`, without having the relationship itself, then when inserted it shows the value that the template fetches through the same lookup. In a template without this relationship the field stays empty. So create the relationship in the building block.
- **Conversely**, the template reads nothing that only the building block brings along. If the template fetches a lookup only because the building block needs it, and then itself reads a field through it, it cannot be saved: “The template cannot be saved like this: … only works via the building block …”. Create the relationship in the template itself; the building block then shares it.

### What a building block costs in queries

The record of the connection costs no query of its own: It becomes a join of the query the template makes anyway. Everything the building block brings along itself counts for the familiar reasons: at most one query per rule, one per further source, a new one when a chain becomes more than four lists (1:N) deep, and a new one at the limit of ten joins. A building block never creates a new reason for a query. Reading the building block itself is not a data query.

- **Two lists side by side:** If the building block brings a list (1:N) and the template itself has a list in the same query (for example the line items of the quote), one of the two gets a query of its own. Side by side in one query, the rows would otherwise multiply. Which of two lists side by side gets its own query depends on the order of the relationships — the number of queries and the printout do not.
- **Ten joins:** The lookups (N:1) of the building block count against the ten joins of the shared query. If it gets tight, a lookup gets a query of its own; that can also be one of the template. The insert window gives the number beforehand.
- **Depth:** Under a lookup the building block slides one level deeper. If a chain then reaches beyond six levels, the part that is too deep stays empty, and the object shows “Depth limit 6”.

The “Insert building block” window gives the number before and after. The whole plan is delivered by the action with `Mode=plan`, with the building block inserted (see Actions and APIs).

### Labels on the building block object

If something is wrong, the object carries a label at the top right. Red means: The area stays empty, or all rules are off. Yellow means: The building block is inserted, but with a finding. The sentence for it is shown by the mouse pointer over the object and by the properties window under “Status”.

| Label | Meaning | What you do |
|---|---|---|
| “⏳ Building block »…« is loading …” | The designer is still fetching the building block. | Wait a moment. |
| “⚠ Building block »…« is missing” | The building block no longer exists, for example because it was deleted in Dynamics. | Delete the object, or create or import the building block again. |
| “⚠ Building block »…« not readable (permissions)” | You are not allowed to read the building block. Documents are still printed completely. | Ask your administrator about the role (see Rights and roles). |
| “⚠ Building block »…« could not be retrieved”, “⚠ Retrieval failed” | The retrieval failed. | Open it again later. |
| “⚠ »…« is not a building block”, “⚠ Building block »…« is damaged”, “⚠ Building block »…« is not readable” | The reference points to an ordinary template, or the building block has no area or cannot be read. | Open and check the building block in the “Building blocks” window, or delete the object and insert it again. |
| “⚠ Connection missing”, “⚠ Connection does not fit” | The record of the connection is missing in the template, or it has a different table. | Insert the building block again and choose the right connection. |
| “⚠ Prefix used twice”, “⚠ Prefix not valid”, “⚠ Prefix = variable name” | The prefix is already taken, spelled incorrectly or has the same name as a variable of your own. | Rename your own variable or insert the building block again with a different prefix. |
| “⚠ Rule reads unknown names”, “⚠ Rule reads the main template” | A rule of the building block names something it does not have (see What a building block may read). | Correct the rule in the building block. |
| “⚠ Rule cycle — ALL rules off” | Rules of the building block depend on each other. Then all rules of the whole document are off, including those of the template. | Correct the rules in the building block. |
| “⚠ No building block inside a building block”, “⚠ not possible in a table”, “⚠ only on a group” | A building block is in a building block or in a table cell, or the reference is on an object that is not a group (for example after a manual change to the file). | For “⚠ No building block inside a building block” and “⚠ not possible in a table”: move the object to an allowed place or insert the building block again. For “⚠ only on a group”: remove the “baustein” entry from the object, for example in the template file; do not delete the object itself. If a building block is to be there, additionally insert it again at that place. Only inserting it again leaves the entry on the object and with it the message, and the document stays incomplete (see When the area stays empty and Problems and messages: Building blocks). |
| “⚠ Name already taken” | A name that the building block brings along already exists in the template. | Insert the building block again with a different prefix. |
| “⚠ could not be inserted safely” | The designer could not make sure that every reference was rewritten correctly; it prefers to leave the area empty. | Check the content of the building block, above all summaries in table cells. |
| “ⓘ unknown references” | Inserted, but a reference in the content does not resolve; it stays empty. | Correct the reference in the building block. |
| “ⓘ inactive” | The building block is inactive. It continues to be inserted but is no longer offered for insertion. | Nothing, or set it active again. |
| “ⓘ Depth limit 6” | Part of the building block is too deep and stays empty. | Bind the building block closer to the main record or shorten the chain in the building block. |
| “ⓘ Note” | Another note on insertion, for example that a relationship now loads all columns. The sentence is shown by the mouse pointer and the properties window. | Depends on the sentence; usually add a field list in the building block. |

### When the area stays empty

An empty building block area counts as an error, whatever the reason: The building block is missing, the connection does not fit, a rule reads unknown names, the retrieval failed. The same applies to a rule cycle in the building block, because it switches off all rules of the document. The space of the area then stays empty.

- **Email:** A button or action that prepares or sends the document by email aborts; no email is created. The message gives the reason: “The document is incomplete because of a building block: … — no email was created.”
- **Flow:** A flow on the button is not triggered, because it could send the document to a customer. The PDF itself comes through, and the “Smart Templates” window shows the warning “The flow »…« was NOT requested — the document is incomplete because of a building block …”. That is the wording for a flow via the trigger table, as the designer creates it; for a flow with a row trigger on the table of the record, which Smart Templates starts directly, it says “triggered” instead of “requested” (see Actions and APIs).
- **E-invoice:** No file is created: “The template is incomplete because of a building block: … — no file was created.”
- **A button that only shows the PDF** delivers it anyway, with the warning in the “Smart Templates” window (see What happens on click). Nothing is sent in the process. This should rarely happen; usually a building block has been deleted or a connection no longer fits.

The messages for these cases are described under Problems and messages.

### Exporting and importing

“Export” in the template row takes along the building blocks of a template: Each one that is used appears once, in full, in the file. You export a building block on its own in the “Building blocks” window.

When you “Import”, the designer compares each building block in the file with those in this environment by its identifier. The identifier is assigned when the building block is created and stays the same on export.

- **Same content:** The existing one is taken silently.
- **Missing here:** It is created.
- **Different content:** The “Building blocks from the file” window shows both versions with their dates, and you choose:
   - “Take the existing one” (default): The template points to the building block in this environment; nothing is changed. If the existing one lacks something the template needs, for example a variable or the matching table, that is shown below.
   - “Overwrite”: The building block here gets the content from the file. This takes effect immediately in every template that uses it; they are listed. If this removes something there, a variable or the matching table, or a rule cycle would arise, that is shown below, and “Apply” asks once more, as when saving a building block.
   - “Create as a copy”: a new building block with its own identifier and the addition “(copy)” in the name; only the imported template points to it.

**You import a building block on its own** most simply in the “Building blocks” window with “Import”: The file is checked as with importing in the template row, then the same choice applies as above (if it is missing here, it is created; if the same, it is taken; if different, the “Building blocks from the file” window asks). The open template stays open; afterwards the “Building blocks” window is shown again, with the building block selected. The window does not accept a template: “»…« is a template, not a building block — templates are opened with »Import« in the template row.” If exactly this building block is open right now and has unsaved changes, “Overwrite” asks beforehand (“Overwriting discards them. Overwrite anyway?”); afterwards it is reloaded with the content of the file.

With every choice, the designer checks the template as it would then stand here; with errors it cannot be applied. After “Apply”, the building blocks are stored and the template opens; you store the template itself, like any import, with “Duplicate” (see Managing templates). A file with a building block on its own opens as a building block after the import.

### Building blocks and AI

- **AI package:** If the template contains building blocks, the section “Building blocks in this template” follows after the template, with name, connection (in the package “binding”, like the key “bindung” in the template JSON), prefix and variables for each building block object. The AI does not get the content of a building block (see Working with an external AI).
- **AI changes** may only move a building block object, set its visibility or remove it. A change that alters it, fills its content or creates a new one is rejected; so is a new reference of the template to something that only the building block brings along. What was already like that in the template does not stop a change.
- **If the AI changes a building block itself**, the answer says how many templates it is in, and the designer shows it as a message (see Working with the AI assistant in Copilot).

### Building blocks in Dynamics

- Building blocks are in the same table as the templates. The column “Art” distinguishes them; in the lists of templates (Active, Inactive, Quick Find view, Associated view) they do not appear, they are in the view “Bausteine”.
- The same role permissions apply as for templates. Anyone who may not read a building block sees the label “not readable (permissions)” in the designer; it is still printed completely.
- Building blocks are not kept warm separately but together with the templates they are in (see Keep warm).
- Deleting through the view in Dynamics is not locked. The templates that used it then show “Building block »…« is missing”, and their documents are no longer sent out by email or flow. So delete building blocks in the designer: There “Delete” is locked as long as the building block is in use.

### What does not exist (yet)

- A building block inside a building block.
- A building block per row of a list (a connection over a 1:N relationship).
- A size of its own per template; width and minimum height always come from the building block.
- Turning an existing group into a building block. Create it with “+ New” and copy the content into it.
- Duplicating a building block. The copy would carry the same identifier; a copy with its own identifier is created on import with “Create as a copy”.
- Inserting directly into a group or by dragging from the window. The building block goes to the bottom of the document; move it afterwards.

### What changes in the document?

**On the canvas:** The building block object shows the content of the building block with the sample data of the template, slightly gray, with a purple dashed frame and the label with the building block symbol, the name and the connection. Frame and label are only aids on the canvas. A label at the top right reports a finding; if the area is empty, it is hatched in red.

**In the PDF:** At the place of the object is the content of the building block with the record of its connection, in the language, number and currency format and font of the template. If the content grows beyond the height of the area, the area grows with it, and an object below it with “Flowing” moves down. If the area stays empty, its space stays empty, and the document is not sent out by email or flow.

---

## Data tables

*For users · Tables · Page en/tabellen.html*

> **In short:** A “Data table” prints one row per record of a list from Dynamics, for example per line item of a quote. Its rows come from a rule; that is where you filter and sort. You set the whole table on the right in the properties, a column after a click on its cell. A double-click in a cell opens the designer for the heading or for the content of the whole column. On the canvas there is one sample row; all rows are shown only by the full preview and the PDF. How you design and merge cells and how the table behaves across several pages is described under Cells, header row and page break; a table without a data source is a Free-form table.

### Creating a data table

A data table always stands on a rule. The rule determines which records become rows. The procedure is the same on every route: choose the row source, confirm the new rule for a list, choose columns. A table without a data source, whose rows and content you enter yourself, for example for a header block with address and document data, is not a data table but a “Free-form table”; how you create it is described under Free-form tables.

1. At the top in the ribbon, in the “Tables” section, click “Data table”.
   → The window “Choose the row source of the table” opens with your data tree.
2. For the list the rows should come from, for example “Positionen”, click “choose”.
   → The designer creates a rule that lets all rows of this list through and opens its window.
3. Filter or sort right here, or click “Save”. More under Rules: The “Edit rule” window.
   → The window “Choose columns — …” opens; after the dash is the name of the row source.
4. Check the fields that should become columns, and click “Apply”.
   → The table is on the last sheet below the existing content and is selected. The first time, a speech bubble points at it: “Double-click a cell to design the column”.

It is created only in the last step. If you cancel on the way, with “Cancel”, the ✕, the Esc key or a click next to the window, nothing is left behind: no half table and no rule without a table.

#### All routes to the data table

| Route | What happens |
|---|---|
| Click “Data table” in the ribbon | As described above. A selected group directly in the document does not count here; the table then still goes below the content. All the rules for where a click inserts are described under The ribbon: Where a click inserts. |
| Drag the button “Data table” onto the sheet | The same windows. The table goes to the place where you release; an insertion line shows beforehand where space is made. If you release over a group, the group is highlighted, and the table goes into it. |
| Drag a list from the “Data” area onto the sheet | Choosing the row source is skipped. The new rule with its window and the column selection follow. Where the table goes is decided by the place where you release, as when dragging the button. |
| Drag a rule from the “Data” area onto the sheet | The table stands on exactly this rule. No new rule and no rule window are created; you go straight to column selection. |
| In the window of a group or cell, click “Data table” | The table goes into the opened group or cell, 2 mm from the left edge and 2 mm below the lowest object in it (see The ribbon: Where a click inserts); its columns are fitted to its width minus 6 mm. This button can only be clicked, not dragged. For a table per row in a table cell, take the next route. |
| Drag a list or rule of a row into a table cell: in the column designer from the branch “Per row”, on the sheet from the data tree under the list of the outer table onto a simple data cell | A small table of its own in every row of the outer table, see Cells, header row and page break: Table in a table cell. |

> **Good to know:** Under a further source, the data tree does not offer its lists as a row source: They belong to every single row of that source, and on the sheet they do not exist. You set up a table over the rows of a further source on a rule at the source itself, created with the ƒ sign at the source (see Data sources and relationships: Additional sources).

### The new data table

On the canvas, a data table shows its header row and exactly one sample row. In the sample row the fields appear as blue markers with their name, not their values. All rows, the page breaks, the repeated headers and the zebra stripes of the rows are shown only by the full preview and the PDF, filled with the sample record (see Full preview and PDF: The full preview).

[Image: Excerpt of the canvas. At the top left is the heading “RECHNUNG” in large bold type. Below it is a table with a blue header row (white: Pos.-Nr., Bezeichnung, Menge, Einzelpreis, Gesamt; Menge, Einzelpreis and Gesamt right-aligned) and a single white sample row with dashed cell borders in which every field appears as a blue-shaded marker with its name (Pos.-Nr., Bezeichnung, Menge, Einzelpreis, Gesamt). Around the table is a blue frame with a square grip on the left and on the right. At the top left above the table sits a blue button with a cross of four arrows. Above the top right corner are two blue buttons “Column” and “Row”. Above the middle of the table a dark blue speech bubble “Double-click a cell to design the column” points down at the table.]
Caption: A new data table on the canvas: header row and a sample row with field markers.
- Image marker 1: The header row with the column titles, blue with white text.
- Image marker 2: The sample row: Fields appear as blue markers with their name, not with their values. All rows are shown only by the full preview and the PDF.
- Image marker 3: With the ✥ you move the whole table; a click on it selects it.
- Image marker 4: The bar above the top right corner: add a column, create an extra row.
- Image marker 5: Grips for the table width: All columns grow or shrink in the same ratio.
- Image marker 6: The speech bubble appears once per template and disappears at the next click.

| Part | How it starts |
|---|---|
| Columns | One column per checked field, all of equal width: The usable page width (sheet minus margins, with “Ignore page margins (use the full page)” the whole sheet) is divided by the number of fields and rounded to whole millimeters. If the sum would then exceed this width, it is rounded down to 0.1 mm instead; on A4 with the default margins, two fields become 87.5 mm wide each. With no field checked or with “No fields (2 default columns)”, two empty columns “Column 1” and “Column 2” are created. |
| Headings | The name of the field in the language of the template. |
| Content | Amounts in the currency format of the template. Numbers with as many decimal places as Dynamics provides for the field; if nothing is stored there, with at most four. The notation, for example 1.234,56, comes from the template. Date fields in the “Date format” of the template, as of our current version also without a time even if the field carries one in Dynamics (see Numbers, currency and dates: Date & time). Yes/no, choice and status fields with their label from Dynamics in the option label language, for example “Bezahlt” or “Offen” (see Numbers, currency and dates: Option label language). Everything else as it is in Dynamics. You set the formats under Numbers, currency and dates: “Numbers & date” tab. |
| Horizontal alignment | Numbers and amounts right-aligned, everything else left-aligned. With the two default columns, the first is on the left, the second on the right. |
| Image fields | An image field becomes an image column: an image of 20 × 15 mm, smaller in narrow columns. Beforehand the designer asks about the quality. The column has a column designer from the start, in which you change the image freely. A file field likewise becomes an image column, without the question. If a record has no image, its cell stays empty. More under Images: Images from the data. |
| Header row | Blue background (#2B4CC4), white bold text at 9 pt, at least 8 mm high. |
| Data rows | Text at 9 pt, dark gray, at least 7 mm high, 1.5 mm between cell edge and content. |
| Lines | Per column a light gray line of 0.5 pt above and below the header cell and below the data cell. |
| Font | The font that applies to text in the Template settings: “Font” tab. |

> **Good to know:** You change font, color and horizontal alignment on the text in the header or column designer (see Cells, header row and page break: The windows for designing). To do this, double-click the cell and then the text; the “Edit text” window opens (see The “Edit text” window).

- **Sample rows:** The canvas loads at most 20 sample rows from each list and calculates with them, also in rules, totals and conditions. Printing uses all of them (see Data sources and relationships: What the canvas loads and what is printed). If a list has more, the canvas says so once; the wording of the message is given in Data tree and field picker: Expanding, loading, depth.
- **Speech bubble:** The first time a table is inserted into a template, a speech bubble says “Double-click a cell to design the column”. When it appears and when it disappears is described under The ribbon: Speech bubbles on first insertion. If the table goes directly into a cell, it does not appear.

### The row source

The row source says which records the table prints as rows, for example the line items of an order. It is a rule. You choose it when creating the table and can look at it or change it later.

#### The “Choose the row source of the table” window

It appears after a click on “Data table”, after dragging the button and when you change the row source of a table. What you choose is a path, not a value: The tree shows relationships and rules, but no fields. You always choose from the document, not from a table row; for a table per row see Cells, header row and page break: Table in a table cell.

[Image: The window “Choose the row source of the table” on a darkened background. At the top the title with a round ⓘ and a ✕ on the right. Below it an explanatory text (“A table gets its rows from a rule …”) and a search box “Search for a relationship or rule…”. In a bordered tree is the expanded source “Rechnung ★” with an ƒ box and an ⓘ, below it a search box of its own “Search in »Rechnung ★«…” and four rows: “Kunde” with a blue N:1 marker and an ƒ box; “Rechnungspositionen” with a purple 1:N marker, on the right gray “choose” and an ƒ box; the rules “Positionen” and “Kennzahlen” with a purple ƒ sign, on the right each a gear and “choose”. Below the tree on the left is the button “Free-form table (no data)”.]
Caption: The window “Choose the row source of the table” with the data tree of a sample invoice.
- Image marker 1: The ⓘ explains the whole procedure from choosing to the finished table.
- Image marker 2: The search box filters the tree as you type.
- Image marker 3: “choose” on a list: The list becomes the row source. The window of a new rule and the column selection follow.
- Image marker 4: ƒ on a relationship: Creates a further rule there.
- Image marker 5: “choose” on a rule: The rule becomes the row source, and you go straight to column selection.
- Image marker 6: “Free-form table (no data)” creates a free-form table instead of the data table.

| Part of the window | What it does |
|---|---|
| ⓘ at the title | Explains the whole procedure from choosing to the finished table. |
| Note “A table gets its rows from a rule …” | Summarizes the two routes: choose an existing rule or a relationship for which a rule is created. |
| “🔍 Search for a relationship or rule…” | Filters the tree as you type. What you have expanded stays expanded. |
| “choose” on a list | Takes this list as the row source. The window of a new rule follows, then the column selection. |
| “choose” on a rule | Takes this rule as the row source; you go straight to column selection. If the rule returns only one record, the button has a warning border, and a question follows (see below). |
| ƒ on a relationship | Creates a further rule on this relationship (see Rules: Creating a rule). |
| “Free-form table (no data)” | Creates a free-form table instead of the data table. When changing the row source, the button turns the existing table into a free-form table: The columns stay, and what was previously in the columns is copied into their rows. |
| ✕, Esc or a click next to the window | Cancels. At this point nothing has been created yet. |

**Question “This rule returns only one record”:** If the selection of a rule is set to “Only the first”, “Only the last” or “The one at a specific position”, it returns exactly one record and no list; the table would then stay empty (the reason is given under Rules: Keeping specific records). If you choose such a rule with “choose”, the designer therefore asks. “Use it anyway” takes the rule, “Cancel” does not. If all rows are to be printed, in the rule in the “Selection” tab clear the checkbox “Keep only specific records”. For a limited number only, set the selection to “The first N (e.g. the top 5)” (see Rules: “Selection” tab: sorting and selecting).

**The window of the new rule:** If you have chosen or dragged a list, the designer creates a rule named after the relationship and opens its window “Edit rule”. Only after “Save” does the column selection follow; if you rename the rule beforehand, the new name applies. “Cancel”, the ✕, Esc or a click next to it remove the rule again, and no table is created. If you set the selection in the window to a single record, the designer warns: “This rule returns only ONE record — the table you are building from it will therefore stay empty. …”

#### The “Choose columns — …” window

It follows the row source. Until the fields have been loaded from Dynamics, it says “loading fields…”.

[Image: The window “Choose columns — Rechnungspositionen”. At the top the title and a note (“Check fields → each one becomes a column (header = field name, value = field per row) …”), below it a search box “Search field…” and the collapsed row “Custom variables”. In a box outlined in light purple, “Fields per row — Rechnungspositionen”, there is first a search box of its own “Search in »Fields per row — Rechnungspositionen«…”, below it rows with checkboxes, a field type marker and on the right each “per row”: Pos.-Nr., Menge, Einzelpreis and Gesamt are checked, Einheit is not. Below it the expanded relationship “Produkt” (N:1 marker) with “Bezeichnung” checked and “Artikelnummer” and “Einheit” unchecked; last, collapsed, “Chargen” (1:N marker) and the rule “Chargenliste”. At the very bottom the buttons “Cancel”, “No fields (2 default columns)” and on the right the blue button “Apply”.]
Caption: The window “Choose columns” with five checked fields, among them a field from the relationship “Produkt”.
- Image marker 1: The note explains: The header is the field name, the value is the field per row.
- Image marker 2: The search box filters the fields; your checkmarks are kept.
- Image marker 3: Every checked field becomes a column.
- Image marker 4: Relationships can be expanded; their fields can become columns as well, here the name of the product.
- Image marker 5: “No fields (2 default columns)” creates the table with two empty columns.
- Image marker 6: “Apply” builds the columns from the checked fields and creates the table.

| Part of the window | What it does |
|---|---|
| Note “Check fields → each one becomes a column …” | Explains the selection: The header is the field name, the value is the field per row, an image field becomes an image column. |
| “🔍 Search field…” | Filters the fields. |
| Tree “Fields per row — …” | The fields of a row with checkboxes to check. For a rule, its calculated fields and its variables are also there (see Rules: What is different for a variable of the rule); if the rule summarizes rows, its result fields are there. Relationships can be expanded; their fields can become columns as well, for example the name of the product. Your checkmarks are kept while searching and expanding. |
| “Cancel” | Creates nothing and removes a rule that was just created. Esc and a click next to the window work the same way. |
| “No fields (2 default columns)” | Only when creating: The table gets two empty columns; you set the fields per column afterwards. |
| “Keep columns” | Appears instead of the previous button when you change the row source of an existing table: Only the row source changes, the existing columns stay in place. |
| “Apply” | Builds the columns from the checked fields. Without a checkmark it works like the middle button. When changing the row source, the new columns replace all previous ones including their design; Ctrl+Z brings back the old state. |

If an image field is checked, the designer first asks once, for all image columns, about the quality. With several image fields the window is called, for example, “Quality for »2 image columns«”. After “Cancel”, Esc or a click next to it, the column selection stays open, and nothing is created (the answers and everything else: Images: Quality).

#### The “Data source & sorting” window

Select the table and click “Data source…” in the “Data” section. If the table stands on no rule that the designer finds from the table, the button is called “⚙ Data source & sorting”. Changes in the window apply immediately; “✓ Done”, Esc or a click next to it close it.

| Part of the window | What it shows or does |
|---|---|
| Section “Row source” with ⓘ | The ⓘ explains the row source, the sample row and the 20 sample rows of the canvas. |
| Row “Rule” | The name of the rule and of the relationship it lies on. For an older table directly on a relationship, the row is called “Relationship”. For a table in a table cell, the path to the list appears there, from the row of the outer table. For a free-form table, “— no data (free-form table) —” appears there. Nothing can be typed here. |
| “Other data source…”, for a table without a rule “Change…” | Opens “Choose the row source of the table”, see Changing the row source. For a table in a table cell the button is grayed out: You change its source only by dragging the list from the data tree into it again. |
| Note “Filter, sorting, grouping and selection are in the rule …” with “⚙ Edit rule” | If the table stands on a rule, the button opens that rule. There are then no fields of their own here for filter and sorting. |
| Sort levels | Only for tables that stand on no rule that the designer finds from the table, see Sorting on the table itself. |

#### Changing the row source

1. Select the table, click “Data source…” in the “Data” section and in the window click “Other data source…”. If the designer finds no rule for the table, for example because it was deleted, the buttons are called “⚙ Data source & sorting” and “Change…”.
2. Choose the new list or rule. For a list, the window of the new rule opens first.
3. In the window “Choose columns — …” click “Keep columns” if your columns should stay. Or check new fields and click “Apply”; then these replace all previous columns.
   → If you kept the columns, the designer checks whether they fit the new row. If everything fits, it reports “The columns match the new row source — nothing to assign.” Otherwise the window “Assign the columns to the new row source” opens.

In the window “Assign the columns to the new row source” you give the columns their new fields; how that works is described under Data sources and relationships: The “Assign variables” window. Whatever stays open is removed from the cells on applying. If you cancel, the columns keep pointing to the old fields, and the designer reports: “Nothing assigned — the columns still point to the old fields.” If you insert a table into another template, a window built the same way with the title “Assign variables” can appear; in it you also reassign its row source.

#### Older tables directly on a relationship

In the past a table was allowed to stand directly on a relationship. If you open such a template, the designer converts each of these tables once to a rule of its own, including tables in cells and extra rows. It takes filter and sorting along and reports it: “This template dates from the time when a table could be based directly on a relationship. …” The conversion is saved only when you save the template.

- The order of the rows can change: A rule always orders numbers by size (2 before 10), and it knows only two sort levels. The message names both if it affects a table.
- If the relationship cannot be assigned at the moment, the table stays unchanged. The message then advises expanding the relationship once in the data tree and reloading the template.
- If a table still stands on a relationship, the “Data source & sorting” window shows a yellow box: “⚠ This table stands directly on a relationship. That is no longer supported …”. The button “Turn into a rule” creates a rule with the name of the relationship and the addition “(rule)”, takes filter and sorting along and switches the table to it: “The table is now based on the rule »…« — filter and sorting were moved along.” If it does not find the relationship, it reports “Relationship not found.”

### The properties of the whole table

You reach the settings of the whole table in two ways, with the same fields:

- **Selecting the table:** Click in a cell; at the top left of the table ✥ appears, and a click on it selects the whole table. Or in the “Structure” area click the row “Table”. A click on the edge of the header row outside a cell also selects the whole table. On the right under “Properties” the tabs “General” and “Position & size” then appear. At the top it says “Table” and next to it where the rows come from, or “no data source”; for a table in a group or cell only “Table”.
- **From a column:** If a column is selected, you find the same settings in the “Table properties” tab, without having to select the table first; the column stays selected. There, under “Position & size”, only the position with “Advanced” appears. Positioning behavior and arrangement exist only if the table itself is selected.

The properties panel remembers which tab you used last (see The properties panel). The section headings there are in capital letters.

[Image: The properties area on the right, upper half, with a data table selected. At the very top the heading “PROPERTIES”, below it a blue marker “TABLE” with the name “Rechnungspositionen”. Below it two tabs: “General” (active, blue, underlined) and “Position & size”. Section “DATA” with ⓘ: a wide blue button “Filter & sorting (rule)” with a gear and next to it a white button “Data source…”, below it small “Data source: Rechnungspositionen”. Section “STYLE”: “Header background” with a blue color field and the value #2B4CC4; “Zebra (every 2nd row)” and “Zebra (every 2nd column)” each with an empty, checkerboard-like color field and the text “none”; a checked checkbox “Keep row together at page break”. Section “HEADER ROW”: checked “Show header row”, “Repeat header row on following pages” and “Fit header row height to the content automatically”, below it the field “Minimum header row height (mm)” with the value 8.]
Caption: The properties of a selected data table, “General” tab: the sections Data, Style and Header row.
- Image marker 1: At the top it says what is selected: “Table” and next to it where the rows come from.
- Image marker 2: The two tabs; the one used last stays active next time.
- Image marker 3: Data: Opens the rule of the table or the “Data source & sorting” window.
- Image marker 4: Style: fill color of the header row and optional zebra stripes.
- Image marker 5: Decides whether a row may be split at the end of a page.
- Image marker 6: Header row: show, repeat on following pages, height.

#### “General” tab: “Data” section

| Setting | What it does | Default |
|---|---|---|
| “⚙ Filter & sorting (rule)” | Directly opens the window of the rule the table stands on: filter, sorting, calculate, selection. Appears if the table stands on a rule, also in a group. | – |
| “Data source…” | Opens the window “Data source & sorting”: view or change the row source. | – |
| “⚙ Data source & sorting” | Appears instead of the two buttons if the table stands on no rule that the designer finds from the table: for older tables directly on a relationship, for tables in a table cell and for free-form tables. Opens the same window. | – |
| Row “Data source: …” | Shows the row source as the template stores it, or “no data source”. If the table has sort levels of its own, their number follows. | – |

The ⓘ at the heading “Data” explains the extra rows.

#### “General” tab: “Style” section

| Setting | What it does | Default |
|---|---|---|
| “Header background” | Fill color of the whole header row, the basis for all header cells. You color a single column differently in the header designer (see Cells, header row and page break: Designing the header row: the header designer); that then lies on top. Empty means: no background. How the color field works is described under Border, background and colors: Color field and color picker. | Blue, #2B4CC4 |
| “Zebra (every 2nd row)” | Colors every second data row, that is the 2nd, 4th, 6th and so on, continuing across all pages. The header row stays untouched; the extra rows of a record are colored together. With an opacity below 100% the color blends with what lies beneath, for example with the row color of an older template (see “General” tab: Border, corners, guides, visibility). You do not see the zebra on the canvas because only the first row appears there. | empty (off) |
| “Zebra (every 2nd column)” | Colors every second column in every data row and extra row; the header row stays untouched. Where a colored row and a colored column cross, it is colored only once, with the color of the row zebra. A cell background lies on top. Visible on the canvas. | empty (off) |
| “Keep row together at page break” | On: A data row is never separated in the middle; if it no longer fits on the page, it moves entirely to the next. Off: The row may break at the end of the page. If printing keeps every row together anyway, the checkbox is grayed out, shows “on”, and the reason appears below it. The reasons are given in Cells, header row and page break: Keeping a row together or splitting it. | on |

> **Caution:** The header row has white text. If you empty “Header background”, the text is white on white paper and can no longer be seen; there is no warning for this. It is simpler to set a header background again. There is no header text color for the whole table; you would have to change the text color in each header cell individually in the header designer.

#### “General” tab: “Header row” section

| Setting | What it does | Default |
|---|---|---|
| “Show header row” | On: Above the rows there is a header row with the column titles. Off: no header row, not even on following pages; the table begins with the first data row. Practical if the columns speak for themselves or tables are to join seamlessly. | on |
| “Repeat header row on following pages” | On: If the table runs across several pages, the header is on every one. Off: The header is only once above the first row, and the rows of the following pages move up. The checkbox shows what currently applies: the setting of the table, otherwise the default from the Template settings: “Page” tab, “Tables” section. A click stores the value firmly on this table. After that it no longer follows the default of the template; there is no way back to “like the template” in the designer. Without a header row, the checkbox is grayed out. In a group or cell it can be set but has no effect there. Where the header stands if even the first row must move to the next page is described under Cells, header row and page break: Header on following pages. | on (default of the template) |
| “Fit header row height to the content automatically” | On: The header row becomes as high as its content needs, for example with a title over two lines; the number below is the minimum height. Off: fixed height; whatever does not fit is not printed, and the document reports it. When switching, the designer enters the height the header currently needs, at least 4 mm, and says so. The switch applies only to the header row; the data rows have their own. Without a header row it is grayed out. | on |
| “Minimum header row height (mm)”, with the checkbox off “Fixed header row height (mm)” | The minimum height or the fixed height of the whole header row, in steps of 0.5 mm, at most 5000 mm. The change is visible on the sheet while you type. You can also drag the height at the bottom edge of the header row. Without a header row the field is paler and has no effect. | 8 mm |

#### “General” tab: “Cells” section

| Setting | What it does | Default |
|---|---|---|
| “Fit row height to the content automatically” | On: Each data row becomes as high as its content, a row with a photo higher, one without lower; an image field without an image costs no space, nor does an empty code with “print nothing” (see Barcode, QR code and GiroCode: Codes in tables). The number below is the minimum height. Off: All rows get the same fixed height. Whatever does not fit is cut off and reported, in every column, also in designed cells and extra rows. When turning it off, the designer enters as the fixed height what the tallest content of the sample row currently needs, at least 4 mm, and says so: “Fixed row height: … mm — that is how much the content needs right now.” Longer values in the document are still cut off and reported. When turning it on, it likewise sets the minimum height to what the content currently needs; an earlier minimum height does not come back by itself. | on |
| “Minimum row height (mm)”, with the checkbox off “Fixed row height (mm)” | The minimum height or fixed height of every data row and every extra row, in steps of 0.5 mm, at most 5000 mm. With automatic height, a row is never lower than one line of text in the table font including padding above and below. A fixed height applies exactly as entered. Only a row that is split at the end of the page with “Keep row together at page break” off can become taller together (see Cells, header row and page break: Keeping a row together or splitting it). If you enter a height with the checkbox on that the content overrules, a window “Row height follows the content” explains after the entry why the row stays taller. The same field is in the “Column” tab. | 7 mm |
| “Cell padding (mm)” | Distance between cell edge and content, the same in header, data and extra row cells. At 0 the content reaches the edge. If the padding is so large that no room for text remains in a narrow column, that column prints no text, and the document reports it. Negative values become 0, an empty field counts as 0. Texts that fill a cell are adjusted by the designer to the new width. Also works in the PDF. | 1.5 mm |
| “Line spacing” | How airy multi-line text stands in the table: 1 single, 1.5 one and a half, 2 double; values up to 5 in steps of 0.05 are allowed. Applies to the whole table, except for a header cell from the header designer: There the line spacing of its text applies. Empty here means “as before”, not “as in the template”. With a fixed row height the row does not become taller; less text then fits in. If a text in a cell has a tighter line spacing, it keeps it. | empty (“as before”) |

> **Caution:** The field “Line spacing” has the same trap as the field of a text (see Texts: Line spacing): As of today the properties panel rebuilds itself with every entry, for every table, also a free-form one; afterwards the field is no longer active, and further characters do not arrive. After typing, check that the whole value is there, and otherwise click into the field again before you continue typing. A backspace without an active field deletes the selected table here or empties the selected cell; Ctrl+Z brings back both.

The ⓘ at the heading “Cells” explains merging cells (see Cells, header row and page break: Merging cells and splitting columns).

[Image: The properties area on the right, middle part. Section “CELLS” with ⓘ: checked “Fit row height to the content automatically”, field “Minimum row height (mm)” with 7, field “Cell padding (mm)” with 1.5, field “Line spacing” with the gray placeholder “as before”. Section “BORDER” without input fields, only with the note “You set borders per cell or header cell in its designer — column designer, header designer or cell designer …”. Section “CORNERS” with the empty field “Corner radius (mm)”.]
Caption: The properties of the table, continued: cells, border note and corners.
- Image marker 1: The ⓘ at “Cells” explains merging cells.
- Image marker 2: Minimum height of every data row; with automatic height the row grows with its content.
- Image marker 3: Distance between cell edge and content.
- Image marker 4: There are no fields for borders here: You set them per cell in the header or column designer.
- Image marker 5: Rounds the corners of the whole table.

#### “General” tab: Border, corners, guides, visibility

| Setting | What it does | Default |
|---|---|---|
| Note under “Border” | Not a field. You set borders per column in the header or column designer (the fields: see Border, background and colors: What the fields are called) and transfer them to the whole table with “⇊ Apply to all columns” or “⇊ Apply to all header cells” (see Cells, header row and page break: Applying to all columns or header cells). There are no lines for the whole table. The table lines of older templates are converted to column borders on loading; an old row line or row color is still printed but no longer has a field. | – |
| “Corner radius (mm)” | Rounds the corners of the table (the field in general: see Border, background and colors: What the fields do). If at least one column has a visible cell border, a round border around the whole table is added, in the color and thickness of the first column border; otherwise only the areas are rounded. It is rounded only as long as the whole table fits on one page. If “Keep row together at page break” is off, the table stays square-cornered, unless it is in a group or cell, has merged cells, extra rows or a column with a column designer. Canvas and PDF treat the checkbox “Keep row together at page break” the same way. Whether the whole table fits on one page and therefore stays round is shown only by the full preview: The canvas shows the rounding even if the table runs over several pages in the PDF and stays square-cornered. | empty (square) |
| “Show guides in the designer — in the whole template” | The same switch as in the template settings: It applies to the whole template, not just this table (see Working on the canvas: Grid, snap lines and guides). | on |
| “Turn visibility rules on/off” with “↳ Edit rule” | Prints the whole table only if a condition is met; how you set up the condition is described under Visibility: The setting in the properties. It is checked against the level on which the table stands, not against its own rows. If it should appear only if there are line items, choose “Count” on a field of the line items, the comparison “greater than” and the value 0 (see Conditions in a table cell). | off |

#### “Position & size” tab

The tab has the sections that every object has. They are described on the pages the table refers to; here are the defaults of the table and what is different for it:

| Setting | For tables | Default |
|---|---|---|
| Positioning behavior and minimum gap | See Positioning behavior: The three options and Positioning behavior: Minimum gap above. For tables the following applies: The checkbox “Move along with the object below” does not exist (see Positioning behavior: Move along). With “Fixed position” the table begins exactly at the drawn place and does not move; after that it behaves like any table: It makes way for headers and footers, begins on the next sheet if its header row no longer fits, and breaks row by row. Flowing objects below it make way for it instead of overlapping it (see Positioning behavior: Fixed position). | “Flowing on contact” |
| Arrangement | See Position, size, rotation and arrangement: Arrangement: layer order and sequence. A flowing table makes way and overlaps nothing. | 0 |
| Position | “X (mm)” and “Y (mm)” in the section “Position” (see Position, size, rotation and arrangement: Position and size, in a group Position, size, rotation and arrangement: Position in a group or cell). There are no fields for width and height: The width is the sum of the column widths, the height results from header and rows (see Position, size, rotation and arrangement: Width and height for each type of object). | – |
| Only for the table, “Advanced” | “Min. width (mm)” and “Max. width (mm)” are the lower and upper limit for the width of the whole table when you drag its side edges. Fitting when adding a column does not observe them, and they have no effect on the PDF. | empty (off) |

A table from an imported template can be saved so that it repeats on every page; there is no switch for this in the designer. Such a table has no positioning behavior (see Positioning behavior: The three options), only the arrangement. You build headers and footers from groups (see Pages, header and footer: Header and footer). The delete button is below the tabs and is visible in both.

#### Moving, copying, deleting

- **Moving:** Drag the table by the ✥ at the top left (“Move table”); it appears as soon as the table or one of its columns is selected. Directly in the document you move the table freely on the page, in a group within the group. The arrow keys work as for any object (see Working on the canvas: Keys for the selected object), but not if only a column or cell is selected.
- **Copying:** Copy, cut, paste and duplicate work only on the whole table (see Working on the canvas: Copying, pasting and deleting); a single column or cell cannot be copied. If you paste the table into another template, the window “Assign variables” can appear; there you also reassign the row source (see Data sources and relationships: The “Assign variables” window).

| Deleting, when … | with | Confirmation |
|---|---|---|
| the table directly in the document is selected | “🗑 Delete block” below the tabs | “Delete this block?” |
| a column is selected | “🗑 Delete entire table” in the “Column” tab (only for a table directly in the document) or in the “Table properties” tab (for a table directly in the document or in a table cell) | “Delete the whole table with all its columns?” |
| the table in a group is selected | “🗑 Delete element” | none |
| the table is selected | Del or Backspace | none |

You delete a table in a group by selecting it at the ✥ and using “🗑 Delete element”. Ctrl+Z brings back a deleted table (see Working on the canvas: Undo and redo).

### Columns: adding, moving, width

#### The bar at the table

If the table, a column or a cell is selected, a small bar floats above the top right corner of the table. If only the table is selected, only “Column” and “Row” are there; the other buttons appear when cells are selected.

[Image: Excerpt of the canvas with a data table in which three header cells are selected. At the top left is the heading “RECHNUNG”. Above the right half of the table is a bar with four buttons: blue “Column”, red “Column” with a trash can symbol, blue “Merge cells” and blue “Row”. In the blue header row the three right cells Menge, Einzelpreis and Gesamt are outlined with a purple dashed line and slightly darkened; the last one (Gesamt) additionally has an orange frame. At the top left above the table sits the move handle with the cross of arrows. Below it is the sample row with blue field markers.]
Caption: Three header cells are selected; above the table the bar shows the matching buttons.
- Image marker 1: The handle ✥: move the table or select it entirely.
- Image marker 2: Several selected cells are outlined with a dashed line; the one clicked last additionally carries a contrast frame.
- Image marker 3: “Column” adds a new one to the right of the selected column.
- Image marker 4: The red button “Column” deletes the column together with header and cells, without asking; Ctrl+Z brings it back.
- Image marker 5: “Merge cells” appears when at least two cells are selected side by side without a gap.
- Image marker 6: “Row” creates an extra row that appears below the main row for every record.

| Button | When it is there | What it does |
|---|---|---|
| “Column” | always | Adds a new one to the right of the selected column, at the end if no column is selected (see below). |
| “🗑 Column” | with a selected column, header or data cell | Deletes the column together with header and cells. |
| “Merge cells” | with at least two selected cells that lie side by side without a gap, or a selected rectangle | Turns the cells into one (see Cells, header row and page break: Merging cells and splitting columns). |
| “Unmerge cells” | with a selected merged cell | Restores the original cells. |
| “Split into 2 columns” | with a single, unmerged cell | Turns the column into two (see Cells, header row and page break: Splitting columns). |
| “not adjacent” | with selected cells with a gap between them | Not a button, only a note: Merging works only with columns that lie side by side without a gap. |
| “Row” | always, for data tables | Creates an extra row (see Extra rows). |
| “🗑 Row” | with a selected cell of an extra row | Removes this extra row together with its content. |

All buttons work without a confirmation; Ctrl+Z undoes them. There is no right-click menu on tables.

#### Adding, deleting, moving

- **Adding:** “Column” in the bar or “Column to the right” in the “Column” tab. The new column goes to the right of the selected one; if no column is selected or a cell of an extra row, it goes to the end. It is always 25 mm wide. From the selected column, otherwise from the last one, it takes the horizontal alignment, the header background and the text color of the header cell, min. and max. width and the borders, but not the vertical alignment. If this column has a header designer, the new one gets one designed the same way with the text “New”; if it has a column designer, one designed the same way, empty. Otherwise its header is called “New”, in the language of the template.
- **When space gets tight:** If the table then no longer fits in its space, that is from its left edge to the right edge of the printed area or to 4 mm before the right edge of its group, all columns become proportionally narrower, but none narrower than 10 mm: “New column added — the table no longer fit into its space, so all columns have become proportionally narrower.” If the insertion point is in a merged block, the merge grows with it, and the message says so.
- **Deleting:** “🗑 Column” in the bar or “🗑 Delete column” in the “Column” tab delete without asking. One column always stays: “At least one column must remain.” If the column is in a merged cell, that cell becomes narrower; if a merge is torn apart in the process, it is undone, and the message names it. If you are currently in the header or column designer of this column, deleting takes you out of the window.
- **Moving:** Grab the header cell of the column and drag it to the new place; this also works for a designed header. An insertion line snaps to allowed places, never in the middle of a merged block; a copy of the column follows the pointer, the others move aside. A merged block moves as a whole: “Column moved.” or “Merged block of 3 columns moved — the merges stay.” Or use “◀ Left” and “Right ▶” in the “Column” tab. With the Ctrl key held down, dragging selects instead of moving; on data cells, dragging always selects. Arrow keys do not move columns.

The tooltip of “Column to the right” in the “Column” tab says the same, more briefly: “Insert a new column directly to the right of this column — it is 25 mm wide and copies the alignment, border and design of this column. If the table then no longer fits in its space, all columns become proportionally narrower.” You change the width afterwards in the field “Width (mm)”.

#### Dragging width and height

| Way | What happens |
|---|---|
| Field “Width (mm)” in the “Column” tab | Works while you type. When you leave the field, the designer sets the width to at least 5 mm, to at least as much as the objects in the header and column designer need, and within the limits of min. and max. width of the column. |
| Dragging the column edge | The thin handles between two columns are always there, even without a selection: “Drag the column edge (the neighboring column adjusts)”. The width moves between the left column and its right neighbor; the table stays the same width. For both, 5 mm, the space for their content and their min. and max. width apply. Objects from the header and column designer move along. There is no such handle on the right of the last column or in the middle of a merged cell. The drag selects the left column. |
| Dragging the table width | Only with the table selected: handles on the left and right edge, “Drag table width – columns scale proportionally”. All columns grow or shrink in the same ratio. Never wider than the space on the page or in the group, never narrower than the content of the narrowest column, at least 10 mm; min. and max. width of the table and of the columns apply. On the left edge the right edge stays in place. If the drag hits the narrowest column, the designer reports: “It cannot get narrower: the column »…« is already as narrow as its content. …” |
| Handles in the header or column designer | Dragging sideways changes the column width, with the same limits as the field (see Cells, header row and page break: Designing the header row: the header designer and Cells, header row and page break: In the column designer: properties, handles, notes). |
| Dragging the header row height | With the table or a column selected: handle at the bottom edge of the header row, “Drag header row height (applies to the whole header row)”. Sets the header row height, at least 4 mm: with automatic height the minimum height, otherwise the fixed one. |
| Dragging the row height | With the table or a column selected: handle below the sample row or below the last extra row, “Drag row height (applies to all data rows)”. With a fixed row height it sets the height of all rows, at least 4 mm. If “Fit row height to the content automatically” is on, dragging changes nothing in the stored height: The row follows its content, and the window “⚠ Row height follows the content, not the handle” explains it. The dragged space then counts only as working height in the column designer. |

> **Caution:** The PDF never compresses a table that is too wide by itself. If it extends beyond the right edge of the paper, the overhang is cut off, and the document warns. If it only reaches into the right page margin, a note appears; nothing is lost in that case. All the places where the PDF cuts off are described under Position, size, rotation and arrangement: Where the PDF really cuts off.

### The settings of a column

Click a header or data cell. The column is selected, the clicked cell carries a frame in a contrast color, and on the right the tabs “Column” and “Table properties” appear. At the top it says “Column” and next to it, for example, “2 of 5 · Preis”; if the column has a header designer, only “2 of 5”. The “Table properties” tab shows the properties of the whole table. In the “Column” tab you find:

[Image: The properties area on the right with a column of a data table selected. At the top the blue marker “COLUMN” with “4 of 5 · Einzelpreis”, below it the tabs “Column” (active) and “Table properties”. Section “COLUMN”: two wide blue buttons “↳ Open header designer” and “↳ Open column designer” and below them side by side “◀ Left” and “Right ▶”. Section “SIZE”: field “Width (mm)” with 35, checked “Fit row height to the content automatically” and field “Minimum row height (mm)” with 7. Section “CELL”: the dropdown “Vertical alignment” with “Top” and a gray note that the background and border of the cell appear only once the column designer has been opened. Below it the white buttons “Column to the right” and “Delete column”, the latter in red text with a trash can symbol, a collapsed row “ADVANCED” and in the section “ACTIONS” the button “Delete entire table”, likewise in red text with a trash can symbol.]
Caption: The settings of a selected column, “Column” tab.
- Image marker 1: Which column is selected: number, count and header text.
- Image marker 2: “Column” for this column, “Table properties” for the whole table.
- Image marker 3: The buttons “↳ Open header designer” and “↳ Open column designer” open the design of the header or cell; this changes the column permanently.
- Image marker 4: “◀ Left” and “Right ▶” move the column by one place.
- Image marker 5: Width of this column; the table is as wide as all columns together.
- Image marker 6: Background and border of the cell exist only with the column designer.

| Setting | What it does | Default |
|---|---|---|
| “↳ Open header designer” | Permanently turns the heading of this column into a designed header and opens the header designer, like a double-click on the header cell (see Cells, header row and page break: Designing the header row: the header designer). | – |
| “↳ Open column designer” | Permanently turns the column into a designed column and opens the column designer, like a double-click on the data cell (see Cells, header row and page break: Designing with the double-click: the column designer). | – |
| “◀ Left”, “Right ▶” | Moves the column by one place. A merged block moves only as a whole, the merges stay. Grayed out if the column or its block is already at the edge. | – |
| “Width (mm)” in the “Size” section | Width of this column; the table is as wide as all columns together. In steps of 0.5 mm, at most 5000 mm. For limits see Dragging width and height. | from the column selection |
| “Fit row height to the content automatically” with “Minimum row height (mm)” or “Fixed row height (mm)” | The same fields as under “Cells” section. They apply to all rows of the table, not just this column. | on, 7 mm |
| “Vertical alignment” in the “Cell” section | Where the content sits if the row is taller than it: “Top”, “Middle” or “Bottom”. Applies to every content of this column: the simple value, the objects from the column designer and the cells of the extra rows. Only if a row is split with “Keep row together at page break” off do its values stay at the top. The padding stays. The header row does not follow the field. A simple header text stands vertically centered in the header row. If it does not fit with a fixed header row height, it begins at the top, and whatever no longer fits at the bottom is missing in the PDF; the document reports it. Only its first line is always printed completely, even if it is taller than the space, for example because of a large font. If it reaches into the first data row in the process, the document reports it. | “Top” |
| “Cell background” | Fill color of the data cell of this column in every row, above the zebra and above the row color of an older template. It appears only once the column has a column designer; before that, this spot says: “The background and border settings of the cell appear once the column designer has been opened — it sets up the cell.” The color field works like any other (see Border, background and colors: Color field and color picker). | no color |
| “Turn on border” with “Border color”, “Border thickness (pt)” and “Border lines (sides)” | The border of the data cell of this column, in every row. Likewise only with a column designer. When you check it: light gray (#CCCCCC), 0.5 pt, all four sides; unchecking removes the border completely. On the canvas the border lies inside the cell, in the PDF centered on the edge (see Border, background and colors: Where the line sits). With extra rows the bottom line comes only below the whole record. The fields in detail: Border, background and colors: Border and background; what the checkbox sets in the individual places is shown by Border, background and colors: What the fields do. For a header cell the same values apply when you check it (see Cells, header row and page break: Designing the header row: the header designer). | bottom, light gray, 0.5 pt |
| “⇊ Apply to all columns” | Transfers cell background and border of this column to all others (see Cells, header row and page break: Applying to all columns or header cells). | – |
| “Column to the right” | Inserts a new one directly to the right of this column, 25 mm wide (see Adding columns). | – |
| “🗑 Delete column” | Deletes this column without asking. | – |
| “Advanced”: “Min. width (mm)”, “Max. width (mm)” | Limits for the width of this column when typing and dragging. They have no effect on the PDF. A new column takes them over from its neighbor, a split one does not. | empty (off) |
| “🗑 Delete entire table” in the “Actions” section | Deletes the table with all columns after a confirmation. In the “Column” tab only for a table directly in the document. | – |

> **Good to know:** There is no field for the horizontal alignment of a column, for the value of a simple data cell and for the simple header text. You can drag a field onto a simple data cell, and Del empties it. You type text and change font and alignment on the text, as described under The new data table.

You create a code in a column, for example the EAN per line item, in the column designer (see Barcode, QR code and GiroCode: Codes in tables).

### Extra rows: several rows per record

Normally a data table prints exactly one row for each record. An extra row is a further row below this main row, for every record. The classic case is a long description across the whole width below item and price. This turns 20 line items with one extra row into 40 printed rows.

1. Select the table or one of its cells and, in the bar at the table, click “Row”.
   → Below the sample row there is a new row, its first cell is selected: “Extra row created — it appears under the main row for EVERY record. …”
2. If the row should span the whole width, on the right click “🔗 Across all columns”.
   → The first cell now spans all columns.
3. Double-click the cell, or on the right click “↳ Open cell designer”, and put text and fields into it. You can also drag fields directly from the “Data” area onto the cell (see Cells, header row and page break: Designing cells: the cell designer).
   → The cell designer shows at the top left, for example, “📄 Document › Extra row 1 · Column 1”. The fields are filled in for every record, as in the main row.

[Image: Excerpt of the canvas. At the top left is the heading “RECHNUNG”. Above the table are four buttons: blue “Column”, blue “Unmerge cells”, blue “Row” and red “Row” with a trash can symbol. The table has a blue header row (Pos.-Nr., Menge, Einheit, Einzelpreis, Gesamt), below it the sample row with one blue field marker per column and below that a third row across the whole table width with a strong blue frame (selected). In it on the left is the blue field marker “Bezeichnung”.]
Caption: An extra row below the sample row, merged across all columns, with the field “Bezeichnung”.
- Image marker 1: The main row: one row per record.
- Image marker 2: The extra row: It appears below the main row for every record and here spans all columns.
- Image marker 3: A field that you dragged into the cell from the “Data” area; in print the value of each record appears there.
- Image marker 4: “Unmerge cells” is here because the cell is merged across all columns; the button sets it back to one column.
- Image marker 5: “Row” creates a further extra row.
- Image marker 6: The red button “Row” removes the selected extra row together with its content (it is there only when a cell of an extra row is selected).

If a cell of an extra row is selected, at the top right it says “Extra row 1” and next to it the header text of the column. Below that:

| Part | What it does |
|---|---|
| Note “This row appears under the main row for EVERY record. …” | Explains the extra row and the double-click. |
| “↳ Open cell designer” | Opens the cell designer of the selected cell, like a double-click. |
| “🔗 Across all columns”, “🔗 Across the remaining 3 columns” or “⛓ Unmerge” | In the first column the button merges the cell across all columns. In a later column it reaches from here to the last one; the whole width works only from the first column. In the last column it is grayed out. If the cell is already merged, it is called “⛓ Unmerge” and sets it back to one column. The same rules apply as under Cells, header row and page break: Merging cells and splitting columns. |
| “🗑 Delete this extra row” in the “Actions” section | Removes the row together with its content, without asking. “🗑 Row” in the bar does the same. Ctrl+Z brings it back. |

The cell designer of an extra row is described in Cells, header row and page break: The window of the cell designer. You set background and border there per cell, with the fields of a group; they are described under Cells, header row and page break: Background, border and size of a cell. Only the whole table gets rounded corners (see Corner radius of the table). There is no button here for transferring to all columns (see Cells, header row and page break: Applying to all columns or header cells).

> **Good to know:** An empty extra row is not invisible: It takes up the minimum row height of the table (default 7 mm) or the fixed row height. If you do not need it, delete it.

- **Only with a data source:** Extra rows exist only for a table with a data source. The “Row” of a free-form table means something different: a row with content of its own (see Free-form tables).
- **One record, one block:** The rows of a record belong together. There is no separator line between them, it comes only below the record; the zebra colors them together; at a page break the whole record moves to the next page. “Keep row together at page break” is therefore grayed out (see Cells, header row and page break: Keeping a row together or splitting it).
- **What also applies here:** Minimum and fixed row height, “Vertical alignment” of the column and the line spacing of the table.
- **Merges:** If a row is added or removed, merges across rows are undone. The content stays; the message names the number, merging again is enough.
- **Order:** The order of the extra rows cannot be changed.

On a cell of an extra row, the tooltip shows what is possible: “Extra row 1 · Click: select cell · Double-click: cell designer · Drag or Ctrl+click: select several (then »Merge cells«)”. Dragging up or down selects a rectangle with the main row.

### Filtering, sorting, totals

Filter, sorting, grouping and “the first N” are in the table’s rule, not on the table itself. Open the rule with “⚙ Filter & sorting (rule)”; more under Rules: “Filter” tab: which rows come in and Rules: “Selection” tab: sorting and selecting. One row per record is printed, in the order the rule delivers. If the list is empty, only the header row appears in the PDF, without a message. For very large lists an upper limit of 20,000 rows per query applies; if it is reached, the document reports a warning (see Data sources and relationships: What the canvas loads and what is printed).

> **Good to know:** If the rule delivers only a single record, for example with “Only the first”, the table stays empty in the PDF, and the document reports it (see The “Choose the row source of the table” window). If you drag such a rule onto the sheet, the designer does not ask.

#### A totals row below the table

The table has no totals row of its own. The table’s rule is not suitable for it: As soon as it calculates something in the “Calculate” tab, it summarizes its rows, without a criterion under “Group rows by (optional)” all of them into one. A calculated field of a rule on a list currently cannot be placed in a text on the sheet (see Rules: Using the result).

Instead, use a second rule on the same list, with the same filter as the table’s rule and a total such as “Gesamt is sum of Betrag”, without a criterion under “Group rows by (optional)”. Place it as a one-row table without a header row with the positioning behavior “Flowing” below the first one, so that it moves down with the line items table (see Positioning behavior: Flowing). How this works step by step is described under Rules: Example: the sum below the items table.

For a total in running text, for example “Gesamtbetrag: …”, use a custom variable (see Variables: What should it contain?). It calculates over all line items of the list; it does not know the rule’s filter. If the table filters, this total therefore differs from the totals row.

### Sorting on the table itself

If a table stands on a rule, the rule sorts: in the “Selection” tab under “Sort by”, with two levels; it always orders numbers by size (see Rules: “Selection” tab: sorting and selecting). Sort levels of their own on the table exist only for tables that stand on no rule that the designer finds from the table: for older tables directly on a relationship and for tables in a table cell. They are in the window “Data source & sorting” under “Sorting (top level first, then the ones below)”; the ⓘ there explains them. Before it says: “A row condition no longer exists on the table itself: filtering is done in a rule. This table is not based on a rule and therefore shows all rows of its data source.” For a table in a table cell, this source is its rule; its filter applies (see Cells, header row and page break: Table in a table cell).

| Setting | What it does | Default |
|---|---|---|
| Field “Field (e.g. Amount)” | The name of the field of the row to sort by, as Dynamics names it. There is no dropdown; it is applied when you leave the field. A level without a field sorts by nothing. | empty |
| “↑ ascending” / “↓ descending” | Ascending or descending. Empty values always come last, also descending. | “↑ ascending” |
| “123” | Orders numbers by size (2 before 10) instead of character by character; values that are not a number come after. The numbers are read in the number style of the template. Without the checkbox everything is compared as text. | off |
| “✕” | Removes the level. | – |
| “Sort level” | Appends a further, empty level. | – |

The upper level applies first, the one below it only in case of a tie; with a complete tie the order of the source stays. Without levels it stays entirely with the order of the source; the note below says so as well: “Check 123 = sort numerically instead of alphabetically. Without levels the order of the data source is kept.” In the “Data” section of the table, the number of levels follows after “Data source:”.

### What changes in the document?

**On the canvas:** The header row and a sample row, with extra rows a record with its rows. Fields appear as blue markers with their name. Column widths, header background and column zebra look like in print. Borders lie inside the cell here, in the PDF centered on the edge (see Border, background and colors: Where the line sits). Whether rounded corners stay in the PDF is shown only by the full preview (see Corner radius). Row zebra, page breaks and repeated headers are missing, and visibility rules have no effect here (see Visibility: What changes in the document?).

**In the PDF:** One row per record of the row source, filtered and sorted by the rule, over as many pages as needed, with the header on every page if set. An empty list yields only the header row. How it really looks is shown beforehand by the full preview. What happens on the following pages is described under Cells, header row and page break: Across several pages.

---

## Free-form tables

*For users · Tables · Page en/freie-tabellen.html*

> **In short:** You fill a free-form table yourself: you create columns and rows and design each cell individually, with text, fields of the main record, images, shapes or even another table. This suits a header block with address and document data, signature fields or a fixed overview. Unlike a data table, it does not fetch rows from Dynamics. The canvas shows all rows, for a table directly on the page also across page changes. Fields appear there as blue markers with their name; the values and the effect of visibility rules are shown only by the full preview and the PDF. How you design, merge and split cells and how the table runs across several pages in the PDF is described on the page Cells, header row and page break.

### Creating a free-form table

1. In the ribbon, in the section “Tables”, click “Free-form table” (note on the button: “Table without data from Dynamics: you enter the rows and content yourself”).
   → The table is selected and sits below the previous content of the last used page, at the left margin of the printable area, and the designer scrolls it into view. It has a blue header row with “Spalte 1” and “Spalte 2” and below it three empty rows. Two small bars appear above the table, and on the right under “Properties” is “Table” with the addition “no data source”. The first time in a template, a dark blue speech bubble additionally points at the table: “Double-click a cell to design it”. It disappears at the next click or keypress and appears only for the first table of a template, whatever its kind (see Speech bubbles).
2. Double-click a cell and fill it as described under Cells, header row and page break: Designing cells: the cell designer.

[Image: Detail of the canvas with a new free-form table. It has a blue header row with white bold type: “Spalte 1” on the left and “Spalte 2” right-aligned. Below it are three empty white rows with dashed cell borders. Around the table is a blue frame with a square handle on the left and on the right. Above the top left corner are two blue buttons: a cross of four arrows and “Row”. Above the top right corner is the button “Column”. In the middle above it, a dark blue speech bubble “Double-click a cell to design it” points down at the table.]
Caption: A new free-form table: two columns, three empty rows and the two bars.
- Image marker 1: The handle for moving the whole table.
- Image marker 2: “Row” appends a new row at the bottom.
- Image marker 3: “Column” inserts a column on the right.
- Image marker 4: The header row with the default titles “Spalte 1” and “Spalte 2”.
- Image marker 5: Three empty rows; each is as tall as the minimum row height and has a gray line at the bottom.
- Image marker 6: The speech bubble appears once per template, for the first table of any kind.

There are three more ways to the same table:

- **Dragging:** Drag the button “Free-form table” to the desired place on the page or into a group.
- **In a group or cell:** In the group or cell designer, the same button is in the ribbon. There, a click places the table in the opened group or cell; the button cannot be dragged there.
- **Via the row source:** A click on “Data table” opens the window “Choose the row source of the table” (see Data tables: The window “Choose the row source of the table”; it also describes how to close it without creating anything). At the very bottom is “Free-form table (no data)”: Instead of a data table, a free-form table is then created, when dragging “Data table” at the place where you let go.

> **Good to know:** In some notes and ⓘ explanations of the designer, the free-form table is still called “fixed table” or “table without a data source”. The same thing is meant.

#### Where the new table goes

- **By click:** The rule for groups and tables from The ribbon: Where a click inserts applies: into a selected group that is itself in a group, or into the opened group or cell of the group or cell designer, there 2 mm from the left margin and 2 mm below the lowest object. Otherwise a new block is created below everything that is on the last used page.
- **By dragging:** Over a group, which is highlighted as the target, the table lands in that group, with its top left corner where you let go. On the page, the mouse pointer determines only the height: The table always begins at the left margin of the printable area. If an insertion line between two blocks is shown when you let go, everything below it moves down. If you let go over a cell of another table or over a text, the table lands on the page, not in the cell.

Dragged as well as clicked, on the page as well as in a group or cell, the table begins with the behavior “Flowing on contact” (see Positioning behavior: What a new object starts with).

In a group or cell, the designer fits the columns: It distributes the width of the container minus 4 mm among the columns in their previous ratio, each at least 10 mm wide. In a cell, the width for the content counts, for a click the width from 2 mm from the left margin, for dragging the width from the place where you let go. A container without a width of its own counts as wide as it stands on the canvas, for a click as for dragging. Dragging onto the page fits nothing. If the space is not enough even for 10 mm per column, the designer warns: “The inner table needs at least … mm (10 mm per column) — there is only room for … mm here.” Then remove columns or make the container wider; otherwise the table can stick out beyond it in the PDF.

#### What a new free-form table looks like

- **Columns:** two. The header text “Spalte 1” is left-aligned, “Spalte 2” right-aligned, in an English template “Column 1” and “Column 2”. What you put into the cells of the rows does not follow this alignment; you set the alignment of a text in the window “Edit text”. The two columns share the printable area in the ratio 90 to 85, with A4 and the usual margins that is 90 mm and 85 mm.
- **Header row:** 8 mm tall, blue (#2B4CC4), type white and bold in 9 pt, with a thin gray line at the top and bottom.
- **Rows:** three, each at least 7 mm tall, with 1.5 mm between the cell edge and the content and a thin gray line (0.5 pt) below each cell.
- **Cells:** empty. Each cell is inside a small group that grows with its content.

In the PDF, header row and rows appear. An empty row is as tall as the minimum row height and has the gray line at the bottom.

#### Switching between free-form table and data table

You see and change the row source of a table in the window “Data source & sorting”. For a free-form table, you open it on the right in the section “Data” with “⚙ Data source & sorting”, on the “General” tab of the selected table or on the “Table properties” tab of a selected cell. For a free-form table, the window shows only:

- the heading “Row source” with an ⓘ; its explanation is written for data tables and does not fit here,
- under “Rule” the display “— no data (free-form table) —” and the button “Change…”,
- the sentence “Rows: … — double-click each cell to design it; add rows with »Row« at the top left of the table.” with an ⓘ that explains the free-form table. The statement there that border and alignment apply “for all rows” is only partly true: Of the borders, only the gray line below the cells applies to all rows (see Cells, header row and page break: Which line is set where). “Vertical alignment” affects the cells of all rows; the alignment left or right with which the column was created, by contrast, applies only to the header text (see What a new free-form table looks like).

There are no filter and sorting for a free-form table. “✓ Done” or a click next to the window closes it.

1. In the window “Data source & sorting”, click “Change…”.
   → The window “Choose the row source of the table” opens, with a search box “🔍 Search for a relationship or rule…”, the data tree and an ⓘ at the title (see Data tables: The window “Choose the row source of the table”).
2. Choose the list or rule that the rows are to come from, and go through the column selection as described under Data tables: Changing the row source and Data tables: The window “Choose columns — …”. For a free-form table, the following applies: “Apply” replaces all previous columns with the checked fields. “Keep columns” (“Only change the row source — the existing columns stay as they are.”) leaves the columns in place, but empty: The content of your rows is not carried over into the columns.
   → The free-form table has become a data table. Filter and sorting of the rule apply; the bar with “Row” and the cell designer for each row are gone.

Your previous rows remain invisibly in the template; they are neither shown nor printed. If you choose “Free-form table (no data)” in that window instead, everything stays as it is. “Change…” is locked only if the table is inside a column designer cell of a data table; the note on the button then says that the source there can be changed only by dragging it in again from the data tree. In a group or in a cell of another free-form table, it remains usable.

**Conversely,** you turn a data table into a free-form table: Open its row source (“Data source…” or “⚙ Data source & sorting”), click “Other data source…” or “Change…” and then “Free-form table (no data)”.

- If the table did not have rows of its own yet, the designer creates three. Each gets a copy of what was previously in the columns; the three rows therefore initially carry the same content.
- If the table was a free-form table once before, exactly its rows from back then return.
- Extra rows of the data table remain in the template, but do not apply without a data source.

#### Free-form tables from older templates

The designer converts two older ways of building on its own when opening:

- A free-form table that knew only a number of rows and column contents gets rows of its own; the previous column content is then in every row.
- If the text of a cell is directly in the cell instead of in its group, the designer packs it into a group. For this, the message “Table cells of this template held their text directly instead of in a group — …” appears once. The row height then follows the wrapped text and may change. The canvas and the full preview already show the new form, the PDF of the saved template only after the next “Save”.

### Working on the canvas

You operate the free-form table directly on the page and likewise in a group or cell designer if it is inside one. Without a selection, every cell shows a pale, dashed guide line so that you can see where it ends; it never appears in the PDF (see Gridlines and guides).

| What you do | What happens |
|---|---|
| Click on a cell | Selects exactly this cell, not the whole column or row. It gets a continuous blue frame, with a blue cell background an amber one. On the right is then “Column” with “… of …” and the header text. The designer remembers the row: It determines which row “🗑 Row” deletes, which cell “↳ Open cell designer (row …)” opens and in which row merging takes place. The note on every cell sums it up: “Click: select cell · Double-click: open cell designer · Drag or Ctrl+click: select several (then »Merge cells«)”. |
| Double-click on a cell | Opens the cell designer of this cell (see Cells, header row and page break: Designing cells: the cell designer). |
| Dragging with the mouse across several cells of a row | Selects the cells swept over. Selecting begins only after a small movement and stays in the row where you began; a drag downward does not change the row. From two cells on, a violet dashed frame with a light veil shows the selection. |
| Ctrl+click, Shift+click, on a Mac Cmd+click | Adds a cell of the same row or removes it again. With the key held down, you can also drag across several cells. Such a click in another row begins a new selection there: rows one above the other cannot be selected together. |
| Right-click on a cell | Selects the cell like a click. The free-form table has no menu of its own. |
| Click on a header cell | Selects the header cell; on the right is then “Column”. The mouse pointer is a hand because the header cell is also the handle for moving the column. You select several header cells with Ctrl+click or with the Ctrl key held down and dragging; for the free-form table, however, they cannot be merged (see Cells, header row and page break: Merging cells and splitting columns). |
| Double-click on a header cell | Opens the header designer (see Cells, header row and page break: The header designer for the free-form table). |
| Moving a column by its header cell, dragging a column border, the header row height or the table width | As with the data table (see Columns). For the free-form table, a column at the border never becomes narrower than the content of its cells in all rows, and the handle at the border is missing only where the respective row has a merged cell. Without a header row there is no handle for moving; then “◀ Left” and “Right ▶” help (see “Column” tab). There is no handle for the height of all rows; each row has its own (next line). |
| Dragging the bottom edge of a row | “Drag the height of this row (row …)”: Gives this one row a minimum height of its own, at least 4 mm. If the content needs more, the row becomes taller anyway. For this row, the table’s minimum row height then no longer applies. There is no field for the own height, and no switch back to the table’s “Minimum row height (mm)” either. Right after dragging, Ctrl+Z undoes the own height. If later only the content is to determine how tall the row becomes, drag it to the smallest height of 4 mm. Empty, it is then 4 mm tall, not as tall as the table’s minimum row height. The handle appears as long as the table, a cell or a header cell is selected. |
| Dragging “✥” | Moves the table (see The bar at the top left). |
| Dragging a field from “Data” onto a cell | Puts the field in this cell (see Cells, header row and page break: Dragging fields into cells). |
| Del or Backspace | If one or more cells are selected, the key empties only their content; column and row stay. The designer reports “… — column and row stay. Ctrl+Z brings it back.” or “This cell was already empty.” If a header cell is selected, the key deletes the header text or empties the header designer. If the whole table is selected, the key deletes the table without asking. As long as an input field is active or a window is open, the key acts there; in the cell designer, it deletes the selected object in the cell. |
| Arrow keys | Move the selected whole table like any table (see Keys for the selected object); if only a cell is selected, they move nothing. |
| Click on an empty area | Removes the selection; on the right are then the settings without a selection (see When nothing is selected). |

Ctrl+Z and the other commands are described in Keyboard shortcuts.

#### Selecting the whole table

A click on a cell or header cell never selects the whole table. The whole table is selected

- right after creating it,
- after a click on the row “Table” in the structure,
- after a mouse press on “✥” in the bar at the top left.

A selection frame then surrounds it; if it runs across a page change, the frame is split there, and the handles for the width sit on the first part. You also reach most settings of the table without this, via the “Table properties” tab when a cell is selected.

#### The bar at the top left: “✥” and rows

If the table, one of its cells or header cells is selected, two small bars with blue buttons float above the table; buttons that delete something are red. The bars belong only to the designer and never appear in the PDF. If you enlarge the view above 100 %, they grow too, at most to twice the size. The left one sits above the top left corner:

[Image: Detail of the canvas with a free-form table, column titles “Beleg” on the left and “Angaben” right-aligned. In the three rows on the left are the black texts “Rechnungsnummer”, “Rechnungsdatum” and “Kunde”, on the right in each case a blue field marker (Rechnungsnummer, Rechnungsdatum, Name). The left cell of the second row has a continuous blue frame. Above the left half of the table sits a bar with three buttons: cross of arrows, “Row” and, in red, “Row” with a wastebasket symbol. Above the right half sits a bar with “Column”, in red “Column” with a wastebasket symbol, and “Split into 2 columns”.]
Caption: The two bars above a free-form table with a selected cell.
- Image marker 1: The handle ✥ moves the table; the mouse press also selects the whole table.
- Image marker 2: “Row” appends a new row at the end, always at the bottom.
- Image marker 3: The red button “Row” deletes the selected row with its content, without asking.
- Image marker 4: “Column” inserts a new column to the right of the selected column.
- Image marker 5: The red button “Column” deletes the column with its header cell and the cells of all rows.
- Image marker 6: “Split into 2 columns” splits the column of the selected cell into two.

| Button | What it does |
|---|---|
| “✥” | “Move table”: Press on it and drag. On the page, the table moves freely, with guide lines for aligning; in a group or cell, within that container. The mouse press also selects the whole table. |
| “Row” | “Add row at the bottom”: Appends a new row with empty cells at the end, always at the bottom, even if another row is selected. Rows cannot be pushed in between others or reordered. In the PDF, a new, empty row is as tall as the minimum row height and has the gray line. |
| “🗑 Row” | Appears only if a cell of a row is selected: “Delete selected row (row …)”. Deletes this row with its content without asking; afterwards nothing is selected. One row always remains: For the last one, the designer reports “At least one row must remain.” Ctrl+Z brings the row back. |

For a data table, the button “Row” looks the same, but creates an extra row per record (see Extra rows). For the free-form table, a row is a line with cells of its own.

#### The bar at the top right: columns and cells

The right bar sits flush above the top right corner of the table. If the whole table is selected, it contains only “Column”; for a selected cell or header cell, “🗑 Column” and exactly one of the buttons “Merge cells”, “Unmerge cells” or “Split into 2 columns” are added.

| Button | What it does |
|---|---|
| “Column” | “Add column on the right”: Inserts a new column to the right of the selected column, without a selection at the end, 25 mm wide and with an empty cell in every row. Afterwards the new column is selected. What it takes over from its neighbor and how the table is fitted is described under Data tables. |
| “🗑 Column” | “Delete this column”: Deletes the column with its header cell and the cells of all rows, without asking; afterwards nothing is selected. One column always remains: For the last one, the designer reports “At least one column must remain.” Ctrl+Z brings the column back. The Del key, by contrast, empties only the content. |
| “Merge cells” | Appears if at least two adjacent cells of the same row are selected (see Cells, header row and page break: Merging cells and splitting columns). |
| “Unmerge cells” | Appears for a selected merged cell (see Cells, header row and page break: Merging cells and splitting columns). |
| “Split into 2 columns” | Appears if neither “Merge cells” nor “Unmerge cells” fits: for a single, unmerged cell, for header cells and next to the note “not adjacent”. What is split is the column whose settings are on the right in the “Column” tab, not the selected cells (see Cells, header row and page break: Splitting columns). |
| “not adjacent” | Not a button, but a note: You have selected cells in a row that are not directly next to each other. “Merging only works with columns that sit directly next to each other.” |

#### Beyond the end of the page

If a free-form table is directly on the page and runs beyond the end of the page, the canvas already shows, like print, the following page with the further rows. If “Repeat header row on following pages” is on, the header appears there once more, with the note “Repeated header row (continuation of the table)”; it cannot be clicked. An area that repeats on every page and sits in the middle of the page appears as a gap in the table. A row that is taller than a page is shown by the canvas split across the pages.

[Image: Detail of the canvas at the transition from page 1 to page 2. At the top the last rows of the free-form table on the first page, empty and with pale dashed cell borders. Below it, in the bottom page margin of the first page, a light orange hatched strip with a dashed orange upper edge. In the gray gap between the pages is “Page 2 / 2” on the left. On the second page, after the top page margin, the blue header row follows again with “Artikel” on the left and “Bemerkung” on the right, below it three empty rows.]
Caption: A free-form table across the end of the page: On page 2, the header row appears once more.
- Image marker 1: The last row on page 1.
- Image marker 2: The orange hatched strip begins where the printable area of page 1 ends. It shows that the table reaches beyond it; the rows that no longer have room here are on page 2. The strip is not printed.
- Image marker 3: The page change.
- Image marker 4: The repeated header row: It cannot be clicked; in the PDF it is exactly the same.

When the header moves to the next page together with the first row instead of staying behind alone on the page before is described under Cells, header row and page break: Header on following pages. If it moves along, the canvas shows it pale on the old page, and its note explains why it is not there in print. You can edit it at this place anyway.

#### The free-form table in the structure

On the left, below the data, the structure shows the free-form table as the row “Table”, below it one row per column and one row for each filled cell with “Row …, column …”. What the entries are called, which markers they carry (“Column”, “Header”, “Cell”) and what the short name of a designed header cell such as “c1” means is described under Working on the canvas: The structure. Empty cells and cells that a merge hides are missing. A click selects the table, the column or the cell together with its row.

### Designing, merging and printing cells

What belongs to the cells, the header row and the page break is described for both kinds of table on the page Cells, header row and page break. For the free-form table, these sections are important:

- **Designing a cell:** Designing cells: the cell designer, The window of the cell designer and Background, border and size of a cell.
- **Dragging fields into a cell:** Dragging fields into cells.
- **Lines:** Which line is set where.
- **Designing the header row:** The header designer for the free-form table.
- **Merging cells and splitting columns:** Merging cells and splitting columns and Splitting columns.
- **In the PDF:** Across several pages, Header on following pages, Keeping a row together or splitting it and The free-form table in the PDF: height, data and colors.

### The properties of the table

The settings are on the right in the area “Properties” (see The properties panel). What you see there depends on what is selected:

- **The whole table:** at the top “Table” with the addition “no data source” (in a group or cell only “Table”), plus the tabs “General” and “Position & size”.
- **A cell or header cell:** at the top “Column” with “… of …” and the header text (after the first opening of the header designer, without a header text), plus the tabs “Column” and “Table properties”.

Most settings are the same for the data table; they are described there in detail (see Data tables). Only what differs for the free-form table is described here.

#### “General” tab

| Setting | What it does | Default |
|---|---|---|
| “⚙ Data source & sorting” (section “Data”), below it “Data source: none” | Takes the place of “⚙ Filter & sorting (rule)” and “Data source…” and opens the window “Data source & sorting” (see Switching). The ⓘ at “Data” explains the extra rows of a data table; there are none here. | no data source |
| “Zebra (every 2nd row)” (section “Style”) | Colors the 2nd, 4th, 6th … row. Unlike for the data table, you already see the pattern on the canvas in all rows. | empty |
| “Keep row together at page break” | Always grayed out and checked: For a free-form table, print always keeps every row together, because the table has no data source. The note below it gives the reason; what happens in the PDF is described under Cells, header row and page break: Keeping a row together or splitting it. | on (fixed) |
| “Repeat header row on following pages” (section “Header row”) | Following pages with the repeated header are already shown by the canvas for a table directly on the page. When the header moves to the next page together with the first row is described under Cells, header row and page break: Header on following pages; what the canvas shows in the process, under Beyond the end of the page. | Default of the template (on) |
| “Fit row height to the content automatically” (section “Cells”) | When switching it off, the designer takes over the height of the tallest row. No row afterwards becomes taller than this fixed height, not even one with a dragged height of its own. A row whose dragged height is smaller stays lower, however, as long as its content does not need more space. | on |
| “Minimum row height (mm)” or “Fixed row height (mm)” | The minimum height applies only to rows without a dragged height of their own (see Dragging the bottom edge of a row). The window “Row height follows the content” speaks of the column designer, which the free-form table does not have; the content of the row is meant. | 7 mm |
| “Corner radius (mm)” (section “Corners”) | Rounds the corners of the table (the field in general: see Border and background: What the fields do) as long as it fits entirely on one page and no area that repeats on every page cuts it; otherwise it stays square, on the canvas as in the PDF. In a group or cell, it is rounded if it fits entirely into the container. The gray line below the cells counts as a line here: If you enter a corner radius for a new free-form table, it therefore gets a thin gray rounded border all around. | empty (square) |

All other fields (“Header background”, “Zebra (every 2nd column)”, “Show header row”, the header row height, “Cell padding (mm)”, “Line spacing”, the guides and the visibility) work as for the data table (see Data tables: The properties of the whole table; for visibility see Visibility). This also applies to the note there that the white header type can no longer be seen if “Header background” is empty.

> **Caution:** As things stand today, the field “Line spacing” has the same trap for the free-form table as for the data table: After an entry, further characters do not arrive, and a Backspace without an active field can delete the table. What happens and what you can do about it is described under Data tables: “General” tab: section “Cells”.

#### “Position & size” tab and deleting

Applies here too, as for the data table (see Data tables: “Position & size” tab):

| Setting | Default here | Explained in |
|---|---|---|
| Positioning behavior and minimum gap | “Flowing on contact” | Positioning behavior: the three options and Positioning behavior: Minimum gap above; what the table starts with: Where the new table goes |
| Arrangement | 0 | Position, size, rotation and arrangement: Arrangement: layer order and sequence |
| Position, min. and max. width and the delete buttons | as for the data table | Position, size, rotation and arrangement: Position and size and Data tables: “Position & size” tab |

If the table is in a group or cell, the following is added:

- **Taking out:** “⬆ Take out of group” is at the very top above the tabs and takes the table one level up: out of a group on the page as a block of its own just below the group (“Taken out of the group – now a block of its own.”), out of a deeper group into the group above. In a table cell it is missing, in the cell of a free-form table as in a column designer cell (see Cells, header row and page break: Background, border and size of a cell).
- **Order:** If there are at least two objects in the group or cell, the section “Order in the group” is added below the tabs, with the note “Place … of … in this group …” (see Order in the group).

#### “Column” tab and “Table properties”

If a cell or header cell is selected, the “Column” tab shows the settings of its column. The following are specific to the free-form table:

| Setting | What it does | Default |
|---|---|---|
| “↳ Open header designer” (section “Column”) | Opens the header designer of this column and converts the header text in the process (see Cells, header row and page break: The header designer for the free-form table). | – |
| Note “Content is per row — double-clicking a cell on the canvas opens its cell designer (text/fields/objects).” | Appears where, for a data table, “↳ Open column designer” is: The free-form table has no column designer; each cell is designed individually. | – |
| “↳ Open cell designer (row …)” | Only if a cell of a row is selected, not for a header cell. Opens the cell designer of this cell, like a double-click. | – |
| “Width (mm)” (section “Size”) | The width of this column, as for the data table. The field does not take the content of the rows into account and does not drag it along; better drag the column border on the page: Then the contents move along, and the column does not become narrower than its content. | 90 or 85 mm with A4, new column 25 mm |
| Note “Without a data source every row has its own cells: …” | Appears in place of “Cell background”, the border fields and “⇊ Apply to all columns” of a data table: You set background and border per cell in the cell designer. You do not change the gray line below the cells here. | – |
| “Row” | “Add a row to the fixed table”: appends a new row at the end. | – |
| “🗑 Row” | Deletes the selected row, without a selected row the last one. The note on the button says which one it affects. One row always remains. | – |

“◀ Left” and “Right ▶”, the row height, “Vertical alignment” (applies here to the cells of all rows), “Column to the right”, “🗑 Delete column”, min. and max. width and “🗑 Delete entire table” work as for the data table (see The settings of a column).

The “Table properties” tab shows the same settings as “General” when the table is selected, among them, under the heading “Position & size”, the position (“X (mm)”, “Y (mm)” or the note) and “Advanced” with min. and max. width. Positioning behavior, minimum gap and arrangement appear only when the whole table is selected. At the very bottom is “🗑 Delete entire table” with the same confirmation.

> **Tip:** The safest way to delete a table in a group or cell: Select the whole table with “✥” and click “🗑 Delete element”. As things stand today, the button “🗑 Delete entire table” on the “Table properties” tab finds such a table only in a column designer cell; otherwise it reports “This table could not be found.” and deletes nothing.

### Grid from older templates

The grid is the predecessor of the free-form table: a simple grid of rows and cells. It can no longer be created anew; there is no button and no dragging for it. A grid now comes only from an older, imported or pasted template, and then it can still be edited. For new templates, use the free-form table. Not to be confused with it is the button “▦ Gridlines” in the header bar; that shows a 5 mm grid for aligning (see Gridlines and guides).

A grid appears in the structure as “▦ Grid”, below it one row “Cell row …, column …” for each filled cell. A click on “▦ Grid” selects the grid, a click on a cell row selects the cell. You select a grid in a group or cell via the structure. On the right, at the top, is then “Grid”, below it the general settings of an object in a group: in a group “⬆ Take out of group”, the positioning behavior with minimum gap and arrangement, with at least two objects in the container “Order in the group”, the visibility and “🗑 Delete element” (see The properties panel).

| What you do | What happens |
|---|---|
| Click on a grid cell | Selects the cell (blue frame, light blue background); on the right is “Grid cell”. |
| Shift, Ctrl or Cmd click | Adds the cell to the selection for merging or removes it (stronger blue). Dragging does not select here. |
| Double-click on a grid cell with text | Opens the window “Edit text”, for a text with versions first the window with its versions (see Versions). For other content it only selects. |
| Right-click on a grid cell | Opens the menu of the grid cell (below); the selection stays. |
| Dragging a field from “Data” onto a grid cell | A text field is appended to the text of the cell with a space; an empty cell gets a text in 10 pt. An image field becomes an image only in an empty cell, after the question about quality and at most as wide as the cell; otherwise the designer reports that the cell is already occupied. If there is an image or a split in the cell, it is not replaced by text. Relationships, rules and buttons from the ribbon land on the page. |
| Dragging the border between two columns | “Drag the column edge (the neighboring column adjusts)”: The sum stays the same, each column at least 8 mm. Before that, all columns are equally wide; with the first drag they get fixed widths. |

**The menu of the grid cell** (right-click):

- “🔗 Merge selected cells” (from two selected cells): merges adjacent cells of the same row. Unlike in the free-form table, the hidden cells are cut out, their content is gone; the message names the number, and Ctrl+Z brings it back. If selected wrongly, the designer says, for example, “Only cells in the same row can be merged.” or “Only cells that sit next to each other can be merged.”
- “⛓ Unmerge” (for a merged cell): creates individual, empty cells again.
- “⬌ Split into 2 columns”, “⬍ Split into 2 rows”: put a small grid with two sub-cells into the cell. “⊟ Remove split” undoes this, but keeps only the content of the first sub-cell.
- “✎ Edit content”: opens “Edit text”. “𝐓 Content: Text” replaces the content with an empty text, “🖼 Content: Image” with an image of 20 × 12 mm: The designer inserts the fixed image `logo_full` without asking, which you then change with “Choose image…” (see Image in a grid cell).
- “Row above”, “Row below”, “Column to the left”, “Column to the right”: insert empty rows or columns. A new column takes the width of its left neighbor if the columns have fixed widths, otherwise the widths are distributed evenly. If the place is in a merged cell, it grows.
- “🗑 Delete row”, “🗑 Delete column”: locked for the last row or column. A merged cell only becomes narrower when a column is deleted.

**If the grid is selected,** on the right is “Grid” with the number of rows and columns and the note “Click a cell to edit it; right-click: split/merge.”, without tabs:

| Setting | What it does | Default |
|---|---|---|
| “Minimum row height (mm)” | Each row becomes as tall as its tallest cell content including padding, at least this number. | 6 mm if not specified |
| Note on “Keep together at page break” | A grid is not split: If it no longer fits at the bottom, it moves to the next page as a whole, even if an older or imported template has switched off keeping together on the grid. If it is the first object on its page and fits on a whole page, it stays where it is instead and sticks out at the bottom. Only a grid that is taller than a whole page is split, and only between two rows; the document reports it. In a group without the checkbox, it likewise stays whole (see At the page edge: Images, shapes and lines in a split block, At the page edge: What happens at the page edge, At the page edge: The first object on a page and At the page edge: The note instead of the checkbox). | – |
| “Full grid”, “Border only”, “Rows only”, “None” (section “Borders & lines”) | Set outer border, horizontal and vertical lines all at once. | – |
| “Line style” | “solid”, “dashed” or “dotted”. | solid |
| “Line color” | The color of all lines. | light gray |
| “Line thickness (pt)” | In steps of 0.5; empty counts as 0.5 pt, 0 means no line. | 0.5 pt |
| “Outer border”, “Horizontal lines”, “Vertical lines” | Switch the three kinds of lines individually. Lines that are switched off appear in the designer as a subtle guide line, not in the PDF. An old grid without a setting of its own prints a full grid; the fields show exactly that. | all on |
| “🗑 Delete block” (section “Actions”) | Deletes the whole grid after the question “Delete this block?”. The Del key deletes without asking. | – |

Position, width, positioning behavior and visibility cannot be set for a grid on the page.

**If a grid cell is selected,** on the right is “Grid cell” with “Row …, column …” (for a merged cell with the addition “merged”). Below it: a preview of the text (“Click to edit”) with “✎ Edit text”, for other content the locked field “Content” (“Image” or “Nested grid”) and for an image the choice of the image source (see Image source); “Cell background” for the fill color of the cell; a note on merging; for several selected cells “🔗 Merge … selected cells”; under “Actions” “🗑 Delete row …” and “🗑 Delete column …”, which delete without asking and are locked for the last row or column.

In the PDF, the grid appears as on the canvas: The columns are equally wide or have their fixed widths, text fills the cell width, a grid in a cell sits without padding, and the lines take up no space.

### What changes in the document?

**On the canvas:** The free-form table shows all rows, for a table directly on the page also the following pages with the repeated header. Fields appear as blue markers with their name. Dashed guide lines show where the cells end; the two bars, the markings and the speech bubble belong only to the designer. Visibility rules do not take effect here (see Visibility: What changes in the document?).

**In the PDF:** Header row and rows with the values of the record, row by row across as many pages as necessary; a row is split only if it is taller than a page. Empty rows are as tall as the minimum row height. Guide lines do not appear. What merged cells and a fixed height additionally change is described under Cells, header row and page break: What changes in the document?. How it really looks is shown by the full preview.

---

## Cells, header row and page break

*For users · Tables · Page en/tabellenzellen.html*

> **In short:** This page applies to the cells of a data table and a free-form table. You design a cell in a window of its own that opens with a double-click: in the column designer for the content of a whole column, in the header designer for the heading of a column, in the cell designer for a single cell. In addition there are selecting, filling and emptying cells, merging cells, splitting columns and the table in a group or cell. The latter part describes what happens in the PDF when a table runs beyond the end of the page: the header on the following pages, keeping a row together or splitting it, and cutting off at a fixed height. Where the two kinds of table differ, it is noted in each case.

### The windows for designing

You design the content of a cell not on the page, but in a window of its own that opens with a double-click. It is the same window as the group designer; path, “Zoom”, “✕ Close”, Esc, ribbon and “Data” are described in Groups: The window at a glance. Depending on the cell, it has a different name:

- The column designer designs the data cell of a column of the data table; what you set there applies to this column in every row.
- The header designer designs the heading of a column, for the data table as for the free-form table.
- The cell designer designs exactly one cell: that of an extra row of the data table and every cell of a row of the free-form table.

Which double-click opens which window is shown by the overview under Working on the canvas: The double-click. The first double-click on a simple data cell or header cell converts it permanently; going back is possible only with Ctrl+Z (see What the double-click changes permanently and Designing the header row).

### Selecting, filling and emptying cells

This is how you proceed with the cells of a data table. You select and operate the cells of a free-form table as described under Free-form tables: Working on the canvas; what you can drag into a cell is described for both kinds of table under Dragging fields into cells.

- **Selecting:** A click on a header or data cell selects this part of the column; the “Column” tab appears on the right. The cell gets a frame in a contrasting color, blue, amber on a blue background.
- **Several cells:** With Ctrl, Cmd or Shift click you add further cells; another Ctrl click removes one again. Several selected cells have a dashed frame. In the data row and in extra rows, dragging without a modifier key also selects an area. In the header row, dragging moves the column; there you select with Ctrl+click or Ctrl+drag.
- **A rectangle:** A Ctrl click into another row of the same record, or a diagonal drag downward, selects a rectangle, for example 2 × 2 cells: “… selected — »Merge cells« is now shown at the top of the table.”
- **Tooltips:** A simple cell has none. A designed data cell shows “Double-click: open column designer · Drag or Ctrl+click: select several cells (then »Merge cells«)”, a designed header cell “Double-click: open header designer”.
- **In the structure:** In the area “Structure”, the table, every column and every filled cell are shown as rows of their own; the names of the entries are given in Working on the canvas: The structure. A click on a column row selects the column.
- **Background and border:** For the data cells of a column on the “Column” tab (“Cell background”, “Turn on border”), as soon as the column has a column designer; for a header cell in the header designer; for a cell of an extra row or of a free-form table in its cell designer (what the checkbox “Turn on border” sets there is shown in Border, background and colors: What the fields do). You transfer them to all columns or header cells with Applying to all columns or header cells.

**Emptying:** If you press Del or Backspace with a selected cell, several cells or a block, only the content is removed; columns and rows stay: “1 item(s) removed from the cell — column and row stay. Ctrl+Z brings it back.” A designed cell stays designed, just empty. If it was already empty, it says “This cell was already empty.” If the whole table is selected, by contrast, Del deletes the table, without asking.

#### Dragging fields into cells

Fields from the area “Data” can be dragged directly onto a cell. What then happens depends on the cell:

| Dropping a field on | What happens |
|---|---|
| a simple data cell | The field is appended to the content of the cell, with a space in between; the column stays simple. An image field instead becomes an image: The column gets a column designer for this, and the designer asks about the quality (see Images: Quality). |
| a simple header cell | A field cannot go into the heading this way. Do not drop it there; for a field in the heading, open the header designer. For the free-form table, as things stand today the field appears there neither on the canvas nor in the PDF; if it has happened anyway, undo the step right away with Ctrl+Z. |
| a designed data cell on the page | A new text with the field is placed below the existing content, in 9 pt dark gray and as wide as the column minus the padding on the left and right; an image field becomes an image below it. If something does not belong here, the designer reports: “Please place this element in the column designer (double-click the cell).” |
| a designed header cell on the page | A new text below the existing content, with a field of the main record. For the free-form table, it is 1 mm below the lowest object, in 9 pt and as wide as the column minus the padding on both sides; an image field becomes an image. In the PDF, the value from the main record appears. |
| a cell of an extra row | The field goes into the cell as text, an image field as an image, and is filled in for every record. |
| a cell of a row of the free-form table | The field becomes a text in the cell, an image or file field an image. The details are below the table. |

**For the free-form table,** the cell lights up blue while you drag a field over it and is selected afterwards. The following applies:

- **Text field:** A text with the field is created in the cell, in 9 pt and dark gray, as wide as the column minus 3 mm, set to “Fixed position”. It goes to the top left of the cell, even if something is already there; the two can then overlap. A second field is therefore better placed in the cell designer at the desired spot or in the window “Edit text” into the existing text (see The “Edit text” window: Inserting fields).
- **Image or file field:** An image is created, at most 20 mm wide (narrower if the column minus 3 mm is narrower) and three quarters as tall, 1 mm below the lowest object of the cell. For an image field, the designer first asks about the quality (see Images: Quality); a file field comes without a question.
- **Which record:** The cells of a free-form table on the page belong to the main record. The designer therefore inserts a field from a list as the value of the first row and says so in a message. If it cannot tell which list the field belongs to, it rejects it with a message. Both messages are described under Data tree and field picker: A field “per row” outside a table cell. If the free-form table itself is inside a row of a data table, it belongs to that row, and the field stays as it is.
- **Calculated fields of a rule on a list,** for example a total, currently cannot be dragged into a cell either; the designer rejects them with the message from above. Via the window “Edit text”, too, no reliable value results at present (see Rules: Using the result). How you put a total below a line-item table is described under Rules: Example: the total below the line-item table.
- **Relationship, rule or button from the ribbon:** The cell does not accept them; the object or the table is created on the page, as if you had dragged it next to the table. You create a table in a cell in the cell designer, with “Data table” or “Free-form table” or by dragging the relationship onto the work area there.

On the canvas, a field appears as a blue marker with its name. Full preview and PDF show the value from the record.

### Designing with the double-click: the column designer

A single click selects a cell. A double-click opens a large editing window, as with a group; which one is shown by the overview under Working on the canvas: The double-click. For a data cell of the data table, it is the column designer: What you design there applies to this column in every row.

1. Double-click a data cell of the column, or select the column and click “↳ Open column designer” on the right.
   → The column designer opens. At the top left it says, for example, “📄 Document › Column 2”. In the middle the cell lies as the work area; a dashed line shows the cell border, and the padding is visible. The previous content is in it as text.
2. Drag fields from the area “Data”, branch “Per row · …”, into the cell, or insert text, an image, a code, shapes, a group or a table via the ribbon.
   → Fields appear as blue markers in the cell. In print, the value of their record appears in every row.
3. You change font, size, color and alignment of a text with a double-click on the text in the window “Edit text” (see The “Edit text” window).
4. Click “✕ Close” or press Esc.
   → You are back on the page; the sample row shows the new content.

A code in the cell, for example the EAN of each item, comes from the ribbon of the window, section “Codes”; its content belongs to the row, and an empty code with “print nothing” takes up no height (see Barcode, QR code and GiroCode: Codes in tables).

The branch “Per row · …” appears in the area “Data” only as long as you are inside a table cell. It contains the fields of a row and the lists below it (see Data tree and field picker: The data tree in the cell designer and column designer).

[Image: The window of the column designer. At the top left the path “Document › Column 4”, at the right a zoom slider (300 %) and the blue button “✕ Close”. Below it a ribbon with Text, Image, Group, Shapes, Barcode, QR code, GiroCode, Data table and Free-form table. On the left the area “DATA” with a search box, “Custom variables”, “System variables” and the expanded branch “Per row · Rechnungspositionen” with a light violet background, with the fields Pos.-Nr., Menge, Einheit, Einzelpreis and Gesamt (each with a field type marker and the addition “per row”) as well as the collapsed relationships “Produkt” (N:1) and “Chargen” (1:N) and the rule “Chargenliste”; below it “All fields”. In the middle, on a gray work area, the cell as a dashed box with handles; inside it, right-aligned, is the blue field marker “Einzelpreis”. On the right the area “PROPERTIES” with the marker “COLUMN” and “4 of 5 · Einzelpreis”, the tabs “Column” and “Table properties”, the buttons “◀ Left” and “Right ▶” and the fields Width (mm) 35, Row height, Vertical alignment and Cell background.]
Caption: The column designer: It opens after a double-click on a data cell.
- Image marker 1: The path shows where you are: in column 4 of the document.
- Image marker 2: The cell as a work area. What you design here applies to this column in every row.
- Image marker 3: The branch “Per row” with the fields of a row; you drag them into the cell.
- Image marker 4: On the right are the settings of the column and, on the second tab, those of the whole table.
- Image marker 5: “✕ Close” closes the window; the Esc key does the same.

#### What the double-click changes permanently

Even the double-click on a data cell or the button “↳ Open column designer” permanently turns the column into a designed column, even if you change nothing in the window. Going back is possible only with Ctrl+Z.

- The previous content of the cell becomes a text in the cell, as wide as the column minus the padding on the left and right, in the font size and color of the table rows and with the alignment of the column. You then edit it in the window “Edit text”, no longer as a simple value.
- “Keep row together at page break” is grayed out: Print keeps the rows of this table together anyway (see Keeping a row together or splitting it).
- On the “Column” tab, “Cell background” and the border fields appear.
- In the area “Structure”, the column carries the marker “Group”.
- Rounded corners stay rounded, even if keeping together was off before (see Data tables: “General” tab: Border, corners, guides, visibility).

> **Tip:** If long table rows are to be allowed to split at the end of the page, leave the columns simple: Drag the fields directly onto the data cells on the page instead of opening the columns with a double-click. Then “Keep row together at page break” remains usable. An image field, however, turns the column into a designed column in any case.

#### In the column designer: properties, handles, notes

The column designer is the same window as the group designer (see The windows for designing). In it, the following applies:

- **Properties:** A click on an empty area shows the tabs “Column” and “Table properties” on the right as outside, only without the two buttons for opening the designers; below it says “Click on an empty area to show the settings of this column.” “Column to the right” inserts a column, and you stay in the window: “New column added on the right — you stay in the column designer of this column.” “🗑 Delete column” deletes the column and leads out of the window. It is best to delete the whole table on the page after you have closed the window.
- **Handles:** As long as no object in the cell is selected, the work area has handles on the left, right, bottom and at the corners: “Drag: ↔ column width · ↓ row height (all data rows)”. Sideways changes the column width, with the same limits as the field “Width (mm)”; for a merged cell, the last column it spans changes. Downward, the following applies: With automatic row height, you only drag out a working height for designing, which disappears again when you close; with a fixed row height, you set the height of all rows.
- **Note when closing:** If the cell showed more space in the designer than is printed, a window explains it. With automatic row height it says “Row height follows the content”: The free space below the content is gone in print. With a fixed row height it says “⚠ There is more space here than in the document”: Whatever lies below the edge is missing in the document. “Got it” closes. “⚙ Show setting” closes the designer windows, selects the table, opens the “General” tab and makes the matching field light up briefly. The same note does not appear again right away for the same table.

#### Applying to all columns or header cells

Below the border fields of a data cell is “⇊ Apply to all columns”, in the header designer “⇊ Apply to all header cells”. The button transfers background, border color, border thickness and border lines of this cell to all other columns or header cells of the table. The content of each column stays. The message names the number, for example “Border & background copied to 4 more columns.”

- If the cell has a cell background, all other columns become designed columns in the process, with the consequences from What the double-click changes permanently.
- If it has no background, the others lose theirs. If it has no border, the others lose their borders.
- In the header, the following applies: If the header cell has no header background of its own, the others lose theirs, and the header background of the table applies again. Font colors and font sizes are not transferred; you change those in each header cell yourself.
- The button does not exist in extra rows; there you set border and background per cell. In free-form tables there is only “⇊ Apply to all header cells”; it is the only button that transfers border and background to other cells there. You set the cells of the rows individually.

### Designing the header row: the header designer

Whether the table has a header row at all, how tall it is and whether it repeats on following pages, you set in the properties of the table, in the section “Header row” (see Data tables: “General” tab: Section “Header row”; the same applies to the free-form table, see Free-form tables: “General” tab). Here it is about the heading of an individual column.

In the header designer, you design the heading of a column: text, font, alignment, background and border, if you wish also images or fields of the main record.

1. Double-click the header cell of the column, or select the column and click “↳ Open header designer” on the right.
   → The header designer opens. At the top left it says where you are, for example “📄 Document › Header · Column 2”. In the middle the header cell lies in its size and header color; a dashed line shows the cell border. The previous title is in it as text.
2. Double-click the text to change it and to set font, size, color and alignment. You insert further objects via the ribbon of the window.
3. Click “✕ Close” at the top right or press Esc.
   → You are back on the page. If you now point at the header cell, it says “Double-click: open header designer”.

The window is built like the group designer, with its own ribbon, the data on the left and the properties on the right (see Editing the content of a group). When opened, the zoom is fitted to the cell. Fields that you drag into the header come from the main record, because the header belongs to no row.

**What happens permanently:** Even the double-click or the button turns the simple title into a text in a designed header cell, in font and color of the previous header and with the alignment of the column; for the free-form table, by default that is white, bold, 9 pt. Going back is possible only with Ctrl+Z. After that, the alignment of the column and the “Line spacing” of the table no longer apply to this header cell, but those of the text, and the header cell shows the note “Double-click: open header designer”. In the area “Structure”, the column carries the marker “Header”.

A click on an empty area shows “Header cell · Header designer” on the right with these settings:

| Setting | What it does | Default |
|---|---|---|
| “Width (mm)” | The width of the column, as on the “Column” tab. | – |
| “Fit header row height to the content automatically” with “Minimum header row height (mm)” or “Fixed header row height (mm)” | The same fields as under Data tables: Section “Header row”; they apply to the whole header row, not just this column. | on, 8 mm |
| “Header background” | Shows the color that currently applies, but changes only this header cell. It lies above the header background of the table. If you empty the field or choose “No color”, the header background of the table applies again to this header cell; a single header cell without a background does not exist. If it is to be white, enter #FFFFFF. | like the table |
| “Turn on border” with “Border color”, “Border thickness (pt)” and “Border lines (sides)” | The border of this header cell. It works like the border of the data cell on the “Column” tab, with the same values when checked (see Data tables: The settings of a column and Border, background and colors: What the fields do). | top and bottom, light gray, 0.5 pt |
| “⇊ Apply to all header cells” | Transfers header background and border of this header cell to all others (see Applying to all columns or header cells). | – |

- **Handles:** As long as no object in the cell is selected, the work area has handles on the left, right, bottom and at the corners: “Drag: ↔ column width · ↓ header row height (whole header row)”. Sideways changes the column width, downward the header row height; that is really stored in the process. If you drag only sideways, you keep the height.
- **Note when closing:** If the header row height is fixed and the header designer showed more space than is printed, “⚠ There is more space here than in the document” appears: Whatever lies below the edge is missing in the document. “Got it” closes; “⚙ Show setting” leads to the header row height.
- **Field from outside:** What happens when you drag a field on the page onto a header cell is described in the table under Dragging fields into cells.

> **Tip:** First finish designing one header cell, background and border included, and then transfer it with “⇊ Apply to all header cells” (see Applying to all columns or header cells).

#### The header designer for the free-form table

You design the heading of a column in the header designer exactly as for the data table: double-click the header cell or “↳ Open header designer” on the “Column” tab. Window, settings, handles and the note when closing are described in the section Designing the header row. For the free-form table, the following applies:

- **Header text:** There is no input field for the header text. You change the text with a double-click on it in the window “Edit text”.
- **Applying to all:** “⇊ Apply to all header cells” exists here (see Applying to all columns or header cells).
- **Merging:** Header cells cannot be merged in the free-form table (see Merging cells and splitting columns).
- **Fields in the header:** How a field is dragged onto a header cell is described under Dragging fields into cells.
- **Deleting the header text:** The Del key with a selected header cell deletes the header text or empties the header designer; Ctrl+Z brings it back.

### Designing cells: the cell designer

Each cell is designed individually; what you put into a cell appears only there. You can drag fields directly onto a cell. Everything else, also background and border of the cell, you set in the cell designer. This applies to every cell of the free-form table and to the cells of an extra row of the data table (see Data tables: Extra rows).

1. Double-click the cell. You can also click the cell and click “↳ Open cell designer (row …)” on the right.
   → The cell designer opens. At the top left it says where you are, for example “📄 Document › Row 2 · Column 1”. In the middle the cell lies as the work area.
2. Insert via the ribbon of the window what belongs in the cell, for example “Text” or “Image”, or drag fields from “Data” onto the work area.
3. You set font, size, color and alignment of a text in the window “Edit text”; a double-click on the text opens it (see The “Edit text” window).
4. For background and border of the cell, click on an empty area of the work area; the settings of the cell are then on the right (see Background, border and size of a cell).
5. Click “✕ Close” at the top right or press the Esc key.
   → You are back on the page, and the cell shows its new content.

> **Good to know:** A cell can contain everything that a group contains: texts, fields, images, codes, shapes, groups and a further data or free-form table. If a table is in a cell, it has no page break of its own (see Tables in groups and cells).

#### The window of the cell designer

The cell designer is the same window as the group designer (see The windows for designing). In a cell of the free-form table, the following applies:

- **Path:** The last part names the cell, for example “Row 2 · Column 1”, for a header cell “Header · Column 1”.
- **Work area:** the cell itself, as wide as the column, for a merged cell as all merged columns together, and as tall as the printed row or taller if the content needs more on the canvas. A dashed border shows the cell edge; the content begins indented by the “Cell padding (mm)”.
- **New objects** from the ribbon are placed below the existing content. A new text is set to “Flowing on contact” (see Positioning behavior: What a new object starts with). A new table is fitted to the cell (see Free-form tables: Where the new table goes).
- **Handle “Drag to resize the group”:** Dragged sideways, the width does not hold, because the cell is always as wide as its column; change the width at the column border on the page or under “Width (mm)” on the “Column” tab. Dragged downward, the handle switches off “Automatic height (fit to content)” as for any group (see Size handles and Automatic height and limits); for the cell, the caution under Background, border and size of a cell then applies.
- **Closing:** Unlike in the header designer, no note about the row height appears.

The cell designer of an extra row of the data table is the same window; its path ends, for example, with “Extra row 1 · Column 1”. The fields that you place there are filled in for every record, as in the main row (see Data tables: Extra rows).

#### Background, border and size of a cell

Click on an empty area in the cell designer. On the right is then “Group” with the addition “zoomed in”, spread across the tabs “General” and “Position & size”: Every cell is a small group inside; below it is the sentence “Click on an empty area to show the settings of this group.” This also applies to the cell designer of an extra row. What the fields do is described under Groups: Settings of the group and Border, background and colors: Border and background; in a cell, the following differs:

| Setting | What it does | Default |
|---|---|---|
| “Background” (section “Background & border”) | Fills the whole cell up to its edges, the padding too. In the PDF, this color lies above the zebra of the table; the color of the cell wins. In the last row of a table with rounded corners, the outer lower corners are rounded as well. How to type or choose a color is described under Color field and color picker. | no color |
| “Turn on border” | Draws a border around this cell; it is added to the gray line of the column. The checkbox sets dark gray (#333333), 1 pt and all four sides (see What the fields do). Where the line lies on the canvas and in the PDF, also between two neighboring cells, is described under Where the line sits. | off |
| “Border color”, “Border thickness (pt)”, “Border lines (sides)”, “Height (mm)”, “Spacing between objects (mm)” | As for a group (see Settings of the group). | as for a group directly in the document |
| “Corner radius (mm)” | It is there, but a single cell is not rounded by it: Background and border of a cell are always drawn at the cell edges. Only the whole table gets rounded corners, via “Corner radius (mm)” in the settings of the table (see Free-form tables: “General” tab and Data tables: “General” tab: Border, corners, guides, visibility). | 0 |
| “Turn visibility rules on/off” with “↳ Edit rule” (section “Visibility”) | Prints the content of this cell only if a condition is met; row and column stay. How this works is described under Visibility. Whether background and border of the cell disappear with the content, check in the full preview (see Visibility: Per object). | off (always printed) |
| “X (mm)”, “Y (mm)” (“Position & size” tab, section “Position”) | Would shift the entire content of the cell. Whether the canvas and the PDF show such a shift identically has not been checked. Leave both fields empty: The distance to the cell edge is governed by “Cell padding (mm)” of the table; you set the position of individual objects on the objects themselves. | empty |
| “Automatic height (fit to content)” (section “Size & spacing”) | On: The cell grows with its content, and the row with it. Off: The cell has a fixed height, and this also determines the height of the row. What happens when switching it off is described under Automatic height and limits. | on |
| “Width (mm) — empty = full width” | Does not hold in a cell: The designer keeps resetting the width to the width of the column minus the padding on both sides. Change the column width instead. | column width minus padding |
| Section “Behavior” | Instead of the checkbox “Keep together at page break”, there is a note here that speaks of a “text” in a group (see The note instead of the checkbox). What applies to the cell is described under Keeping a row together or splitting it. | – |

Each cell is set individually. A “⇊ Apply to all columns” as in a data table does not exist here, nor does “↳ Zoom in (edit content)”, a positioning behavior, the arrangement or “🔁 Repeat on every page”.

> **Caution:** If a cell has a fixed height, its bottom edge is a wall: The PDF prints only what fits into this height, the rest is missing (see The fixed bottom edge and where the PDF cuts off). When the document is created, a message says how many millimeters of the cell content were not printed (see Where the PDF really cuts off). The canvas cuts off at the same edge and draws a dashed orange line there; if you point at the cell with the mouse, it names the fixed height and how much the content needs. Only in the cell designer does the content still appear in full. Therefore leave “Automatic height (fit to content)” on and do not drag the work area downward in the cell designer. If a row is to be taller than its content, drag at its bottom edge on the page.

> **Good to know:** If you select an object in the cell designer, the button “⬆ Take out of group” is missing, as in every table cell: Above the cell is the table, and it does not accept free objects. If you need the object elsewhere, copy it there and delete it in the cell (see Copying and deleting). If it is in a group in the cell, the button is there and takes it out of this group into the cell.

#### Which line is set where

There are no table-wide switches for lines. A free-form table has four kinds of lines:

- **The gray line below each cell** (0.5 pt) comes from the column. For a free-form table there is no setting to change or remove it. New and split columns take it over. It counts as a visible line for the rounded border with “Corner radius (mm)”.
- **The border of a header cell** is at first a gray line at the top and bottom. You change it in the header designer and transfer it there with “⇊ Apply to all header cells” to all header cells (see The header designer for the free-form table).
- **The border of a single cell** is added to the gray line and applies only to this cell. You set it in the cell designer; it cannot be transferred to other cells.
- **The rounded border around the whole table** is created with “Corner radius (mm)” as soon as a column has a visible line. It replaces the straight outer edges.

> **Good to know:** On the right under “Border”, every table has the sentence “You set borders per cell or header cell in its designer — … and apply them to the whole table with »Apply to all«.” For a free-form table, applying to all works only for the header cells; you set the cells of the rows individually.

### Merging cells and splitting columns

Several cells can be combined into one, for example for a heading over three columns while the data below stays separate, or for a description across the whole width of an extra row. For the free-form table you need merged cells, for example, for a label over two columns or a signature row across the whole width. There, a merge always belongs to a single row: Row 1 can span two columns while row 2 stays separate.

1. Click the first of the cells you want to merge: for the data table, for example in the header row on the first of three cells, for the free-form table in a row.
2. Add the neighboring cells with Ctrl+click, or hold Ctrl and drag across them. Dragging without Ctrl selects in a data row, in an extra row and in the rows of a free-form table; in the header row it moves the column.
   → “Merge cells” appears in the bar on the table. For the free-form table, a violet dashed frame shows the selection, and the button is at the top right of the table, with the note “Merge the … selected cells of row … into ONE. …”.
3. Click “Merge cells”.
   → The cells are one; for the data table, the data cells below merged header cells stay separate. The designer reports, for example: “3 header cells merged. The content of the hidden columns is kept — »Unmerge cells« brings it back.” For the free-form table, the message names the row: “… cells of row … merged. …” There, the left cell shows its content across the whole width, a narrow blue strip is at its left edge, and afterward the merged cell is selected.

[Image: Detail of the canvas. At the top left is the heading “RECHNUNG”. The blue header row consists of three parts: on the left “Pos.-Nr.” and “Bezeichnung” as individual cells, on the right a wide cell marked with an orange border across three columns with the centered heading “Beträge”. Below it the sample row with five more separate cells and the blue field markers Pos.-Nr., Bezeichnung, Menge, Einzelpreis, Gesamt. Above the table the bar with the buttons “Column”, in red “Column”, “Unmerge cells” and “Row”; on the left of the table the move handle.]
Caption: A common heading over three columns; the data cells below stay separate.
- Image marker 1: The three header cells have become one.
- Image marker 2: The data cells below stay separate.
- Image marker 3: “Unmerge cells” restores the original cells with their content.

[Image: Detail of the canvas with a free-form table “Beleg” and “Angaben”. In the first three rows there are labels on the left (Rechnungsnummer, Rechnungsdatum, Kunde) and blue field markers on the right. The fourth row is a single wide cell with a strong blue border and the sentence “Alle Preise netto, zahlbar innerhalb von 14 Tagen.” Above the table on the left the move handle, “Row” and in red “Row”, on the right “Column”, in red “Column” and “Unmerge cells”.]
Caption: A merged cell in the last row; the rows above stay two-column.
- Image marker 1: The two cells are one; the content spans the whole width.
- Image marker 2: “Unmerge cells” restores the original cells with their content.

- **Which row:** For the data table, header row, data row and every extra row are rows of their own. What you select decides which one is merged.
- **Side by side:** This works only with directly adjacent cells, for the free-form table only with cells of the same row. Otherwise the bar shows the note “not adjacent” instead of the button, and for the data table an attempt reports: “To merge, select at least two columns that sit NEXT to each other — with Ctrl+click.”
- **On top of each other and as a block:** This works only within one record: the main row with its extra rows or extra rows one below the other. Not between header row and data row, because the header repeats on every page, and not between two records. In a free-form table, cells on top of each other, that is, from two rows, cannot be merged.
- **No overlap:** If a cell merged on top of each other reaches into a row from above, “Merge cells” rejects a merge across this column and names it: “Merging is not possible: column 2 is covered in … by a vertically merged cell above it. …” Likewise if a merged cell reaches into the block from the left. Then undo this merge first, or select the cells without this column.
- **Nothing is lost:** Hidden cells keep width and content; they are just neither shown nor printed. If something really is in a hidden cell, the document says so: When the PDF is created, a note in English appears, for both kinds of table (see Problems and messages: Notes and warnings). It does not report an empty hidden cell.
- **Unmerging:** Select the merged cell and click “Unmerge cells” (note on the button for the free-form table: “Unmerge the cells — all original cells stand on their own again, with their content.”). This restores all original cells with their content, for a block horizontally and vertically at once: “Merge undone — 3 columns are separate again.”
- **Columns in a merge:** If you insert a column in a merge, the merge grows with it; if you delete one, it shrinks; when moving, the whole block moves. If a merge has to be undone in the process, the designer says so.
- **Page break:** A table with merged cells no longer splits a row across two pages; it moves entirely to the next one; “Keep row together at page break” is then grayed out (see Keeping a row together or splitting it).
- **In the PDF,** for the free-form table a merged cell is as wide as its columns together; its content has this width minus the padding on both sides.

The ⓘ at the section “Cells” in the settings of the table also explains merging. What it says about merging on top of each other and in the header row applies to data tables.

> **Tip:** In the header row of a free-form table, as things stand today the bar does not offer merging: Even with several selected header cells, only “Split into 2 columns” appears, and a merged header cell from a former data table cannot be unmerged there. For a heading over several columns, uncheck “Show header row” and design the first row as the header: merge cells, set a background in the cell designer, make the text bold. This row does not repeat on following pages, however.

#### Splitting columns

**Split into 2 columns:** The button appears for a single, unmerged cell. It makes two columns out of the whole column, with header and all rows, even if you have selected a header cell or a cell of an extra row. The width is halved, each half at least 4 mm; the new column is to the right of it and empty, also in the header. Border, header background and the font color of the header cell are taken over, min. and max. width are not. Objects in the cells of the old column are fitted to half the width, images shrink with their aspect ratio. Merges across the split point grow by the new column. Message: “Column split — the new one sits to the right and is still empty.”

In the free-form table, the button also appears for selected header cells; the new right half has an empty cell in every row. “Vertical alignment” is not taken over by it.

> **Tip:** If only one row is to have two cells side by side, split the column and merge the two halves again in all other rows. Splitting fits the objects into the left half in all rows: What no longer fits becomes narrower, an image together with its height; a table keeps its width. What stood further to the right moves to the left edge. Merging again does not make the objects wider again. Therefore split before you fill the cells, or drag the objects back to full width in the cell designer afterward. The header row then keeps two header cells, the right one empty; in the free-form table they cannot be merged. If you need a continuous heading, uncheck “Show header row” and design the first row as the header (see the tip under Merging cells and splitting columns).

### Tables in groups and cells

A data table or a free-form table can be in a group or in a cell of another table, for example the batches per item. Such a table has no page break of its own: The header appears once, and it moves with its container. If the container is split at the page boundary, its header is not left alone at the end of the page: If not even the beginning of the first row fits below it, it moves to the next page together with it (the exception is described under Header on following pages).

#### Table in a group

Open the group with a double-click and click “Data table” in the window, or drag the button from the ribbon or a list or rule from the area “Data” onto the group. With a click, the table is 2 mm from the left margin and 2 mm below the lowest object of the group, when dragged where you let go. The columns are fitted to the width of the group from this point minus 4 mm; if the group has no width of its own, the width with which it stands on the canvas counts. The table is based on its rule as usual; you can view and change the row source. For a free-form table, the way is described under Free-form tables: Where the new table goes.

- **Properties:** At the top it says only “Table”, below it “⬆ Take out of group”, which puts the table one level up (see Moving objects in and out). X and Y count from the group (see Position in a group or cell). Below the tabs there are also, with at least two objects in the group, “Order in the group” (see Order in the group) and “🗑 Delete element”, which deletes without asking. “Keep row together at page break” is grayed out.
- **In the PDF:** The header row is not repeated, even if the checkbox for it is checked, and keeping rows together has no effect. The table moves with the group; if the group is taller than a page or is split across pages, print distributes it together with the table across the following pages. Its header is not left alone at the bottom: If not even the beginning of the first row fits below it, the table begins with its header on the next page. If it is at the very top of the group, or if less of the group’s text would be left above it than “Minimum lines when text is split” requires (for example just a heading line), the whole group begins on the next page (see At the page edge: Minimum lines when text is split). If the group has a background color or a closed border, the protection of the minimum lines applies only to a limited extent (see the “Caution” box under At the page edge: Which texts the protection applies to). An exception is also the group that is the first object on its page and taller than a page (see At the page edge: The first object on a page): If the header of the table still fits below the text but no row does, the rows of the header count too. If text and header together suffice for “Minimum lines when text is split”, the text stays alone, with the default of 2 even a single line; the table begins with its header on the next page. The canvas does not split the group and can differ from print here; where the header is in print is shown by the full preview. If the group has a fixed height, its bottom edge is a wall: Rows that no longer fit entirely are missing in the PDF, and the document reports how many (see What the wall does to an object). The message appears in English when the document is created; for a free-form table it counts rows. The canvas may still show a cut-off row of a free-form table partly; rely on the full preview here.

> **Tip:** Switch on “Automatic height (fit to content)” on a group with a data table. Then the group grows with the rows, and nothing is cut off (see Automatic height and limits).

#### Table in a table cell

A table in a cell shows, in every row of the outer table, the list of that row, for example the batches below each item.

1. Double-click the data cell of the outer column that the table is to go into.
   → The column designer opens. In the area “Data” there is now the branch “Per row · …” with the fields and lists of a row.
2. Drag the list, for example “Chargen”, or a rule on it from the branch “Per row” into the window.
   → For a list, the designer creates a rule and opens its window; the column selection follows. For a rule, it goes straight to the column selection.
3. Choose the columns and click “Apply”.
   → The inner table is in the cell, with its top left corner where you let go; its columns are fitted from there to the width of the cell minus 4 mm.

[Image: The window of the column designer for column 2. At the top left the path “Document › Column 2”, on the right the zoom slider (142 %) and the button “✕ Close”; below it the ribbon. On the left in the area “DATA” the collapsed rows “Custom variables” and “System variables”, the collapsed branch “Per row · Chargen” with a light violet background and “All fields”. In the gray work area lies the dashed cell and in it a small table with a blue header row “Chargennummer” and “Wert” and a sample row with the blue field markers “Chargennummer” and “Wert”; it is selected (blue frame, handles left and right, move handle, at the top right the buttons “Column” and “Row”). On the right in the area “PROPERTIES” is the marker “TABLE” without a name, below it the tabs “General” and “Position & size” and in the section “DATA” a blue button “Data source & sorting” with a gear and “Data source: Chargen”. The section “STYLE” follows with header background, the two zebra fields and the grayed-out checkbox “Keep row together at page break” with its note.]
Caption: An inner table in the cell of the outer table, edited in the column designer.
- Image marker 1: You are in the column designer of the outer column; you edit the inner table here.
- Image marker 2: The inner table shows the batches of each row of the outer table.
- Image marker 3: The branch “Per row” in the area “Data”; here it stands for the selected inner table (“Per row · Chargen”).
- Image marker 4: The bar of the inner table.
- Image marker 5: For the inner table, “Data source & sorting” is here instead of “Filter & sorting (rule)”; you change filter and sorting of the rule in the area “Data” at the rule below the list.

- **Faster:** In the area “Data”, expand the list of the outer table, for example “Positionen”, and drag the list below it, for example “Chargen”, directly onto a simple data cell of the outer table on the page. The column becomes a designed column in the process, its previous text stays as text, the inner table is below it, and it is fitted to the column width minus the padding on the left and right. If you drag without a suitable target, the designer reports: “Nested table: first double-click to zoom into a table cell, then drag the sub-collection into it.”
- **Too narrow:** Every column of the inner table gets at least 10 mm. If the space is not enough, the designer warns that the inner table becomes wider than its cell and may stick out beyond it in the PDF.
- **Only via “Per row”:** The button “Data table” in the ribbon of the window chooses the row source from the document, not from the row. For a table that refers to the row of the outer table, therefore take the way via “Per row”.
- **Properties:** The inner table is based on its rule. Its path, however, counts from the row of the outer table, so the designer does not find the rule from the table. In the section “Data”, therefore, “⚙ Data source & sorting” is there instead of “⚙ Filter & sorting (rule)”, and in the window “Change…” is grayed out; you change the source by dragging the list in again. You change filter and sorting of the rule in the area “Data” at the rule below the list (in the column designer in the branch “Per row”) with ⚙. The sort levels in the window “Data source & sorting” sort the rows of the rule once more afterward; for ties, the order of the rule stays. “⬆ Take out of group” does not exist here. The inner table is edited in the column designer of the outer column; on the page, a click on the cell belongs to the outer column.
- **Deleting:** In the column designer, select a column of the inner table and click “🗑 Delete entire table” on the “Table properties” tab; that removes the table from its cell.
- **In the PDF:** Header and all rows of the inner table are in the cell; their height counts toward the row height of the outer table. It does not repeat the header. If the row or line of the outer table is taller than a page and is split, the header of the inner table is not left alone at the end of a page: If not even the beginning of its first row fits below it, it begins with it on the next page. If in this row of the outer table nothing is above the inner table, not even in a neighboring cell, the whole row begins on the next page; if it is the first row of the outer table, it takes its header along. The canvas knows the inner table only as a whole and therefore shows the cut approximately; where the header is in print is shown by the full preview.

Into a header cell, you insert a table via the ribbon of the header designer; it refers to the main record, because the header belongs to no row. For a table that refers to the row of the outer table, use a data cell of the main row as described above. Do not use the button “Data table” in the cell designer of an extra row for this: It too chooses the row source from the document, not from the row.

### Across several pages

A table directly in the document runs across as many pages as its rows need. For a data table, you see nothing of this on the canvas; the full preview and the PDF show it. A free-form table already shows beyond the end of the page on the canvas (see Free-form tables: Beyond the end of the page).

[Image: Detail of page 2 of a printed document. At the top a blue header row with white bold type: Pos., Bezeichnung, Menge, Einzelpreis, Gesamt. Below it follow the rows 0200 to 0320, each with item number, description (“Position 20 - Dienstleistung Paket” etc.), quantity with unit, unit price and total in euros. Every second row has a light blue background (zebra). Row 0270 is taller: Its description runs over four lines of text.]
Caption: Page 2 of a long data table in the PDF: The header row repeats, every second row is shaded.
- Image marker 1: The header row is also on this following page.
- Image marker 2: The row zebra colors every second row and continues across all pages.
- Image marker 3: A row becomes as tall as its content: The description of this row runs over four lines of text.

- **Beginning:** If not even the header row fits in the rest of the page, the table begins on the next page (see also At the page edge: What happens at the page edge).
- **Header on following pages:** Whether it repeats and when it moves along with the first row is described under Header on following pages.
- **Objects below:** How objects below the table react when it grows is determined by their positioning behavior; with “Flowing” they move along (see Positioning behavior: Flowing).
- **Zebra and corners:** The row zebra continues across all pages. Rounded corners exist only if the whole table fits on one page (see Data tables: “General” tab: Border, corners, guides, visibility).
- **Table in a group or cell:** It has no page break of its own, see Tables in groups and cells.

#### Header on following pages

“Repeat header row on following pages” puts the header on every page that the table runs across; the default for all tables is in the template settings, “Page” tab, section “Tables”. Once you have clicked the checkbox on the table, it no longer follows this default (see Data tables: Section “Header row”). Where the header is when the first row no longer fits below it: It is not left alone at the end of the page, whether the checkbox is on or off. It moves to the next page together with the first row, and the table begins there:

- If the first row has to go entirely to the next page, it takes the header along.
- If the first row is taller than a page and less than 6 mm remain below the header, or not even its first piece fits in the rest, for example an image at the top of the cell, it begins on the next page, and the header moves along.
- If “Keep row together at page break” is off and not even the first line of text fits below the header, it moves along in the same way.
- Exception when “Repeat header row on following pages” is off: If the beginning of the first row has room over there only without a header, the header stays behind so that nothing is shortened. If nothing but the table is on the page, it then carries, apart from the header of the table, only the header and footer of the document.
- If the table is in a group or in a cell of another table, its header never repeats, however the checkbox is set. If its container has to be split at the page boundary, the header likewise moves along with the first row; it stays behind only if the beginning of the first row would have room over there only without a header (see Tables in groups and cells).

How the canvas shows the header of a free-form table on the following page is described under Free-form tables: Beyond the end of the page.

#### Keeping a row together or splitting it

What happens to a row that no longer fits entirely at the end of the page is decided by “Keep row together at page break” in the section “Style”. This checkbox belongs only to the table; texts and groups have one of their own (see The checkbox “Keep together at page break”); what happens at the page edge with which object is shown by What happens at the page edge.

| Setting | What happens in the PDF |
|---|---|
| On (default) | A data row is never split in the middle. If it no longer fits, it moves entirely to the next page; with extra rows, the whole record. Only a row that is taller than a whole page is split anyway: It begins in the rest of the page and continues on the next one. If not even its first piece fits in this rest, for example an image at the top of the cell, it begins on the next page. If that is the first row of the table, the header moves along. |
| Off | The row may break at the end of the page, likewise before an area that repeats on every page and sits in the middle of the page. It is distributed line of text by line of text across all columns; each piece has its own padding and is as tall as its tallest column. Every row is at least as tall as the minimum row height. Rounded corners do not apply (see Data tables: “General” tab: Border, corners, guides, visibility). |
| Off, with a fixed row height | Each column shows as many lines of text as fit into its cell; whatever would go beyond is dropped and reported. A split row can together become taller than the fixed height. |
| Free-form table (always on) | Every row stays whole in print and, if it no longer fits, moves to the next page. Only a row that is taller than a whole page is distributed across the pages. |

The checkbox works only for a data table directly in the document; for a free-form table it is always grayed out and checked. If print keeps every row together anyway, it is grayed out, shows “on”, and below it is the reason, for example “No effect: printing always keeps every row together here — a column is designed in the column designer.” This is the case if a column has a column designer (an image column too) or if the table has merged cells or extra rows or no data source. For a free-form table, the reason reads “… the table has no data source (fixed rows).”; further reasons are appended, for example “the table has merged cells”. If the table is in a group or cell, the checkbox is likewise grayed out, and the reason given there is “the table is inside a group or cell”. The page break is then decided by its container, however: The table has no page break of its own, it moves with it, and if it is split across pages, it is split along with it (see Tables in groups and cells). Its setting stays stored and applies again as soon as the reason no longer applies.

> **Caution:** If a single piece of a row, a line of text or an image, is taller than the space on the page, it is printed in one piece and sticks out at the bottom. If it covers a footer that repeats on every page, the document reports a warning. A rectangle, the background of a group or a line that are taller than the space, by contrast, are shortened to it; the document reports how many millimeters are missing.

- **Without columns:** A table without any column prints nothing; the document reports it.
- **Row source not found:** If print does not find the row source or it is not a list, only the header row appears, and the document reports it (see Problems and messages).

### The free-form table in the PDF: height, data and colors

This section applies to the free-form table. For the data table, row height, zebra and header background are with the properties of the table (see Data tables: “General” tab: Section “Cells” and Data tables: “General” tab: Section “Style”).

#### How tall a row becomes

Every row is at least as tall as its own dragged height or, if it has none, as the table’s “Minimum row height (mm)”. If the tallest content of one of its cells including padding at the top and bottom needs more, it becomes as tall as that. Hidden cells of a merge do not count here; a “Line spacing” of the table is included.

- If the row height is fixed, no row is taller. Whatever reaches beyond, the PDF cuts off at the bottom edge of the row minus the padding, and when the document is created, a message appears for each row and column (“… the row height is fixed, so … mm of the cell content was not printed …”, see Problems and messages: Tables). If a cell has a fixed height, PDF and canvas cut off its content at this height. All places where the PDF cuts off are listed under Where the PDF really cuts off.
- A text with a fixed height in a cell is cut off on the canvas. If cell and row grow along, the PDF prints it in full, and the row grows with it (see Texts: Width and height). If the row has a fixed row height or the cell a fixed height, the PDF cuts it off there.
- “Vertical alignment” distributes the free space of a tall row: With “Middle”, the content moves down by half, with “Bottom” completely.

#### Data, colors and lines

- **Fields** in the cells are filled with the record that the table is in: on the page with the main record, in the row of a data table with that row. Full preview and PDF show the values of the sample record or the real record (see Data sources and relationships: Sample record).
- **Order of the layers,** from bottom to top: zebra of the rows, zebra of the columns, background of the individual cell, border of the cell and gray line, finally the content. Semi-transparent colors blend.

### What changes in the document?

**On the canvas:** A data table shows the header row and a sample row; row zebra, page breaks and repeated headers are missing. A free-form table shows all rows, for a table directly on the page also the following pages with the repeated header. Fields appear as blue markers with their name. A merged cell shows its content across the whole width. If a cell has a fixed height, the canvas cuts off at the same edge as the PDF and draws a dashed orange line there; only in the cell designer does the content still appear in full. The windows for designing, the bars and the markings belong only to the designer. Visibility rules do not take effect here (see Visibility: What changes in the document?).

**In the PDF:** A table directly in the document runs across as many pages as its rows or lines need. The header appears on every following page if “Repeat header row on following pages” is on. If the first row already has to go to the next page, it takes the header along, whether the checkbox is on or off (the exception is described under Header on following pages). A row that is kept together stays whole and moves to the next page if it no longer fits; only a row that is taller than a whole page is split. A fixed row or cell height cuts off what does not fit, and the document reports it. A table in a group or cell has no page break of its own; if its container is split, its header is not left alone at the end of the page. How it really looks is shown beforehand by the full preview.

---

## The properties panel

*For users · Properties of all objects · Page en/eigenschaften.html*

> **In short:** To the right of the canvas, the panel “Properties” shows the settings of the selected object. This page explains how the panel is built: the header, the tabs and the ⓘ. The overview shows which type of object has which setting and leads to the page that explains it. What you do directly on the canvas with mouse and keyboard, that is, selecting, dragging, snapping, copying and deleting, is described on the page Working on the canvas.

What is shown on the right under “Properties” depends on two things: the type of object and where it is. This manual distinguishes two positions:

- **Directly in the document:** The object lies freely on a page.
- **In a group or table cell:** The object is inside a group or a table cell that you design in the column designer, header designer or cell designer.

### Which setting is described where

The overview shows which type of object has which setting. A dash means: it does not exist there. A click on a setting leads to its description. The settings are described on five pages:

- Position, size, rotation and arrangement: where an object is, how large and how rotated it is, and which object is in front.
- Positioning behavior: whether an object moves out of the way, moves along or stays put when something above it grows.
- At the page edge: keep together or split: what happens to an object that no longer fits on the page at the bottom.
- Border, background and colors: background, border, inner margins and the color fields.
- Visibility: print an object only under a condition.

The settings of a code itself, that is, content, type, plain text, white margin and the fields of the GiroCode, are described on the page Barcode, QR code and GiroCode.

How you work with mouse and keyboard on the canvas is described on the page Working on the canvas. The last three rows of the overview also lead there.

| Property | Text | Image | Code | Shape | Group | Data table | Free-form table |
|---|---|---|---|---|---|---|---|
| Position (X, Y) | yes | yes | yes | yes | yes | yes | yes |
| Width and height | yes | yes | yes | yes | yes | no fields, the columns determine the width | no fields, the columns determine the width |
| Automatic height | yes, default on | — | — | — | yes, default off | separate switches for header and row height | separate switches for header and row height |
| “Rotation (°)” | — | yes | yes, only 0°, 90°, 180° and 270° | yes | — | — | — |
| “Positioning behavior” | yes | yes | yes | yes | yes, except as a header or footer | yes, except if it repeats on every page | yes |
| “Move along” | only directly in the document | only directly in the document | only directly in the document | only directly in the document | only directly in the document, not as a header or footer | — | — |
| “Minimum gap above (mm)” | yes, except with “Fixed position” | yes, except with “Fixed position” | yes, except with “Fixed position” | yes, except with “Fixed position” | yes, except with “Fixed position” and as a header or footer | yes, except with “Fixed position” and if it repeats on every page | yes, except with “Fixed position” |
| “Keep together at page break” | only directly in the document | — (is never split) | — (is never split) | only unrotated rectangle directly in the document | only directly in the document | its own checkbox for the rows | rows stay whole unless they are taller than a page |
| “Layer order” | yes | yes | yes | yes | yes | yes | yes |
| “Order in the group” | in group or cell | in group or cell | in group or cell | in group or cell | in group or cell | in group or cell | in group or cell |
| Background and border | yes | — | — | yes; line and arrow only line color and thickness | yes | separate fields for each cell | separate fields for each cell |
| “Corner radius (mm)” | yes | — | — | rectangle only | yes | yes | yes |
| Inner margins | yes | — | — | — | — | Cell padding | Cell padding |
| “Visibility” | yes | yes | yes | yes | yes | yes | yes |
| Changing colors together | — | — | — | yes | yes | — | — |
| Resize handles | yes | yes | yes | yes | yes | own handles | own handles |
| Rotation handle | — | yes | — | yes | — | — | — |

### The properties panel

To the right of the canvas is the panel “Properties”. It shows the settings of the object you have just selected and is rebuilt with every new selection. In the group designer, the same panel is in its right-hand column.

What you change there takes effect immediately; there is no button to apply it. The change is stored in Dynamics only with “Save” in the template row. With Ctrl+Z you undo it.

For most number fields: The small arrows in the field change the value by 0.5, and the upper limit is 5000. Where a field differs, this is stated with the respective setting.

[Image: Detail of the “Properties” panel for a selected text, “Position & size” tab. At the top is the heading “Properties”, below it the blue marker “Text” and next to it the name “Rechnung Rechnungsnummer”. Below follow the two tabs “General” and “Position & size”; the second one is underlined in blue and is thus selected. The section “Positioning behavior” begins with the selection list “Behavior” (with ⓘ), which shows “Flowing on contact (default)”. Below it is “Move along” (with ⓘ) with the checked checkbox “Move along with the object below”, a gray sentence “Stays at its position and only moves down if another object would otherwise overlap it.” and the empty field “Minimum gap above (mm)” (with ⓘ). In the section “Arrangement” is the field “Layer order” (with ⓘ) with the value 0, below it a pale yellow note box that begins with a warning triangle (“This object moves out of the way of other flowing objects …”), and four buttons in two rows: “Bring to front”, “Send to back”, “Bring forward” and “Send backward”. At the very bottom is the checked checkbox “Keep together at page break” with ⓘ.]
Caption: The “Properties” panel of a selected text, “Position & size” tab (upper part; position and size follow below).
- Image marker 1: The blue marker names the type of object.
- Image marker 2: Next to it is the name. For a text it is its beginning; a field appears with its name, and long names end with “…”.
- Image marker 3: The two tabs. Here “Position & size” is selected; when first opened, it is “General”.
- Image marker 4: Headings divide the panel into sections.
- Image marker 5: The ⓘ shows the help text; a click opens it in a window of its own.
- Image marker 6: Checkboxes switch a setting on or off. What the fields of this tab do is described on pages of their own: Positioning behavior, Arrangement and Keep together at page break.

#### The header of the panel

At the very top is a blue marker with the type of object, shown in capital letters on the screen. Next to it is a name.

- **Markers:** “Text”, “Image”, “Line”, “Arrow”, “Rectangle”, “Circle/ellipse”, “Triangle”, “Star”, “Polygon”, “Group”, “Table” and “Page break”. For parts of a table, the marker is “Column” (next to it, for example, “1 of 3” and the header text), “Header cell” (in the header designer, next to it “Header designer”) or “Extra row 1”, “Extra row 2” … with the name of the column; for several selected objects it is “Multiple”. Older templates also have “Grid” and “Grid cell”.
- **Name of a text:** the beginning of the text; fields appear with their name. More than 40 characters are shortened and end with “…”. If the text has versions depending on a condition, the first one is shown here.
- **Name of a table directly in the document:** its data source or “no data source”. In a group, only the marker is shown.
- **Group:** no name. For a header or footer, “repeats on every page” is next to it; in the group designer, “zoomed in”.
- **Multiple selection:** the number and types of the objects, for example “3 objects (Text, Rectangle, Ellipse)”.

You see a shortened name in full if you point at it with the mouse.

#### The tabs

Most objects directly in the document distribute their settings across two tabs:

- “General”: content, style, border and background, visibility.
- “Position & size”: positioning behavior, arrangement, “Keep together at page break”, position and size.

Where the tabs exist:

- Text, image, line, arrow, rectangle and the other shapes have the tabs only directly in the document. In a group or table cell, all their settings are in one list, one below the other.
- Groups and tables have the tabs in every position.
- If you have clicked into a table, that is, selected a cell or column, the tabs are called “Column” and “Table properties” (see Data tables). You select the whole table with the handle “✥” on the table or via its row in the “Structure”; it then has the tabs “General” and “Position & size”.
- There are no tabs for a page break, for the selected cell of an extra row, for a grid from older templates, for a multiple selection and when nothing is selected.

When first opened, “General” is selected. After that, for each object the panel opens the tab that was last visible, until you close the designer. If an object does not have this tab, it shows its first one, and from then on that one applies.

#### Sections, collapsible areas and the ⓘ

Headings such as “Positioning behavior”, “Arrangement” or “Style” divide the panel; the screen sets them in small capital letters. Rarely used fields are in a collapsed area: “Advanced (limits)” for text, “Advanced” for tables. A click on the heading expands it.

Behind many labels is an ⓘ, an italic “i” in a gray circle:

- If you point at it with the mouse, the help text appears.
- A click on it opens the text in a window of its own, for some topics with small example images. With the keyboard, use Enter or the Space bar. The window closes with “✕ Close”, with a click next to it or with Esc.
- A click on the ⓘ in a row with a checkbox does not toggle the checkbox.

[Image: The help window “Border lines (sides)”, a wide white window with rounded corners on a darkened background. At the top left the bold heading “Border lines (sides)”, at the right a blue button “✕ Close”. Below it two paragraphs of text: the first explains which sides get a line (top, right, bottom, left), for example only fine separator lines below each row; the second describes how the lines run for a box distributed across several pages. Below the text are two cards side by side, each with a small diagram of a table with a blue header row: on the left “Bottom line only” (only horizontal dark lines below the rows), on the right “All sides” (rows and columns separated by dark lines).]
Caption: The help window that opens when you click an ⓘ, here for “Border lines (sides)”.
- Image marker 1: The help text.
- Image marker 2: For some topics, example images are included.
- Image marker 3: Closes the window; so do Esc or a click next to it.

Not every field has an ⓘ. Without an ⓘ are, among others, “X (mm)” and “Y (mm)”, “Width” and “Height” for image and shapes, for text “Automatic height (fit to content)”, “Min. height”, “Max. height” and “Border color”, the sections “Visibility” and “Order in the group” and all fields of the multiple selection. The four inner margins of a text are explained by the ⓘ in the sentence below them.

#### Which sections are where

| Object and position | “General” tab | “Position & size” tab |
|---|---|---|
| Text directly in the document | “Content”, “Text” (only a note: you set font, size and color in the window “Edit text”), “Line spacing”, “Inner margins (mm)”, “Border & background”, “Visibility” | “Positioning behavior” with “Arrangement”, “Keep together at page break” or a note about it, “Position & size” with X and Y, “Size” with width, height and, with “Automatic height”, “Advanced (limits)” |
| Image directly in the document | “Content” with image source and image settings, “Visibility” | “Positioning behavior” with “Arrangement”, a note about the page break, “Position & size” with X, Y, width, height and “Rotation (°)” |
| Code (barcode, QR code, GiroCode) directly in the document | “Visibility” (at the top for codes), “Content” with the settings of the code (for the barcode “Type” and “Content”, for the QR code “Content”, for the GiroCode the fields of the transfer) and below it “Appearance” | “Positioning behavior” with “Arrangement”, a note about the page break, “Position & size” with X, Y, width, height and “Rotation” |
| Line, arrow, rectangle and shapes directly in the document | “Style” with “Rotation (°)”, for the polygon “Corners”, “Visibility” | “Positioning behavior” with “Arrangement”, “Keep together at page break” (unrotated rectangle only) or a note about it, “Position & size” with X, Y, width and height |
| Group, in every position | “↳ Zoom in (edit content)”, “Background & border”, “Corner radius (mm)”, “Visibility” | “Positioning behavior” with “Arrangement” (for a header or footer only “Arrangement”), in a group “Order in the group”, “Position”, “Size & spacing”, “Behavior” |
| Data table and free-form table, in every position | “Data”, “Style”, “Header row”, “Cells”, “Border”, “Corners”, “Guides”, “Visibility” | “Positioning behavior” with “Arrangement”, “Position”, “Advanced” |
| Text in a group or cell | No tabs. From top to bottom: “⬆ Take out of group” (only in a group), “Content”, “Position”, “Size”, “Text”, “Line spacing”, “Inner margins (mm)”, “Border & background”, “Positioning behavior”, “Arrangement”, “Order in the group”, the visibility without a heading of its own, “Actions” |   |
| Code in a group or cell | No tabs. From top to bottom: “⬆ Take out of group” (only in a group), “Content” with “Appearance”, “Position & size” including “Rotation”, “Positioning behavior”, “Arrangement”, “Order in the group”, the visibility without a heading of its own, “Actions” |   |
| Image, line, arrow, rectangle and shapes in a group or cell | No tabs. From top to bottom: “⬆ Take out of group” (only in a group), for the image “Content”, for all “Position & size” including “Rotation (°)”, for line, arrow, rectangle and shapes then “Style”, for the polygon “Corners”, “Positioning behavior”, “Arrangement”, “Order in the group”, the visibility without a heading of its own, “Actions” |   |

At the very bottom of every object is the section “Actions” with the delete button: “🗑 Delete block” directly in the document, “🗑 Delete element” in a group or cell (see Working on the canvas: Copying, pasting and deleting). If an object is inside a group, “⬆ Take out of group” is at the very top (see Working on the canvas: Into a group and out). Both are outside the tabs and are visible on every tab.

For a table in a group, “Arrangement”, “Order in the group” and “🗑 Delete element” are also below the tabs. The section “Arrangement” therefore exists twice there; both fields set the same layer order.

[Image: Detail of the right-hand column of the group designer, panel “Properties” for a text in a group. At the top the heading “Properties”, below it the blue marker “Text” and the name “Contoso Handels GmbH”. Unlike a text directly in the document, no tabs follow, but immediately a wide white button “⬆ Take out of group”. Below it, one below the other, are the sections “Content” (text field with “Contoso Handels GmbH”, blue button “Edit text”, button “Conditional content …”), “Position” with “X (mm)” 3 and “Y (mm)” 10, “Size” with “Width (mm)” 60 (with ⓘ), a checked checkbox “Automatic height (fit to content)” and a gray field “Height (mm)” 4,1 (with ⓘ), as well as the collapsed area “Advanced (limits)”.]
Caption: A text in a group: no tabs, all settings one below the other (here the upper part).
- Image marker 1: If the object is inside a group, this button is at the very top.
- Image marker 2: No tabs: The sections are in one list, one below the other.

### When nothing is selected

If nothing is selected, the panel “Properties” shows the settings for the whole document:

- the note “Nothing selected. Click an object to edit it — or open the template settings (page size & margins).”;
- the button “⚙ Template settings”. It opens the window “Template settings” (see Template settings);
- the section “Page border” for a border around every page (see Page border).

If no template from the list is open, for example after “Import”, the button and the reference to the template settings in the note are missing. Then it says only “Nothing selected. Click an object to edit it.”, and the section “Page border” remains.

How to deselect and how a selection rectangle is created is described under Working on the canvas: Selecting.

> **Good to know:** In the group designer, the panel without a selection shows the settings of the opened group, with the addition “zoomed in” and without “↳ Zoom in (edit content)”. Below it says “Click on an empty area to show the settings of this group.” In the column designer it shows the column, with the sentence “… of this column.”, in the header designer the header cell. A group that is itself inside a group has no positioning behavior, no layer order and no “Order in the group” there on the “Position & size” tab. The sections “Position”, “Size & spacing” and “Behavior” with the note sentence about the page break are there as usual. You reach these settings if you open the outer group and select the inner one there.

### What changes in the document?

**On the canvas:** The panel itself changes nothing in the document as long as you do not enter anything. What you set there takes effect immediately and can be seen on the canvas; it is stored in Dynamics only with “Save”. Which signs the canvas additionally shows is described under Working on the canvas: Markers and warning symbols on the canvas.

**In the PDF:** The panel and all signs of the canvas never appear in the PDF. What a setting does in the PDF and how PDF and canvas differ is described on the page of the setting under “What changes in the document?”: Position, size, rotation and arrangement, Positioning behavior, At the page edge, Border, background and colors and Visibility. Where the PDF cuts off is collected under Where the PDF really cuts off.

---

## Position, size, rotation and arrangement

*For users · Properties of all objects · Page en/lage-groesse.html*

> **In short:** X and Y determine where an object begins; width and height determine how much space it takes up. With the checkbox “Automatic height”, the height grows with the content. A fixed height of a group or table row, by contrast, is a wall: whatever lies below it, the PDF does not print. The places where the PDF cuts off are collected in a list (see Where the PDF really cuts off). Image and shapes can be rotated and then occupy the space from the highest to the lowest corner. The layer order decides which of two overlapping objects is on top.

Almost all objects have these settings. Which type of object has which is shown by the overview under The properties panel. What differs for a type of object is described on the page of that type of object.

### Position and size

Position and size are directly in the document on the “Position & size” tab. In a group or cell they are at the top of the list: for text under “Position” and “Size”, for image and shapes under “Position & size”. For groups and tables, the section is called “Position”; the size of a group is under “Size & spacing”. All numbers are millimeters.

It is often quicker with the mouse: dragging moves an object (see Moving), the handles change its size. Both write the same numbers.

#### Position directly in the document

Counting starts at the printable area of the page, that is, inside the page margins. If “Ignore page margins” is set in the template settings, the page edge counts.

| Setting | What it does | Default |
|---|---|---|
| “X (mm)” | Distance of the left edge from the left margin of the printable area. Negative numbers become 0, an empty field counts as 0. The field shows at most two decimal places. | the position when created |
| “Y (mm)” | Distance of the upper edge from the top margin of the printable area on the page where the object is. A header docked at the top has already been subtracted. Negative numbers become 0. Which page the object is on, you determine by dragging, not in this field. Exception: If the object is on the next page only because a page break above it pushes it there, the number continues to count from the page on which the break is (see Page break: What it does). | the position when created |

- **Header or footer in the way:** If you type a height under “Y (mm)” at which a header or footer lies, the designer places the object at the next free edge and reports: “There is a header or footer there. The object was set to … mm — just like when dragging. If it really should lie over it, set the positioning behavior to »Fixed position«.” With “Fixed position” it does not check this.
- **Only one field:** Usually “X (mm)” and “Y (mm)” are next to each other. As long as no object directly in the document is lower than the very top (Y 0), however, only “X (mm)” is shown, with the note “You set the space above under »Positioning behavior« at the top, as »Minimum gap above (mm)«.” Headers and footers and page breaks do not count here. This is how it is in old templates, in a brand-new template as long as only the heading is at the top of the page, and when you insert the first object with a click in the ribbon into a template that contains nothing but headers and footers. As soon as an object is lower, “Y (mm)” appears too.
- **Note at the end:** For text, image and shapes, the tab ends with “Placed freely on the page. X = horizontal position. Can be dragged on the canvas.” This is a general note; it applies with every positioning behavior.
- **In the PDF,** the object begins at this position. If something above it grows, “Flowing” and “Flowing on contact” can push it further down (see Positioning behavior).

A group without a width of its own is as wide as the printable area. At full width, it cannot be moved sideways, and an X value would push it past the right margin; therefore enter a width first. More under Groups: Width and position.

For a header or footer, that is, a group with “🔁 Repeat on every page”, “X (mm)” and “Y (mm)” are simple fields. They also accept negative numbers. They count from the top left corner of the printable area and apply identically on every page. There is no check against other headers or footers there. More in Header and footer.

#### Position in a group or cell

“X (mm)” and “Y (mm)” count here from the top left corner of the group. In a table cell they count from the content area of the cell, that is, after the cell padding. This applies to text, image and shapes as well as to groups and tables that are inside a group.

- An empty field counts as 0. The field also accepts negative numbers; dragging and arrow keys, by contrast, never go below 0.
- There is no check against headers and footers here.
- Whether an object in the group moves lower when something above it grows is governed by its positioning behavior.
- If the group or the table row has a fixed height, its bottom edge is a wall: whatever begins below it, the PDF does not print. What the wall does to the individual objects is described under The fixed bottom edge and where the PDF cuts off.

#### Width and height for each type of object

| Type of object | Fields | What they mean |
|---|---|---|
| Text | “Width (mm)”, “Automatic height (fit to content)” and “Height (mm)” under “Size” | The text wraps within the width, minus the inner margins on the left and right. Narrower means: wrap earlier, more lines. A new text is 50 mm wide. For the height, see Automatic height and limits. |
| Image | “Width” and “Height” | The size of the box into which the image is fitted. The image itself keeps its aspect ratio (see The properties of an image). |
| Code (barcode, QR code, GiroCode) | “Width” and “Height” | The size of the box into which the code is fitted print-sharp. The code is often somewhat smaller than the box (see Barcode, QR code and GiroCode: Fitted print-sharp). |
| Rectangle, circle and ellipse, triangle, star, polygon | “Width” and “Height” | The size of the box in which the shape is drawn. |
| Line and arrow | directly in the document “Width” and “Height”, in a group or cell “Length” and “Height” | Width or length is the length of the segment. It runs horizontally through the middle of the box. The height determines only the box, that is, where the line lies and how much space it takes up, not the line thickness. |
| Group | “Width (mm) — empty = full width”, “Automatic height (fit to content)” and “Height (mm)” under “Size & spacing” | Without a width, the group is as wide as the printable area or as the outer group. Details under Settings of the group; for the height, see Automatic height and limits. |
| Data table and free-form table | none | The width results from the columns, the height from the rows. Under “Advanced”, “Min. width (mm)” and “Max. width (mm)” limit only the dragging of the table width; they have no effect in the PDF (see The properties of the whole table). |

The fields “Width” and “Height” for image, code and shapes do not name a unit; millimeters are meant. An emptied field counts as 0 mm in print; therefore always enter a number. With numbers entered, the object has the same size in the PDF as on the canvas. How much space a rotated object occupies is described under Rotation.

### Automatic height and limits

Texts and groups can determine their height themselves. With the checkbox “Automatic height (fit to content)”, the height follows the content; without the checkbox, the number under “Height (mm)” applies, the fixed height. Images and shapes always have a fixed height. Tables have their own switches for the height of the header row and rows (see The properties of the whole table).

[Image: Detail of the “Position & size” tab in the “Properties” panel of a text. At the top the heading “Position & size” with two number fields side by side: “X (mm)” with 0 and “Y (mm)” with 49. Below it the heading “Size”. The field “Width (mm)” (with ⓘ) shows 175. Below it is the checked checkbox “Automatic height (fit to content)”. The field “Height (mm)” (also with ⓘ) has a light gray background and shows the value 8,1 in pale type. At the end is an expanded area, set off by a dashed line: “Advanced (limits)” with two empty fields side by side, “Min. height” and “Max. height”.]
Caption: Position and size of a text with automatic height; the area “Advanced (limits)” is expanded.
- Image marker 1: Position: distance from the left and from the top, in millimeters.
- Image marker 2: Width of the text; it wraps within this width.
- Image marker 3: With the checkbox, the height follows the content.
- Image marker 4: With the checkbox checked, the field is locked and shows the measured height.
- Image marker 5: Min. height and Max. height are only here and only with the checkbox checked.

|   | Text | Group |
|---|---|---|
| Default of the checkbox | on | off |
| Checkbox on | The text box is as tall as the text needs, within “Min. height” and “Max. height”. | The group grows with its content. An entered height remains the minimum height; the group does not get smaller than that. |
| Checkbox off | On the canvas, the text box is as tall as the entered number and cuts off what does not fit. The PDF prints the whole text; border and background there are as tall as the text (see Texts: Width and height). | The entered height applies as fixed. Whatever begins below it, the PDF does not print (see The fixed bottom edge and where the PDF cuts off). |
| When unchecking the checkbox | the designer enters the height that the text currently needs, at least 1 mm. | the designer enters the height that the content currently needs, at least 4 mm. It replaces a previously entered minimum height. |
| Field “Height (mm)” with checkbox on | locked; shows the measured height | locked; shows the entered minimum height, otherwise the measured height |
| Smallest height in the field | 1 mm; smaller numbers and an empty field count as 1 mm | 4 mm; smaller numbers and an empty field count as 4 mm |
| Limits | “Min. height” and “Max. height” under “Advanced (limits)”, only with the checkbox switched on (see Texts: Min. height and max. height) | none |
| Dragging the lower handle | possible only with a fixed height; the checkbox stays off | switches the checkbox off as soon as you drag vertically, and enters the dragged height (see Size handles) |

When you uncheck the checkbox, the designer reports the number entered, for example “Height set to the measured … mm (it was … mm before).” If the object had not been drawn yet in this session, it says “Height set to … mm. The object had not been drawn yet in this session — please check the number briefly.” The locked state is explained by the mouse pointer over the field: for text “Editable only when »Automatic height« is off — it shows the measured height of the text.”, for the group “Only editable when automatic height is off”.

**Minimum height of the group:** Without the checkbox, the bottom edge of a group is a wall (see The fixed bottom edge and where the PDF cuts off). With the checkbox, an entered height remains as the minimum height, even if you check the checkbox again. This is how you get rid of it: uncheck the checkbox, delete the number (4 mm remain), check the checkbox again. The ⓘ at the checkbox says the same: The group never shrinks below an entered height, on the canvas as in the PDF; the group of a new template brings 20 mm with it. When you uncheck the checkbox, the measured height of the content replaces this minimum height, and the group then becomes correspondingly lower. More on the group under Settings of the group.

**Limits for text:** “Min. height” and “Max. height” exist only for text; how they work is described under Texts: Min. height and max. height. What looks different on the canvas and in the PDF for a text with a fixed height is described under Texts: Width and height. A list of all the places where the PDF cuts off is under Where the PDF really cuts off.

### The fixed bottom edge and where the PDF cuts off

A group has a fixed height when “Automatic height (fit to content)” is off, a table row when the row height of the table is not automatic, and the cell of a free-form table when “Automatic height (fit to content)” is off for it. Its bottom edge is then a wall: The PDF prints only what fits into this height.

> **Caution:** If an object begins below the wall, it is not printed in the PDF, and the document reports it; on the canvas it is then hidden. If an object only reaches over the wall, the PDF cuts it off there. For text, shapes, lines and images, the document reports how many millimeters are missing. Whatever sticks out sideways beyond the group stays. If the content is to be allowed to grow, switch on “Automatic height (fit to content)”, or move the object up.

#### What the wall does to an object

If an object in a group or cell with a fixed height reaches over the wall, the following happens, depending on the object:

| Object | What the PDF does | More on this |
|---|---|---|
| Text | Cuts the text off at the wall, even through the middle of a line of text. This also applies to a text with a fixed height that the PDF would otherwise print in full. If the text fits in its box or has “Automatic height”, the document reports how many millimeters of the text are missing and names the group and the first cut-off line (“group '…' has a fixed height of … mm, so … mm of the text in it was not printed - the text is cut off at that edge, starting with ‹…› …”); under half a millimeter there is no message. The same applies to a group in a table or grid cell and to a header or footer with a fixed height. If the fixed bottom edges of an inner and an outer group coincide, the message comes once: If the outer group itself cuts something off, it names the outer one, otherwise the inner one. If a “Max. height” additionally limits the text, the message counts only what the wall takes away above it. If the text has a fixed height and its content is taller than that, the message says that it needs more space than its box; it then names the bottom edge of the group and says that the rest was not printed (“text ‹…› needs … mm but its box is only … mm high - … the part of the text below that edge was NOT printed …”). In a cell, a table row or the header row of a data table with a fixed height, the message of the cell or row says instead how much of the cell content is missing (see the rows on the cell and on the table row under Where the PDF really cuts off); the message about the box ends there with “… the row height decides what happens to the part that does not fit”. | Texts: Width and height |
| Unrotated rectangle | Shortens it: The box ends at the wall, border included. The document reports how many millimeters are missing (“group '…' has a fixed height of … mm, so a rectangle in it is cut off at that edge, up to … mm were not printed …”), in a cell with a fixed height with the message of the cell; under half a millimeter there is no message. | Shapes: Fixed height of the group |
| Other unrotated shapes: circle and ellipse, triangle, star, polygon, line, arrow | Cuts them off at the wall, and the document reports how many millimeters are missing; if the group is a cell with a fixed height, the message of the cell says it. If the stroke of a line lies below the wall although its box begins above it, the line is missing entirely; this is reported too (“… a line in it lies below that edge and was not printed …”). | Shapes: Fixed height of the group |
| Unrotated image | Shortens the box to the wall and fits the image anew into the shorter box; the aspect ratio stays. With “fit”, the image becomes smaller if the shorter box limits it in height; otherwise it keeps its size and moves up at most, for example a wide logo. With “fill” it is cropped differently, with “Original size” whatever does not fit into the shorter box is lost at the top and bottom. At the wall itself it is not cut off. The document reports it (“… the box of a picture in it is cut off at that edge by up to … mm, so the picture is fitted into the shorter box …”), in a cell with a fixed height with the message of the cell. | Images: Space and cropping at the wall |
| Rotated image or rotated shape | Cuts it off at the wall, and the document reports how many millimeters are missing (in a cell with a fixed height, the message of the cell). The box of a shape stays whole. If the rotated object lies entirely below the wall, it is not printed, and the document reports it. | Rotation |
| Code | Never shortens it, not even unrotated: Half a QR code is unreadable, and a shortened barcode can be read wrongly. If the code reaches over the wall, it is not printed, and the document reports it; for a GiroCode the document is not created. The canvas shows the place up to the wall with the reason; if less than 3 mm of the code lie above the wall, it shows the whole code in red dashes (see Barcode, QR code and GiroCode: What the canvas shows). If a visible GiroCode begins only at or below the wall, the document is likewise not created; the canvas then does not show it at all. Only the gray placeholder of an empty code is shortened by the wall like an image; the document reports that. | Barcode, QR code and GiroCode: Page edge and fixed bottom edge |
| Group in the group | Shortens its border: It ends at the wall with its bottom edge. The document reports it (“… the background or border of group '…' … cut off at that edge …”), in a cell with a fixed height with the message of the cell. | – |
| Data table or free-form table in the group | Leaves out rows that no longer fit entirely, together with all following ones. If not even the header row fits, the whole table is missing. The document reports the number of missing rows, once per table and in English; the PDF itself says nothing about it. | Table in a group, Cells, header row and page break: Across several pages |

In a table row or the header row of a data table with a fixed height, a sentence of the row says how much of the cell content is missing. Text, shapes, lines, images, rotated objects and the border of an inner group count. If a group in the cell has a fixed height and ends above the edge at which the row cuts off (bottom edge of the row minus the padding), or exactly on it, the group itself reports. If it reaches below it, only the row reports; what the group itself cuts off does not count in the row’s number (see Where the PDF really cuts off).

The wall does not have to be that of the group itself. If the group is inside a group or cell with a fixed height, its bottom edge cuts, and the message names this surrounding edge (see Text or table is cut off). The canvas cuts off at the same edge; a data table in the group shows only its sample row there. An object that crosses the wall can look different on the canvas than in the PDF. How much is really missing is shown only by the “Full preview” (see What the canvas shows differently from the PDF).

#### Where the PDF really cuts off

The fixed height of a text itself cuts nothing off in the PDF: The PDF prints the text in full. Only the fixed bottom edge of the group, cell or table row it is in, and the paper edge can cut it off (see Texts: Width and height). In the PDF, things are cut off only at these places:

| Place | What is missing in the PDF | More on this |
|---|---|---|
| the “Max. height” of a text with “Automatic height (fit to content)” | The text that reaches beyond the “Max. height”. Border and background end there with it. The document reports how much space was missing. | Texts: Min. height and max. height |
| the fixed bottom edge of a group | Everything that begins below the wall, and the part that reaches over the wall. What this looks like for each object is in the table above. Exception GiroCode: If a visible GiroCode begins at or below the wall, the document is not created, as with a GiroCode that reaches over the wall. Cut-off text is reported by the document with the missing millimeters; shortened or cut shapes, lines and images in a message of their own. | What the wall does to an object |
| the fixed row height or the fixed header row height of a data table | What no longer fits into a cell, in every column, also in designed cells and extra rows: text, shapes, lines, images, rotated objects and the border of an inner group. An unrotated rectangle ends at the bottom edge, an unrotated image is fitted. The document reports it. For the row, the sentence names the missing millimeters (“table '…', column '…': the row height is fixed, so … mm of the cell content was not printed …”), for the header row the height that the cell needs (“table '…', header cell '…': the header height is limited to … mm, but the cell content needs … mm - the rest was not printed …”). Both come from 0.05 mm on, not only from half a millimeter, and appear once per column; the number for the row applies to the first data row in which something is missing, an extra row reports for itself (“extra row 1”). Only the first line of a simple cell value is printed in full, even if it is taller than the row, for example because of a large font; it then sticks out at the bottom, and the document reports it (“table '…': a line needs … mm, but the row leaves only … mm … - it is printed but reaches beyond the row …”). For a simple header text, the same applies to its first line; if it reaches beyond the header row, the message names the header cell (“table '…', header cell '…': a line needs … mm, but the header row leaves only … mm … - it is printed but reaches beyond the header row …”). | The properties of the whole table |
| the fixed row height of a free-form table | What reaches beyond the bottom edge of the row, minus the padding: text, shapes, lines, images, rotated objects and the border of an inner group. The document reports it for each row and column, from 0.05 mm on (“table '…', row 2, column '…': the row height is fixed, so … mm of the cell content was not printed …”). | Cells, header row and page break: How tall a row becomes |
| a cell with a fixed height: in a free-form table, in the cell designer or in the header designer of a data table | Everything that does not fit into this height, even if the row is taller. If content is cut off or shortened in the process (text, a shape, a line, an image or a rotated object) and more than half a millimeter is missing, the document reports how many millimeters of the cell content are missing (“… the cell has a fixed height of … mm, so … mm of the cell content was not printed …”). An unrotated rectangle ends at the bottom edge, an unrotated image is fitted; the message counts both. A line whose stroke lies below the edge or exactly on it is missing entirely; the document always reports this, even under half a millimeter (“… so a line in it lies below that edge and was not printed …”). The canvas cuts off at the same edge and draws a dashed orange line there; only in the cell designer does the content still appear in full. A taller row does not help; the remedy is “Automatic height (fit to content)” on the cell or a greater height of the cell. If a fixed row height is narrower than the cell, the row cuts, and its message comes (“… the row height is fixed …”). If an object begins only below the fixed height of the cell, it is missing, and the document reports it with a sentence of its own. | Cells, header row and page break: Background, border and size of a cell |
| the paper edge at the bottom | What sticks out beyond the paper at the bottom. This affects an object with “Fixed position”, the first object on a page if it no longer fits at the bottom, an image or shape that is taller than a whole page, and a header or footer. The document reports it. What reaches only into the page margin is printed. | At the page edge, The first object on a page |
| the paper edge on the right, left or top | What reaches beyond the paper there, usually the part of a table that is wider than the page. The document warns. The PDF never squeezes a table that is too wide by itself. If the table reaches only into the right page margin, a note appears; nothing is lost then. | Data tables: Dragging width and height |

### Rotation

Image, code, line, arrow, rectangle, circle and ellipse, triangle, star and polygon can be rotated; text, group and table cannot. The field is called “Rotation (°)” and has an ⓘ. It is:

- for the image directly in the document on the “Position & size” tab;
- for line, arrow, rectangle and shapes directly in the document on the “General” tab under “Style”;
- for all of them in a group or cell under “Position & size”.

A code can be rotated only by right angles. Its field is called “Rotation” and is a selection: “0° (horizontal)”, “90°”, “180°” or “270°”, clockwise; it is directly in the document on the “Position & size” tab in the section “Position & size”, in a group or cell likewise under “Position & size”; like the field “Rotation (°)”, it has an ⓘ. There are no oblique angles for codes, and a code has no rotation handle. The whole box is rotated about its center, plain text included (see Barcode, QR code and GiroCode: The settings of a code).

| Setting | What it does | Default |
|---|---|---|
| “Rotation (°)” | Rotates the object clockwise about its center point: 0 is horizontal, 90 vertical, 45 oblique. Negative numbers and decimal numbers are allowed. A vertical line is a line with 90°. | empty (0) |

On the selected object, except a code, there is a round rotation handle above the upper edge (see Handles). If you drag it, the object rotates; with the Shift key held down, in steps of 15°. A label shows the angle in the process. The handle enters whole degrees from 0 to 359 in the field.

[Image: On the left a small white page. On it lies a narrow light blue rectangle with a blue border, rotated 30 degrees clockwise so that it runs from top left to bottom right. Around the rotated rectangle is an upright, thin blue selection frame, against which each corner of the rectangle touches one side. White squares sit on it at the middle left and right, at the bottom middle and at the bottom right, above the upper edge a round rotation handle on a stem and at the top left corner a yellow diamond. Below the page is the button “Add page”. On the right the “Properties” panel with the blue marker “Rectangle”, the tabs “General” (selected) and “Position & size” and the section “Style”: “Background” #E7ECFA, “Border” #2B4CC4, “Border (pt)” 1,25, an empty field “Corner radius (mm)” and “Rotation (°)” with the value 30.]
Caption: A rectangle rotated by 30°. The selection frame stays upright.
- Image marker 1: The rectangle is rotated 30° clockwise.
- Image marker 2: The selection frame with the handles stays upright and encloses the space that the rotated rectangle occupies.
- Image marker 3: The field “Rotation (°)”; the rotation handle writes the same number.

**Space:** When rotated, an object occupies as much height as it measures from the highest to the lowest corner; depending on shape and angle, that is more or less than unrotated. A rectangle of 100 × 20 mm occupies 100 mm when rotated by 90°, about 85 mm at 45°. The width continues to count unrotated.

- With “Flowing” and “Flowing on contact”, the object keeps this space free. The space begins at the top where the unrotated object began; the rotated object sits centered in it. Flowing objects below it move along accordingly.
- With “Fixed position” directly in the document, it keeps no space free and may cover other objects.
- If you have explicitly chosen “Fixed position”, the rotated object does not move into a space: It rotates about the center of its unrotated box, on the canvas as in the PDF. A wide object sticks out above the entered position, a tall, narrow object rotated by 90° sticks out at the bottom beyond the space it occupies. It is also explicitly chosen if you have dragged the object into a group. If “Fixed position” applies in a group or cell only as a default, by contrast, the object sits centered in its space as with “Flowing”. In the list, both cases look the same (“Fixed position (default)”). If an object that has only the default is to rotate about the center of its box, briefly choose a different behavior and then “Fixed position” again.
- In a group with automatic height and in a table cell, the rotated height always counts, also with “Fixed position”: The group or row extends to the entered position plus this height. A wide object makes it taller; a tall, narrow object, for example an image of 20 × 100 mm rotated by 90°, occupies only 20 mm. With an explicitly chosen “Fixed position”, however, the rotated object does not lie exactly in this space (see above); check it in the “Full preview”.

**In the PDF,** the object is rotated in exactly the same way. A rotated object is never split at a page break; a rotated rectangle therefore has no checkbox “Keep together at page break” (see The note instead of the checkbox). How a rotated object ends at the fixed bottom edge of a group is described under What the wall does to an object.

> **Good to know:** The corner points of a polygon can be dragged only as long as it is not rotated (see Polygon). When dragging the size of a rotated object, the handles rotate along in a group or cell. Directly in the document, they sit at the unrotated place of the object, and the mouse acts horizontally and vertically, not along the rotated edges. There, it is better to enter exact dimensions in the fields.

### Arrangement: layer order and sequence

If two objects lie on top of each other, the section “Arrangement” determines which one is on top. It is directly below the positioning behavior. Headers and footers have it too, although they have no positioning behavior: A header is often above content.

#### The layer order

| Setting | What it does | Default |
|---|---|---|
| “Layer order” (with ⓘ) | The higher the number, the further forward the object lies, on the canvas and in the PDF. Negative numbers put it at the back, for example a colored box under a table. Whole numbers from −50 to 50 are allowed; the designer sets larger numbers to 50 or −50. 0 means: nothing set. | empty (0) |

- **Same order:** What is drawn later is in front. On every page, drawing goes from top to bottom: What begins further down is in front, at the same height what was created later. In a group, the order in the group decides. An object that moves along (sign ⇕, see Move along) always lies above its carrier.
- **Across the whole page:** An object in a group without a rank of its own has the rank of the group, an object in a table cell that of the table. If it gets a rank of its own, that applies against all objects of the page. Background and border of a group have the rank of the group.
- **Headers and footers** are drawn after the rest of the content in print and therefore lie above it without a rank of their own if something overlaps; with the rank, you change that.
- **On the canvas,** the rank also decides which of two overlapping objects gets your mouse click.

[Image: Two pairs of overlapping rectangles side by side on a white background. Left: A light blue rectangle with a blue border is at the top left; a light yellow rectangle with a golden border is offset to the bottom right and lies in front, covering the lower right corner of the blue one. Right: the same arrangement, but here the blue rectangle lies in front and covers the upper left corner of the yellow one.]
Caption: Left without a rank: The yellow rectangle, which begins further down, lies in front. Right with rank −1 on the yellow rectangle: It lies at the back. All four rectangles are set to “Fixed position”.
- Image marker 1: Without a rank, what begins further down lies in front.
- Image marker 2: With rank −1, the yellow rectangle moves to the back.

Below the field are four buttons. They work with the objects of the same level: in a group with its objects, otherwise with the objects directly in the document.

| Button | What it does |
|---|---|
| “⤒ Bring to front” | Sets the rank one higher than the highest of the level. Tooltip: “Place above all other objects of this level”. |
| “⤓ Send to back” | Sets the rank one lower than the lowest of the level. Tooltip: “Place below all other objects of this level”. |
| “↑ Bring forward” | One rank higher. |
| “↓ Send backward” | One rank lower. |

In a group with a background, or below such a group, the buttons never put an object behind the group itself; it would be hidden there. If it is already at the very back, “⤓ Send to back” and “↓ Send backward” report: “It cannot go further back in this group: below that, the object would lie behind the group itself and be hidden. With the same layer order, the »Order in the group« decides what is in front.”

Two yellow note boxes can appear:

- Above the buttons, if the object flows: “⚠ This object moves out of the way of other flowing objects …”. It is a reminder that flowing objects move out of each other’s way and therefore mostly do not overlap at all. The rank takes effect only where objects really overlap in print, for example with an object set to “Fixed position”. If it is to work against flowing objects too, set the positioning behavior to “Fixed position”.
- Below the buttons, if an object in a filled group has a lower rank than the group: “⚠ This layer order is below that of its own group. If the group has a background or border, it hides the object — on the canvas as in the document. »↑ Bring forward« brings it back.”

#### Order in the group

If an object is inside a group or cell with at least two objects, the section “Order in the group” is below the arrangement; it is called that in a table cell too. For flowing, the drawn height counts first; the order decides only between objects that begin at the same height. It also determines which object is on top when two have the same layer order: The last one is in front.

| Button | What it does |
|---|---|
| “⇤ To the start” | Puts the object in first place. With the same layer order, it then lies at the very back. |
| “⇥ To the end” | Puts it in last place. With the same layer order, it then lies at the very front. |
| “← One step earlier” | One place earlier. With the same layer order, the object then lies further back. |
| “→ One step later” | One place later. With the same layer order, it then lies further forward. |

Below it, for example: “Place 2 of 4 in this group. This determines the order when flowing — and which one is on top when two objects have the same layer order.” If the object is already in first place, “⇤ To the start” and “← One step earlier” are locked, in last place “⇥ To the end” and “→ One step later”. For a group in a group, the section is on the “Position & size” tab. For the group that you have just opened in the group designer, it does not exist.

### What changes in the document?

**On the canvas:** Every object is at the position you enter or drag, and has the entered size. A rotated object is rotated; its selection frame stays upright. A text with a fixed height is cut off, and an orange hatched strip shows the overhang. A group with a fixed height cuts off at its bottom edge; an object that begins entirely below it is hidden. The layer order also decides which of two overlapping objects gets your mouse click.

**In the PDF:** The object begins at the entered position; where it moves when something above it grows is determined by the positioning behavior. A text with a fixed height is printed in full; things are cut off only at the places under Where the PDF really cuts off. A rotated object occupies, in height, the space from the highest to the lowest corner. The layer order applies on every page; headers and footers lie on top without a rank of their own.

---

## Positioning behavior

*For users · Properties of all objects · Page en/positionsverhalten.html*

> **In short:** The positioning behavior determines how an object reacts when something above it grows in the document. “Flowing on contact” moves down only if it would otherwise be overlapped, “Flowing” keeps the gap you drew to the object above it, “Fixed position” stays exactly where it is. Which behavior an object has at the start depends on its type, its position and the way it was created; the tables for this are on this page. In addition there are two further settings: “Move along” for a label on a larger object and the “Minimum gap above (mm)”. The pages on texts, images, shapes, groups and tables give only their initial value and what is different for them.

### The three options

On the canvas, every object stands where you dragged it. In the document, texts become longer and tables get more rows. How an object reacts to this is determined by the list “Behavior” in the section “Positioning behavior”. It has an ⓘ.

- Directly in the document, the section is on the “Position & size” tab.
- For text, image, codes and shapes in a group or cell, it is further down in the list.
- Groups and tables have it in every position on the “Position & size” tab.
- Headers and footers and a table that repeats on every page have no positioning behavior, because they are fixed on every page; they have only the arrangement. It is also missing for the page break and for a group in a group as long as you have it open in the group designer.

| Behavior | What happens | Good for |
|---|---|---|
| “Flowing on contact” | The object stays in its place and moves down only if another one would otherwise overlap it. | most objects; default directly in the document |
| “Flowing” | The object keeps the gap you drew to the object above it. If the object above it grows by 10 mm, it moves down by exactly 10 mm, even across a page change. It never moves up. | everything below a line-item table, such as the totals |
| “Fixed position” | The object stays exactly in its place, even where a header or footer is. Other objects may overlap it; what is on top is determined by the arrangement. | backgrounds, stamps, fold marks; the position in a group |

Below the list, a sentence explains the chosen option, for “Flowing” for example: “Always flows along: if an object above it becomes taller, this one moves down with it so that the spaces stay the same. Repeating areas (header/footer) push it below them.”

[Image: Three cards side by side, each with a small diagram and a caption. In each diagram there is a blue box at the top with a dashed line about halfway down showing its former bottom edge; the stronger blue part below it is the growth, and next to it on the left a green arrow pointing down indicates that the box has grown. Below it is a gray box. Card “Flowing on contact”: The gray box sits directly below the grown blue box; a pale dashed outline in the growth shows where it stood before, and to the right of it is a small blue arrow pointing down. Card “Fixed position”: The gray box has stayed in its place; a strip with a red outline shows where it overlaps the blue box, and at the right end of the strip sits a small golden padlock. Card “Flowing”: The gray box has moved down a bit, a pale dashed outline shows its former place; to the right of it are two short vertical blue lines showing the unchanged gap before and after.]
Caption: The three options of the positioning behavior when the object above it grows, as shown by the help window for the ⓘ behind “Behavior”.

**On the canvas** every object stands at its drawn position. How objects move out of the way and move along in the document is shown only by the “Full preview” (see Preview). Only an object that moves to the next page because of the page edge is shown by the canvas at the top there, as in print. An exception applies if in print it moves entirely to the next page only because of a narrow remainder, for example because less than 6 mm remains free at the bottom: then the canvas still shows it on the old page. What exactly happens at the page edge and what the canvas shows for it is described under At the page edge and At the page edge: What the canvas shows.

[Image: Detail of the canvas with the upper part of a page. At the top is a data table: a blue header row with the white headings “Bezeichnung”, “Menge” and “Gesamt” and below it a single row with the light blue field markers “Bezeichnung”, “Menge”, “Einheit” and “Gesamt”, with a dashed outline. Directly below the table, on the left, are two narrow light blue boxes with a blue border, one below the other, labeled “Flowing on contact” and “Flowing”. To the right of them, at the height of the first box, is a light yellow box with a golden border, labeled “Fixed position”. Nothing overlaps. Below the boxes the page is empty.]
Caption: On the canvas, every object stands at its drawn position: a table with a sample row, below it three boxes.
- Image marker 1: The data table is drawn here with a sample row.
- Image marker 2: “Flowing on contact”: drawn directly below the table.
- Image marker 3: “Flowing”: drawn with a little space below the first box and thus also with a gap to the table.
- Image marker 4: “Fixed position”: drawn beside the others, at the height of the first box.

[Image: Detail of the PDF of the same page. At the top is the table with a blue header row (“Bezeichnung”, “Menge”, “Gesamt”) and now four rows, every second one with a light blue background: “Beratung Dynamics 365 – Konzeptphase” (8 Std, 1.160,00 €), a second sample item (1 Stk), “Einrichtung & Schulung vor Ort” (1 Pauschal, 650,00 €) and “Individuelle Rechnungsvorlage nach CI” (3 Std, 435,00 €). A light yellow box with a golden border, “Fixed position”, stands unchanged on the right at the height of the second row and covers the lower half of quantity and amount there. Directly below the fourth row is the light blue box “Flowing on contact”, with clearly more space below it the box “Flowing”. All three boxes are shorter than on the canvas; border and background extend here only as far as their text.]
Caption: The same page in the PDF: The table is longer, the two flowing boxes have moved down, the fixed box has stayed where it was.
- Image marker 1: The table now has all four rows.
- Image marker 2: “Flowing on contact”: moves out of the way and sits directly below the table.
- Image marker 3: “Flowing”: moves down with the growing table and keeps the drawn gap to it.
- Image marker 4: “Fixed position”: stays exactly where it is and covers the table.

#### Flowing on contact

The object stays where you drew it as long as nothing grows into it. If an object above it grows so far that it would overlap this one, this one moves down and sits directly below it. The “Minimum gap above (mm)” then remains as air; in a group, the larger of two values counts (see Which gap applies where). The drawn gap may shrink, unlike with “Flowing”.

An object moves out of the way only for what is really above it and overlaps it horizontally by more than 1 mm. Below a text with automatic height, “Flowing on contact” is the right choice; the reason is given under Flowing below a text with automatic height.

#### Flowing

The object keeps the gap you drew to the object above it. It moves down by exactly the growth of the object above it and never up; a gap you deliberately drew large stays large. Headers and footers push it below them. It follows only what is really above it; what is merely beside it does not push it. If the object above it has to move out of the way itself, it moves along.

An object set to “Flowing” does not rise above its drawn position even if the object above it turns out smaller in the document than on the canvas or is missing altogether, for example an image from the data that a record does not have (see Images: When there is no image, the space below it).

For an object to move along with “Flowing”, the object above it needs a drawn bottom edge against which the growth can be measured:

- For a data table, the header row and one data row count as drawn. Every further row, a text that wraps in a cell and a photo that only arrives with the data are growth.
- A group with an entered height brings its bottom edge with it, even if the height serves only as a minimum height with “Automatic height (fit to content)”. So does a text without automatic height. A new group already brings its height with it.
- A table without a data source has no such drawn bottom edge. If its cells become taller with the real data, this does not count as growth: An object set to “Flowing” below it does not follow by this amount, but only far enough that it does not overlap.
- Below a text with automatic height, the growth cannot be measured; the drawn gap is not kept there. What you do about this is described in the next section.

If on the canvas the object is on a later page and the growing object above it reaches that far, there is no drawn gap across the page boundary: it then begins directly below its end.

“Flowing” does not observe the “Minimum gap above (mm)” directly in the document; in a group, it counts as a lower limit (see Which gap applies where).

#### Flowing below a text with automatic height

A text with “Automatic height (fit to content)” has no drawn bottom edge against which its growth could be measured. An object set to “Flowing” below such a text therefore does not keep the drawn gap. You have two options:

- Choose “Flowing on contact” for the object below. It moves out of the way of the growing text and sits below it. This is the right choice if it is enough that nothing overlaps.
- If the object below is to keep the drawn gap, switch off “Automatic height” for the text above it. Then the entered height counts as the drawn bottom edge from which the object below moves along. With a fixed height, the canvas and the PDF look different as soon as more text goes in than fits in the box; details are described under Texts: Width and height.

#### Fixed position

The object always stays exactly in its place, no matter what grows above it. Flowing objects do not move out of its way: If something above it grows, it covers the fixed object or is covered by it. Which one is on top is determined by the layer order.

- It is also printed where a header or footer is. Without a layer order of its own, the header or footer lies above it in print and can cover it (see The layer order). The canvas shows the overlap with an orange frame and the sign ⚠ (see Markers and warning symbols on the canvas).
- At the page edge it is never split. It sticks out into the bottom page margin; whatever reaches past the edge of the paper is missing from the PDF, and the document reports it (see At the page edge). A code is never cut off in this case: if it reaches past the edge of the paper, it is missing entirely, and for a GiroCode the document is not created (see Barcode, QR code and GiroCode: Page edge and fixed bottom edge).
- When rotated, it does not keep any space free directly in the document (see Rotation).
- In a group or cell, it is the default for text, image, codes and shapes without a setting of their own.

A table is an exception: With “Fixed position” it begins exactly at the drawn position, but afterwards behaves like any table, and flowing objects below it move out of its way instead of overlapping it (see Data tables: “Position & size” tab).

### Move along

If an object lies on a larger one, for example a label on a colored box, the two belong together. When the document is created, it moves along with the object below it and keeps exactly the drawn gap, even if the lower object breaks onto the next page.

| Setting | What it does | Default |
|---|---|---|
| “Move along with the object below” (under the label “Move along” with ⓘ) | On: The object moves along with the object below it. Off: It flows independently and is pushed below the other object like an ordinary overlap; the label would then sit below the box instead of on it. | on |

- **Where:** only for text, image, codes, shapes and groups directly in the document, below the list “Behavior”. Not with “Fixed position”, not for tables and not in groups or cells.
- **When it takes effect:** from an overlap of 20 % of its own area, calculated with the box of the object. What counts is the position on the canvas. An object that a text with automatic height covers only with the real data does not move along, but follows its own positioning behavior.
- **Not involved** are headers and footers and other areas that repeat on every page, tables, full-page backgrounds and objects with “Fixed position”. An object that is taller than 90 % of the page carries nothing; if a text becomes that tall only with the data, the document reports it when it is created.
- **Only one level:** An object that itself moves along carries nothing. If a label lies on a box that in turn moves along on a larger box, the label does not move along, and the sign ⇕ is missing on it.
- **On the canvas,** a blue sign ⇕ at the top right corner shows that the object moves along (see Markers and warning symbols on the canvas).
- **In the PDF,** the object is attached to its carrier with the drawn offset, lies above it and is not pushed away. What lies below it on the canvas adjusts to it as to any other object above.

### Minimum gap above

| Setting | What it does | Default |
|---|---|---|
| “Minimum gap above (mm)” | Keeps at least this gap free above the object. If the object moves down, the gap is retained as a buffer. It is a lower limit, not an addition. 0 means: no minimum gap. | empty (0) |

The field is below the sentence about the behavior. With “Fixed position” it is missing. What it does depends on the behavior and the position of the object.

#### Which gap applies where

Gaps are never added: the larger of two values always applies. In a group or cell, a second value appears next to the minimum gap, the “Spacing between objects (mm)”. You set it on the group or cell itself, not on the individual object in it.

| Behavior | Directly in the document | In a group or cell |
|---|---|---|
| “Flowing on contact” | The minimum gap remains as air to the object above and to the start of the page. The drawn gap may shrink. | Between two objects the larger of two values applies: the minimum gap of the object or the spacing between objects of the group or cell. For the upper edge of the group, the minimum gap counts. |
| “Flowing” | No effect. Only the gap you drew counts. | The larger of two gaps applies: the drawn one or the minimum gap of the object. The spacing between objects has no effect here. |
| “Fixed position” | The field is missing. The object keeps no gap, and others keep no gap to it. | The field is missing. The spacing between objects has no effect for this object. |

An example: With a minimum gap of 3 mm and a spacing between objects of 2 mm, “Flowing on contact” in a group leaves 3 mm of air, not 5 mm.

With “Flowing” directly in the document, the field is grayed out. The mouse pointer says “No effect with »Flowing«: the gap you drew is what counts there.”, and below the field it says “No effect with »Flowing« — the gap you drew is kept. If you need a fixed minimum gap, use »Flowing on contact«.” In a group or cell, the field remains usable with “Flowing” and takes effect there.

The “Spacing between objects (mm)” is a setting of the group or cell itself. It acts only inward, not on the position of the group; space above the group is its minimum gap above. The field is described in Groups: “Position & size” tab.

#### When switching to Flowing

When you switch to “Flowing”, the designer changes the value itself:

- Directly in the document, it deletes an entered minimum gap and reports: “»Minimum gap above« does not apply with »Flowing« — there the gap you drew is what counts. The old value (… mm) has been removed.”
- In a group, it enters the drawn gap to the object above as the minimum gap, rounded to 0.5 mm. For a table in a group, this does not happen.

What happens to the minimum gap when an object moves into or out of a group is described under What changes when you drag in and take out.

### Which behavior an object has

With “(default)”, the list marks what applies to an object without a setting of its own. That depends on the type of object and the position:

| Object | Directly in the document | In a group or cell |
|---|---|---|
| Text, image, codes, shapes | “Flowing on contact (default)” | “Fixed position (default)” |
| Groups and tables | “Flowing on contact (default)” | “Flowing on contact (default)”, that is, in every position |

Which behavior an object actually has depends on how it was created and which paths it has taken since. The two following tables give it for each path.

#### What a new object starts with

| Object | How it is created | Behavior at the start |
|---|---|---|
| Text | The button “Text” in the ribbon, by click or drag, on the page, in a group or in a cell, also in the ribbons of the designers | “Flowing on contact”. In a group or cell this differs from the default: There “(default)” is next to “Fixed position”. More under Texts: Inserting a text. |
| Text | A field from the area “Data” that you drag to a free spot on the page | “Flowing on contact” |
| Text | A field from the area “Data” that you drag onto a group or into a table cell, and a text that the designer itself creates for a table cell, for example with “Choose columns” | “Fixed position”, that is, the default. More under Texts: Dragging a field onto the page. |
| Image | The button “Image” in the ribbon, also in the ribbons of the designers | “Flowing on contact”. In a group or cell this differs from the default: There “(default)” is next to “Fixed position”. |
| Image | An image or file field that you drag onto the page or onto a group | “Flowing on contact” |
| Image | An image or file field that you drag into a table cell, or an image column from “Choose columns” | “Fixed position”. The sizes for each path are described under Images: What a new image starts with. |
| Code | One of the three buttons in the section “Codes” in the ribbon, also in the ribbons of the designers | “Flowing on contact”. In a group or cell this differs from the default: There “(default)” is next to “Fixed position”. The sizes for each button are described under Barcode, QR code and GiroCode: What a new code starts with. |
| Shape | The shapes selection menu, by click or by dragging a tile, on the page, in a group or in a cell | “Flowing on contact”. In a group or cell this differs from the default: There “(default)” is next to “Fixed position”. More under Shapes: Defaults when creating. |
| Group, data table, free-form table | The respective button in the ribbon, by click or drag, on the page as well as in a group or cell | “Flowing on contact”; in every position, that is also the default. |

#### What changes when you drag in and take out

If an existing object changes level, its behavior and its minimum gap change depending on the path:

| Action | Text, image, shapes | Group, table | Minimum gap above |
|---|---|---|---|
| Drag an object from the page into a group | “Fixed position” | keeps its behavior | is dropped |
| Drag an object from one group into another, also from an inner group into the outer one | “Fixed position” | keeps its behavior | stays; for text, image and shapes hidden (see below) |
| Drag an object from a group onto the page | its own setting is dropped, “Flowing on contact” applies | its own setting is dropped, “Flowing on contact” applies | is dropped |
| “⬆ Take out of group”, the group is directly in the document | its own setting is dropped, “Flowing on contact” applies | its own setting is dropped, “Flowing on contact” applies | stays and acts on the page with “Flowing on contact” as a buffer upward; check the field afterward |
| “⬆ Take out of group”, the group is in another group | stays | stays | stays |

- If you drag text, image or shape into another group, they are set to “Fixed position” afterward. An entered minimum gap is retained, but is hidden and has no effect. If you switch back to “Flowing on contact”, the old value is in the field again and takes effect. With “Flowing”, by contrast, the designer enters the drawn gap to the object above; the old value is then gone (see When switching to Flowing).
- The minimum gap that remains when taking out can also be the value that the designer itself entered in the group when you switched to “Flowing”.
- Several selected objects cannot be dragged into another group together. If you move them together on the page or in their group, the minimum gap is retained.
- A copy (Ctrl+C and Ctrl+V, Ctrl+D) keeps the behavior of the original.
- Where the object goes, what the designer adjusts in the process and which messages it shows is described under Dragging existing objects in and Taking objects out.

> **Good to know:** Older templates can contain objects that are anchored to another object. There is no setting for this any more; in print, the anchoring continues to take effect. As soon as you change the positioning behavior of such an object, it is canceled.

### What is different for a type of object

Everything on this page applies to every type of object that has a positioning behavior. The pages on the types of object give only their initial value and what is different for them. The overview:

| Object | What is different | More on this |
|---|---|---|
| Text | Below a text with automatic height, the growth cannot be measured. With a fixed height, the entered height counts as the drawn bottom edge. Move along exists only for a text directly in the document. | Flowing below a text with automatic height, Texts: Width and height |
| Image | An image is never split. Instead of the checkbox “Keep together at page break”, a note appears directly in the document. If the image is missing in the record, a flowing object below it never rises above its drawn position. | The note instead of the checkbox, Images: When there is no image, the space below it |
| Code | A code is never split, like an image. Instead of the checkbox “Keep together at page break”, a note appears directly in the document. An empty code with “print nothing” takes up no space: A flowing object below it never rises above its drawn position because of it. | The note instead of the checkbox, Barcode, QR code and GiroCode: Empty and invalid |
| Shape | When moving along, the designer calculates with the box of the shape, not with its visible form. | Shapes: What applies to shapes as to all objects |
| Group | In every position, “Flowing on contact” carries the addition “(default)”. The field “Spacing between objects (mm)” is a setting of the group, not of the objects in it. As a header or footer, the group has no positioning behavior and no move along. | Groups: “Position & size” tab, Header and footer |
| Data table | There is no move along. With “Fixed position”, the table begins at the drawn position and afterward breaks row by row. A table that repeats on every page has no positioning behavior. | Data tables: “Position & size” tab |
| Free-form table | There is no move along. With “Fixed position”, the table begins at the drawn position and afterward runs row by row across the pages like any free-form table. | Free-form tables: “Position & size” tab |

### What changes in the document?

**On the canvas:** Every object stands at its drawn position; how it moves out of the way or moves along in the document is shown only by the “Full preview”. A blue sign ⇕ at the top right corner shows an object that moves along, an orange frame with ⚠ shows an object with “Fixed position” that covers a header or footer (see Markers and warning symbols on the canvas).

**In the PDF:** Every object starts at its position; if something above it grows, it moves down or stays, depending on the behavior. “Flowing on contact” only moves out of the way, “Flowing” keeps the drawn gap, “Fixed position” stays put. An object that moves along is attached to the object below it with the drawn offset.

---

## At the page edge: keep together or split

*For users · Properties of all objects · Page en/blattkante.html*

> **In short:** If an object no longer fits entirely on its page at the bottom, there are three ways it can go: it moves to the next page as a whole, it is split at the page edge and continues at the top, or it stays where it is and sticks out. Which way applies depends on the type of object, on the positioning behavior and on the checkbox “Keep together at page break”. The checkbox is checked at first, so the object moves as a whole. Only a text, an unrotated rectangle and a group can be split, and only if you uncheck the checkbox or the object is taller than a whole page. The first object on a page does not move on as long as it fits on a whole page. How the split happens is shown by the full preview and the PDF, not by the canvas.

When the content of a page grows, for example through a long line-item table or a long text, there is eventually not enough room left at the bottom. This page explains what happens to an object that no longer fits entirely: when it moves on as a whole, when it is split and when it stays where it is. How the objects below it move along is described under Positioning behavior. The page break as an object of its own and the header and footer are described under Page break and Header and footer.

### What happens at the page edge

If an object no longer fits entirely on its page at the bottom, what happens next depends on its type and its positioning behavior. The edge is the lower end of the printable area, above the space for a footer. Three ways are possible:

- **Keep together:** The object moves to the next page as a whole, and the rest of the page stays empty.
- **Split:** The object fills the rest of the page and continues at the top of the next page.
- **Stay where it is:** The object stays where it is and sticks out at the bottom into the page margin or beyond it.

The table gives the way for each object. The middle column shows whether the object has the checkbox “Keep together at page break”.

| Object | Checkbox | What happens |
|---|---|---|
| Text, unrotated rectangle or group, directly in the document, with “Flowing on contact” or “Flowing” | yes | With the checkbox checked (default), the object moves to the next page as a whole. Without it, the object is split at the edge and continues at the top of the next page. If less than 6 mm remains free at the bottom, or if not even its first line fits in the rest, it moves as a whole even without the checkbox (see Without the checkbox: split and continue). |
| Image, code, line, arrow, circle/ellipse, triangle, star, polygon and every rotated object, flowing | no, a note | Cannot be split and moves to the next page as a whole, even if an older or imported template has saved it with keeping together switched off, unless it is the first object on its page (see The first object on a page). |
| Grid from older templates | no, a note | Moves to the next page as a whole, even with “Fixed position” and even if an older or imported template has saved the grid with keeping together switched off; only as the first object on its page does it stay where it is. Only a grid that is taller than a whole page is split, and only between two rows; the document reports it. Even in a group without the checkbox, a grid stays whole (see Images, shapes and lines in a split block). |
| All other objects with “Fixed position” | no, a note | Stays where it is and is never split. It sticks out into the bottom page margin; whatever sticks out past the edge of the paper is missing from the PDF, and the document reports it. |
| Header and footer and every area that appears on every page | no, a note | Is never split and appears whole on every page. |
| Data table, also with “Fixed position” | its own checkbox for the rows | Breaks row by row. If not even its header row fits in the rest, it starts at the top of the next page (see Tables across several pages). |
| Free-form table, also with “Fixed position” | no | Runs row by row across as many pages as necessary. A row stays whole unless it is taller than a page. If not even the header fits in the rest, the table starts on the next page (see Cells, header row and page break: Across several pages). |
| Text, image, code and shape in a group or cell | no, not even a note | They go with their group or cell. Whether it is split is decided by the checkbox on the group directly in the document (see Where the checkbox is). |

If a flowing object moves to the next page, it starts at the top there, and everything below it on the canvas moves along. Whether an object still fits is decided by the position it gets in print, not by its position on the canvas. The first object on a page is an exception; it is described under The first object on a page.

### The checkbox “Keep together at page break”

The checkbox decides what happens to an object that no longer fits entirely on the page at the bottom: it moves to the next page as a whole, or it is split at the page edge and continues there. Two rules apply regardless of the checkbox: a text, an unrotated rectangle or a group that is taller than a whole page is split (see When the first object moves or is split after all). And the first object on a page does not move on as long as it fits on a whole page (see The first object on a page).

| Setting | What it does | Default |
|---|---|---|
| “Keep together at page break” (with ⓘ) | On: If the object no longer fits at the bottom, it moves to the next page as a whole, and the rest of the page stays empty. Off: A text fills the rest of the page and continues at the top of the next page. A group is split, and its content continues. A rectangle is split at the page edge. | on, also in old templates |

#### Where the checkbox is

- **Directly in the document:** only for a text, an unrotated rectangle and a group, not with “Fixed position” and not in headers and footers. For text and rectangle, the checkbox is below the positioning behavior; for the group, it is in the section “Behavior”. Otherwise a note appears there (see The note instead of the checkbox). What additionally applies to the rectangle is described under The rectangle at the end of the page.
- **In a group or cell,** text, image, codes and shapes have neither the checkbox nor a note. You set it on the group: if you uncheck it there, the text in the group also continues across the page edge. For the group to grow with the text, it needs “Automatic height (fit to content)”; with a fixed height, the text ends at its bottom edge (see The fixed bottom edge and where the PDF cuts off).
- **Tables** have their own checkbox, “Keep row together at page break” (see Tables across several pages).

#### Without the checkbox: split and continue

- The text fills the rest of the page and continues at the top of the next one. No single line is left alone at the page edge; how many lines remain at least is described under Minimum lines when text is split.
- If the text is too short to be split this way, or if not even its first line fits in the rest, it moves as a whole. Likewise, an object without the checkbox moves to the next page as a whole if less than 6 mm remains free at the bottom.
- If the text or its group has a background color or a closed border, the protection against single lines applies only to a limited extent (see the “Caution” box under Which texts the protection applies to).
- When split, each page gets its own piece of the background and border. What the border looks like at the page edge is described under Border and background across several pages.
- If an area that repeats on every page sits in the middle of the page, it never covers a split text. It keeps the full width of the page free, even if it is narrower and sits beside the text. On the page where the text begins, the text moves entirely below the area if it does not fit completely above it; the space above stays free. On every further page, the text fills the space above the area and continues directly below it. If the text is the first object on its page and fits on a whole page, it also moves below the area, but is not split: it sticks out at the bottom; whatever reaches past the edge of the paper is missing from the PDF, and the document reports it (see The first object on a page and Header, footer or free-standing).

#### Images, shapes and lines in a split block

Images and shapes in a split text or a split group are not lost.

- If an image or a shape sticks out over the edge, it begins the piece on the next page; whatever beside it already fit on the old page stays there. If a second image or a second shape beside it in a group also sticks out over the edge, it comes along in the same piece, at the same distance from the first one as on the canvas. Only if it no longer fits entirely on the page there does it begin a piece of its own on a following page.
- An unrotated rectangle, by contrast, is split along with it, one piece per page. Which shapes are split along and which begin a piece is described under Shapes: group across several pages.
- A grid in a split group stays whole. If it no longer fits in the rest of the page, it begins on the next page, and with it everything beside it that begins at its height or lower. If it is itself taller than a whole page, it is split only between two rows: every row stands entirely on one page, and the line between the two rows at the cut edge appears on both pages. If the grid has only an outer border, it is closed at the cut edge: the outer line appears below the last row of the old page and above the first row of the new one. Only a single row that is itself taller than a page is split within itself. For Minimum lines when text is split, each grid row counts as one line; if fewer lines remain above the grid than set, the whole rest moves to the next page. If the grid is at the very top of the block, the whole block moves on in this way; a background of the group then does not remain as an empty strip at the bottom.
- Lines do not follow this rule, and neither does the stroke of an arrow: a vertical or diagonal line that runs across the cut edge is not split and is missing from the PDF; the document reports it as a warning (see Problems and messages: Pages and space). Check a line at the page edge in the “Full preview”. The lines of a grid go with their row.
- Whatever lies at or above the upper edge of the block appears with the first piece, at the same distance as on the canvas: a horizontal line exactly at the upper edge, also the top stroke of a table at the very top of the group, and an object that in an older or imported template extends past the start of the group. If the first piece begins at the top of a page, it then stands in the page margin and is printed, as with a block that moves as a whole; for a text, a note says so.
- If an image or a shape other than the unrotated rectangle is taller than the space on a whole page, it is printed unsplit and sticks out at the bottom; if it covers a footer in doing so, the document reports a warning. Whatever reaches past the edge of the paper is missing from the PDF, and the document reports it. A warning that the image or shape was split does not appear here (see When the first object moves or is split after all).

#### The note instead of the checkbox

Directly in the document, objects that cannot have the checkbox show a gray note with ⓘ. It gives the reason and begins with “»Keep together at page break« is not available here: …”:

- Header or footer: “… an object that appears on every page is never split — it is shown whole on every page.”
- “Fixed position”: “… an object with »Fixed position« is never split — it stays where it is.” This does not apply to a grid; it gets the sentence on the next line.
- Grid: “… a grid is not split when the document is created — it always moves to the next page as a whole if it no longer fits at the bottom; only a grid that is taller than a whole page is split, and the document reports it. If it is the first object on its page and fits on a whole page, however, it stays where it is and sticks out at the bottom (see ⓘ).”
- Code: “… a code cannot be split at all when the document is created — it always moves to the next page as a whole if it no longer fits at the bottom. If it is the first object on its page and fits on a whole page, however, it stays where it is. It is never cut off: if it reaches past the edge of the paper, it is not printed, and the document warns (see ⓘ).” For the GiroCode, the sentence ends with “… the document is not created (see ⓘ).”
- Image, line, arrow, circle and ellipse, triangle, star and polygon: “… this object cannot be split at all when the document is created — it always moves to the next page as a whole if it no longer fits at the bottom. If it is the first object on its page and fits on a whole page, however, it stays where it is and sticks out at the bottom (see ⓘ).”
- Rotated rectangle: “… a rotated object cannot be split when the document is created — it always moves as a whole.”

A group in a group and a cell in the cell designer show a sentence of their own: “»Keep together at page break« only works for objects that are directly in the document and flow. If this text is inside a group, set the checkbox on the group — then it also continues across the page edge.” It speaks of a text, but here it applies to the inner group: you set the checkbox on the outer group, directly in the document. If the inner group is set to “Fixed position”, the sentence about “Fixed position” appears instead. For the cell of a free-form table: its row stays together unless it is taller than a page.

### The first object on a page

> **Caution:** The first object on a page does not move on, otherwise the page before it would stay empty. If there is nothing yet on the page above a text, a group, a shape, an image, a code or a grid, it stays where it is, even if it no longer fits at the bottom, as long as it would fit on a whole page. It then sticks out over the edge at the bottom: whatever is in the page margin is printed; whatever reaches past the edge of the paper is missing from the PDF, and the document reports it. A code is not cut off in this case: if it reaches past the edge of the paper, it is left out, and for a GiroCode the document is not created (see Barcode, QR code and GiroCode: Page edge and fixed bottom edge).
>
> This applies with and without the checkbox “Keep together at page break”: even a text that could be split sticks out as the first object if it fits on a page.

Headers and footers and other repeated areas do not count as content above it, but an object with “Fixed position” does. If the object is to be on the next page, place it there on the canvas; otherwise move it up far enough that it fits. How this appears in print as a message is described under Something sticks out over the bottom margin or is missing at the bottom.

#### When the first object moves or is split after all

The rule has exceptions:

- **Taller than a page:** A text, an unrotated rectangle or a group that is taller than a whole page is split, even with the checkbox; if the checkbox is checked, the document reports the split as a warning. The same applies to a grid that is taller than a whole page: it has no checkbox, but the document reports the split there too; it is split only between two rows. If it is the first object further down the page and not even its first row fits in the rest, it begins at the top of the next page. The same applies if fewer lines fit in than are set under Minimum lines when text is split; for a group with a table, the rows of the table header count too (see Which texts the protection applies to). The page before then stays empty apart from header, footer and repeated areas.
- **What cannot be split,** such as an image or a circle (see the table under What happens at the page edge), is not split even if it is taller than a page. If it is not already at the very top of its page, it begins at the top of the next one; there it is printed whole and sticks out at the bottom. If it covers a footer in doing so, the document reports a warning; whatever reaches past the edge of the paper is missing from the PDF, and the document reports it. The warning that an object that was kept together has been split appears in this case anyway, although nothing is split.
- **Tables** break row by row. As the first object on a page, a table begins at the top of the next page if not even its header row fits in the rest.
- **Narrower page because of a header with a page rule:** If a header or footer that appears only on certain pages makes this page narrower than the next, for example a large letterhead on page 1 only, and the object fits entirely on the next page, it moves after all, provided it may not be split: a text, an unrotated rectangle or a group with the checkbox “Keep together at page break” checked, and an image, a line, an arrow or a shape always.

### Minimum lines when text is split

If a text may be split at the end of a page, each page keeps at least that many lines of it. This way, no single line is left alone at the bottom or begins alone at the top of the next page. If the space at the bottom is not enough for that many lines, the whole text or its remainder moves to the next page; that is no harm. A text that is too short to be split this way also moves on together: with a setting of 2, three lines of which only two would fit at the bottom move to the next page together.

You set the number in the template settings on the “Font” tab, in the field “Minimum lines when text is split” (see Minimum lines in the template settings).

#### The field and its values

- **Input:** Empty means 2; then nothing is stored in the template. Possible values are 1 to 9, and 1 switches the protection off. A larger number becomes 9, 0 and negative numbers count as empty, decimal numbers are truncated (2.5 becomes 2). When you leave the field, it shows what applies: 12 becomes 9, 0 becomes an empty field.
- **The gray note below the field** reads: “Empty = 2; possible values are 1 to 9. Applies to texts where »Keep together at page break« is not checked — and, even when it is checked, to an object that is taller than a page and moves entirely to the next page (details in the ⓘ).”
- **On the canvas** the number has no effect, because no text is split there. You see it in the “Full preview” and in the PDF.

#### Which texts the protection applies to

- **Texts without the checkbox** “Keep together at page break” get the protection at every page edge, even if they begin at the top of a page and are longer than a page (see Without the checkbox: split and continue).
- **Texts with the checkbox** get it only if they are taller than a whole page and are therefore split despite the checkbox, and even then only after they have moved entirely to the next page. Such a text moves entirely to the next page if something is already above it on the page, or if it begins as the first object in the middle of a page and fewer of its lines fit at the bottom than are set here. If it begins at the very top of a page, however, or if at least that many lines fit at the bottom, it is split without this protection.
- **An extra-long text as the first object in the middle of a page** moves entirely to the next page if fewer lines fit at the bottom than are set here. The page before then stays empty apart from header, footer and repeated areas (see When the first object moves or is split after all). For a group with a table below the text, the rows of the table header count too, if the header still fits at the bottom. If text and header fit together, the text stays; if not even one row of the table fits below the header, it begins with its header on the next page (see Cells, header row and page break: Table in a group).

> **Caution:** If the text or its group has a background color or a closed border, the minimum lines do not cause it to move to the next page as a whole. A single line can then be left alone at the page edge after all. Only a text that is longer than a page and begins as the first object in the middle of a page moves entirely to the next page even then, if fewer lines fit at the bottom than are set here.

### What the canvas shows

- If an object moves to the next page because of the page edge, the canvas shows it at the top there, as in print; if necessary, it appends a page for this.
- Exception: If an object moves entirely to the next page in print only because less than 6 mm remains free at the bottom, because not even its first line fits in the rest, or because otherwise a page would carry fewer lines than set under “Minimum lines when text is split”, the canvas still shows it on the old page. Where it really sits is shown by the “Full preview”.
- An object that is split in print stays on one page on the canvas and sticks out over the edge. An orange hatched strip shows the overhang as soon as it exceeds 2 mm (see Markers and warning symbols on the canvas). The same applies to an object with “Fixed position” and to the first object on a page that stick out in print. While you drag, the strip is hidden.
- How the other objects make room and exactly where the split happens is shown only by the “Full preview” (see Differences between the canvas and the PDF).

[Image: Detail of the lower end of page 1 of the canvas. A group with a very light bluish background and a blue and gray dashed border shows the heading “Allgemeine Geschäftsbedingungen” and the two sections “1. Geltungsbereich” and “2. Zahlung”. In the lower part of the group, an orange dashed line runs across the width, below it a narrow orange-and-gray hatched strip down to the bottom edge of the group. Below the group follow the white bottom page margin and the edge of the page; below that, on a gray background, is the button “Add page”.]
Caption: The orange strip at the end of the page: here a block reaches past the printable area.
- Image marker 1: The orange hatched strip shows the overhang; the dashed upper edge is the edge of the printable area.
- Image marker 2: The group that reaches over the edge. For it, “Keep together at page break” is off: in print, it is split at the edge and continues at the top of the next page.

### Recipe: a long text across several pages

A long text such as general terms and conditions is to continue across the page edge instead of jumping to the next page as a whole. Here is how:

1. Select the text if it sits directly on the page. If it is inside a group, select the group.
2. On the “Position & size” tab, uncheck “Keep together at page break”. For a text it is below the positioning behavior; for a group it is in the lower section “Behavior”.
   → The text fills the rest of the page and continues at the top of the next one. No single line is left alone at the edge; exceptions are named in the section Minimum lines when text is split.
3. If the text is inside a group, switch on “Automatic height (fit to content)” on the group. For a text directly on the page, it is already on at first.
   → The group grows with the text. With a fixed height, the text ends at the bottom edge of the group, and the PDF prints only what fits into this height (see The fixed bottom edge and where the PDF cuts off).
4. Check the result in the “Full preview” (see Full preview and PDF).
   → There you see where the text is split. The canvas still shows it on one page, with an orange hatched strip at the overhang.

A text that is taller than a whole page is split even with the checkbox checked, and the document reports it as a warning. Without the checkbox, the warning does not appear.

> **Caution:** If the text is the first object on its page and fits on a whole page, it does not continue: it stays where it is and sticks out over the margin at the bottom. Then place it on the next page on the canvas, or move it up far enough that it fits (see The first object on a page). If the text has a background or a border, also read the “Caution” box under Which texts the protection applies to.

### What changes in the document?

**On the canvas:** An object that is split in print stands unsplit on its page and sticks out over the edge; an orange hatched strip shows the overhang. An object that moves entirely to the next page in print stands at the top there; if it moves on only because of the 6 mm, the first line or the minimum lines, it still stands on the old page. The minimum lines have no effect here. How it really looks is shown by the “Full preview”.

**In the PDF:** Every object moves as a whole, is split or stays where it is, depending on its type, positioning behavior and checkbox. The first object on a page stays where it is as long as it fits on a whole page. Whatever reaches past the edge of the paper is missing from the PDF, and the document reports it. A split object carries its piece of background and border on every page, and the minimum lines keep the lines of a split text together.

---

## Border, background and colors

*For users · Properties of all objects · Page en/rahmen-farben.html*

> **In short:** Texts, groups, rectangles and shapes can have a fill color and a border; texts also have inner margins. You set every color through the same color field and the same color picker, either fixed or from a color variable. This page explains what the fields do and which defaults apply, how a color code is written, and what an empty or invalid color field means. You should know two differences between the canvas and the PDF: in the PDF the border sits centered on the edge, and the canvas calculates a color from a variable with the sample data. The pages on texts, shapes, groups and tables only mention what is different for them.

### Border and background

Texts, groups, rectangles and shapes can have a fill color and a border. The fields are named slightly differently for each type of object; the operation is the same everywhere. An image has no border and no background; you crop its shape with “Shape” (see The properties of an image).

[Image: On the left a small white page with a selected text “Payable within 14 days without deduction.” in a pale yellow box with a blue selection frame and two handles on the left and right; a golden line runs only along the bottom edge of the box, otherwise there is no border line. Below the page is the button “Add page”. On the right the “Properties” window with the section “Border & background”: a color field “Background” (with ⓘ) with a light yellow swatch and the code “#FFF4D6”; a checked box “Turn on border” (with ⓘ); the color field “Border color” with a golden swatch and “#C9971A”; the field “Border thickness (pt)” (with ⓘ) with 1.5; “Border lines (sides)” (with ⓘ) with four checkboxes in two rows (“Top”, “Right”, “Bottom”, “Left”), of which only “Bottom” is checked; an empty field “Corner radius (mm)” (with ⓘ).]
Caption: A text with a background and only one border line at the bottom, and the fields that set this.
- Image marker 1: The result on the page: a background and a line only at the bottom.
- Image marker 2: Color field: the swatch on the left, the color code on the right.
- Image marker 3: Only with this checkbox do the color, thickness and sides appear.
- Image marker 4: Only “Bottom” is checked here.
- Image marker 5: The corner radius rounds the background and the border.

#### What the fields are called

| Type of object | Fields | Special features |
|---|---|---|
| Text | “Background”, “Turn on border”, “Border color”, “Border thickness (pt)”, “Border lines (sides)”, “Corner radius (mm)” | Section “Border & background”. “Border color” has no ⓘ here. |
| Group | “Background”, “Turn on border”, “Border color”, “Border thickness (pt)”, “Border lines (sides)”, “Corner radius (mm)” | Section “Background & border” on the “General” tab, also in the group designer (see Groups: The “General” tab). |
| Rectangle | “Background”, “Border”, “Border (pt)”, “Corner radius (mm)” | Section “Style”. No checkbox; a color under “Border” is enough. No choice of sides, no “Line style”. You can also drag the corner radius with the yellow diamond (see Rounded corners). |
| Circle and ellipse, triangle, star, polygon | “Background”, “Border”, “Border (pt)”, “Line style” | Section “Style”. No corner radius (see Which shape has which field). |
| Line and arrow | “Color”, “Thickness (pt)”, “Line style” | Section “Style”. No fill; the arrowhead has the line color (see Line and arrow). |
| Cells in the column designer and header designer | Section “Border” with “Turn on border”, “Border color”, “Border thickness (pt)”, “Border lines (sides)”, plus “⇊ Apply to all columns” or “⇊ Apply to all header cells” | The same fields appear for a selected column on the “Column” tab once the column designer has been opened (see Data tables: The settings of a column). What the checkbox sets is in the table under What the fields do. |
| Cells in the cell designer of an extra row or a free-form table | The fields of a group (see the row “Group”) | Each of these cells is a small group inside. What is different for a cell is explained under Background, border and size of a cell. |
| Multiple selection | “Fill color”, “Border color”, “Border thickness (pt)” | See Several objects at once. |

You set the border around every page under “Page border” when nothing is selected (see Page border). The header background and the banded rows of a table are under Data tables: The “Style” section.

#### What the fields do

| Setting | What it does | Default |
|---|---|---|
| “Background” (with multiple selection “Fill color”) | Fills the area behind the content. Without a color it is transparent; the paper shows through. For a group it covers the whole group, in the group designer the whole work area. For a text, the area in the PDF is as tall as the text including its inner margins; with a fixed height it is therefore taller or shorter there than on the canvas, which shows it as tall as the number entered (see Texts: Width and height). With “Automatic height” it reaches at least as far as the “Min. height” and at most as far as the “Max. height” (see Texts: Min. height and max. height). If the object is split at the end of the page, each page gets its piece (see Across several pages). | Text and group: none Group inside a group: #F5F7FC Shapes: see Defaults when creating |
| “Turn on border” (text, group, cell) | Turns the border on. Only then do the color, thickness and sides appear. What turning it on sets and turning it off clears depends on the location (see the next table). | off Group inside a group: on |
| “Border color”, “Border”, “Color” | The color of the line, fixed or from a color variable (see Color field and color picker). For a text and a group, an emptied field turns the border off; for a rectangle and shapes there is then no outline. What an empty or invalid field means otherwise is explained under Empty color field and Invalid color. | Text and group: #333333 when turned on Group inside a group: #2B4CC4 Cells: see the next table Shapes: see Defaults when creating |
| “Border thickness (pt)”, “Border (pt)”, “Thickness (pt)” | The thickness of the line in points; 1 pt is about 0.35 mm. 0 means no line; for an arrow the whole arrow including its arrowheads disappears. An empty field counts as 1 pt. At 0 the background and fill remain. The field does not accept the minus key; if you paste a negative number, it discards it and shows the old value again. What else applies to shapes is explained under Thickness and border (pt). | empty (1 pt) Group inside a group: 0.75 pt Shapes: see Defaults when creating |
| “Border lines (sides)” with “Top”, “Right”, “Bottom”, “Left” (text, group, cell) | Which sides get a line, for example only a dividing line at the bottom. As long as you click nothing, all four are checked: a closed box. Every click saves the choice; if all are unchecked, there is no line and the fill remains. | all four |
| “Corner radius (mm)” (text, group, rectangle, table) | Rounds the corners of the background and the border; 0 is square. For a text and a group the field is always there, even without a border, and then rounds the fill. Without a background and border it has no effect. At most half of the shorter side is effective; a larger value does not round any further. If you have clicked a checkbox under “Border lines (sides)” once, only the area becomes round in the PDF and the lines stay straight, even if all four are checked again afterward; the canvas bends them along at the corners. You get a round border back by turning “Turn on border” off and on again; then enter the border color again. For a rectangle you can also drag the radius with the yellow diamond (see Rounded corners). Whether a table stays round depends on whether it fits entirely on one page (see Data tables: Border, corners, guide lines, visibility). In a cell of a free-form table or an extra row the field is there but does not round the cell (see Background, border and size of a cell). | empty (square) |
| “Line style” (line, arrow, circle and ellipse, triangle, star, polygon) | “solid”, “dashed” or “dotted”. With thick lines the canvas and the PDF look slightly different (see Line style). | solid |

What the checkbox “Turn on border” sets depends on the location:

| Location | Turning it on sets | Turning it off clears |
|---|---|---|
| Text, group, cell in the cell designer of an extra row or a free-form table | if a color is missing, dark gray #333333; plus all four sides. The thickness stays as it is; an empty field counts as 1 pt | The color and the choice of sides; the thickness and corner radius stay |
| Group inside a group | nothing: the border is on from the start, with #2B4CC4 and 0.75 pt | as for a group |
| Cells in the column designer and header designer | light gray #CCCCCC with 0.5 pt on all four sides | the whole cell border, including its thickness |

#### Where the line sits

In the PDF a border always sits centered on the edge, half outside and half inside. A thick line therefore extends beyond the area by half its thickness. The canvas does not show this the same way for every object:

| Object | Canvas | PDF |
|---|---|---|
| Text, circle, ellipse, triangle, star, polygon, line and arrow | centered on the edge | centered on the edge |
| Rectangle, group, table cell | entirely inside | centered on the edge |

If two neighboring cells each have a line on their shared edge, both lie on top of each other in the PDF and look like a single thick line; on the canvas they lie side by side and look twice as thick. A rectangle of 40 × 20 mm with a 6 pt border measures 42.1 × 22.1 mm on the outside in the PDF and 40 × 20 mm on the canvas. How to get a rectangle to exact outer dimensions in the PDF is explained under Shapes: Canvas and PDF compared. The page border, too, sits with its stroke centered on the line; whatever extends beyond the page edge at a distance of 0 is missing (see Page border).

#### Across several pages

If a text, a group or a rectangle is split at the page edge, each page gets its piece of the background and border. When an object is split and when it moves on as a whole is explained under Keep together at page break.

- A rectangle and every text or group whose “Border lines (sides)” you have never clicked get a closed border on every page.
- If you have chosen the sides, the lines on the left and right run on every page up to the break. The line at the top appears only where the box begins, the line at the bottom only where it ends.
- In both cases rounding does not apply to any of the pieces: all pieces are completely square, even at the edges that were not cut.

### Inner margins

Only a text has inner margins. They are in the section “Inner margins (mm)”, directly in the document on the “General” tab.

| Setting | What it does | Default |
|---|---|---|
| “Top”, “Bottom”, “Left”, “Right” | The distance between the text and the edge or border of the text box, per side in millimeters. At 0 the text sits directly at the edge. Left and right make the lines narrower: the text wraps at the width of the box minus both distances. Top and bottom make the box taller. An empty field removes the value. | empty (0) |

Below the fields is “Moves the text inward from the edge/border.” with an ⓘ. On the canvas and in the PDF the distances have the same effect; the window “Edit text” indents its paper in the same way. Together with a border this creates a text box with an outline.

- A group has no inner margins. Move the objects in it away from the edge with “X (mm)” and “Y (mm)”.
- Tables have a “Cell padding (mm)” for all cells (see Data tables: The “Cells” section).
- The “Line spacing” of a text is described in Texts: Line spacing.

### Color field and color picker

You set every color through the same color field and the same color picker: for the background and border, for lines, for table colors, for the page border, in the multiple selection and for the font color in the window “Edit text”. A color can be fixed, translucent or come from a color variable.

#### The color field

| Control | What it does |
|---|---|
| Color swatch | Shows the color. If no color or an invalid color is entered, it shows a checkerboard with “∅”; with a translucent color the checkerboard shows through. If the color comes from a variable, the swatch has a blue inner ring, and the mouse pointer names the variable and what it currently gives. A click opens the window “Choose a color”. |
| Field next to it (gray “none”) | Here you type the color code; the notations are explained in the next section. Every entry takes effect immediately. Empty means: no color. Anything that is not a color code, such as “red”, puts a red frame around the field (see Invalid color). |

#### Which notations apply

A color code consists of # and three, six or eight characters from 0 to 9 and a to f (uppercase or lowercase), for example #d13438. With eight characters the last two are the opacity: #RRGGBBAA. How strictly the code is checked and what is added depends on where the color is located:

| Where the color is | What applies |
|---|---|
| Color field on an object, entered as a fixed value (background, border, line, page border, table colors) | #RRGGBB, short #RGB, with opacity #RRGGBBAA or #RGBA. The # may be missing, spaces at the edge do no harm. Anything else is not a color. |
| Color field on an object, color from a color variable | The value that the variable gives must itself be a finished code with #: #RGB, #RRGGBB or #RRGGBBAA. If the variable reads it from a field and the # is missing there, it is not added; #RGBA does not apply. Otherwise it is not a color. |
| Color of a text passage (window “Edit text”) | #RGB, #RRGGBB or #RRGGBBAA. A missing # is added, so “aabbcc” becomes #aabbcc; #RGBA does not apply. If the value gives no color, the passage keeps the color of its surroundings (see Invalid color). |
| Fixed value in a color variable (window for custom variables) | #RGB, #RRGGBB or #RRGGBBAA. When you leave the field, the window adds a missing #; the variable does not accept #RGBA. When saving, every fixed value is checked strictly (see Variables: A fixed color). |
| Template file (for developers) | As for a color field with a fixed value (see Template format: Basic rules). |

Color names such as “red” or “rot” are not known in any of these places; they count as no color. Nothing is guessed.

#### Empty color field

An empty field means: no color. What that means depends on the field:

- Background and fill color: no area.
- “Header background” in the header designer: the header background of the whole table applies again (see Cells, header row and page break: The header designer).
- Border for text, group, rectangle and shapes: no line.
- “Color” for line and arrow: black, although the field says “none”, also after “No color” in the color picker (see Colors for shapes).
- Page border: dark gray (see Page border).

#### Invalid color

A fixed value that is not a color code, such as “red” or a typo, puts a red frame around the field. The mouse pointer then says: “That is not a color code — something like #d13438 is expected. Anything that is not a color draws nothing, neither on the canvas nor in the document.” The field only marks it and changes nothing about your entry. Even a half-typed code such as “#d1” has a red frame briefly until it is complete.

On the canvas and in the PDF a color field with an invalid code draws nothing; only this field drops out: an invalid background or an invalid fill color gives no area, an invalid border no line. The other colors of the object remain. For a line and an arrow the whole shape is missing. This applies to every object, including a group and the page border. It is reported only in the PDF, when it is created, with “color '…' is not a known color code - it was treated as no color: where it is used, no fill or no line is drawn (a line or arrow is left out), and a text in that color prints black. The other colors of the element stay. Use a code like #C0392B.”

Two things apply to text:

- A single colored passage whose color gives no color keeps the color of its surroundings: that of the surrounding passage, otherwise that of the text. This applies to an invalid value as well as to a color variable without a result. The PDF reports an invalid fixed value when it is created, once per value, with “color '…' in a text passage is not a known color code - the passage keeps the color of the text around it. Use a code like #C0392B.”; it does not report a color variable or a field without a color value.
- A text as a whole turns black if its base color gives no color. Only older templates carry a base color on the whole text; the designer has no field for it (see Texts: Font, size, color and alignment).

#### The window “Choose a color”

A click on a color swatch opens the window “Choose a color”. Everything you drag or type in it you see immediately on the object; “Cancel” restores the old state.

[Image: The window “Choose a color”, a white window with rounded corners on a darkened background. At the top left the heading “Choose a color”. Below it a large color area in shades of blue: almost white at the top left, increasingly saturated blue toward the right, darkening to black toward the bottom; in the upper right half a small round dot with a white edge. Below it a rainbow bar for the hue with a round handle in the blue range and an opacity bar that begins transparent (checkered) on the left and turns into full blue on the right, with a handle at about 70 percent. In the next row a small checkered, blue-tinted square as a preview, a field with the code “#2b4cc4b3” and a field with “70 %”. Below it a button “ƒ Variable …” with the gray addition “for if-then colors”. At the bottom left the quiet button “No color”, on the right “Cancel” (white) and “Apply” (blue).]
Caption: The window “Choose a color”.
- Image marker 1: Color area: saturation (horizontal) and brightness (vertical).
- Image marker 2: Hue bar.
- Image marker 3: Opacity bar: transparent on the left, opaque on the right.
- Image marker 4: Here you type the color code and the opacity.
- Image marker 5: Binds the color to a color variable.
- Image marker 6: Close: without a color, without a change, or with the chosen color.

| Control | What it does |
|---|---|
| Color area | Clicking or dragging selects the saturation (horizontal) and the brightness (vertical). If the field had no color yet, the round dot is missing; the very first touch of the color area, the hue bar or the opacity bar sets a color, and the dot appears. |
| Hue bar | The rainbow bar sets the hue. |
| Opacity bar and number field with % | The opacity from 0 to 100 %: the bar is transparent on the left and opaque on the right; in the number field you type the value (tooltip “Opacity in %”). Below 100 % the color becomes translucent, on the canvas as in the PDF. |
| Preview | The small square shows the color that is set. |
| Field “#rrggbb” | Here you type the color code. Every readable state takes effect immediately. |
| “ƒ Variable …” with the addition “for if-then colors” | Binds the color to a color variable (see Color from a variable). |
| “No color” | Empties the field and closes the window. In the window “Edit text” it removes the color from the selection. |
| “Cancel” | Restores the color from when the window was opened and closes. Esc and a click beside the window work the same way. In the multiple selection every object gets its own color back. |
| “Apply” | Closes with the chosen color. Enter does the same (except on a button). The code is written uniformly (#rrggbb, with opacity #rrggbbaa). If an invalid value such as “red” was in the field and you do not choose a color, the field is emptied. If a color variable is chosen, the variable is saved, not its color. |

#### Color from a variable

If a color is to depend on the data, such as red for an overdue invoice, use a color variable with if-then branches (see Variables: If branches).

1. Click the color swatch.
   → The window “Choose a color” opens.
2. Click “ƒ Variable …”.
   → A menu shows the “Color variables” at the top, below them in a paler shade the “Other custom variables” and at the very bottom “New color variable …”. To the right of each variable it shows what it currently gives: a color code, if needed with the addition “(ELSE)”, or “no color”; for the other variables, which give no color, it shows their type there.
3. Choose a variable.
   → Instead of “ƒ Variable …” there is now a row with the name of the variable, “currently gives …” and the button “unlink”.
4. Click “Apply”.
   → The color is no longer fixed but comes from the variable when the document is created.

With “New color variable …” you create a new one right away: the window for custom variables opens with the type “Color”. After you save the variable, the designer inserts it and closes the color picker; with “Cancel” the color picker stays open. Close the variables window here with its buttons, not with Esc: as things stand, Esc first closes the color picker underneath (see Keyboard shortcuts: Esc in detail).

- If there is no color variable yet, the group of the other variables is called “Custom variables”. If there is no custom variable at all, above “New color variable …” it only says “No custom variable yet — create one right here.” The menu does not offer variables of a rule.
- “unlink” removes the connection; after that a fixed color applies again. Dragging in the color area or the bars and typing a color code also unlink it.
- The canvas shows the result with the sample data, the PDF with the real data. If the variable gives no color when the document is created, whatever this color was supposed to draw is missing in the PDF; the other colors of the object remain. For a line and an arrow the whole shape is missing, for the page border the border. It is not reported. A colored text passage keeps the color of its surroundings in this case (see Invalid color).
- If the variable gives no color with the sample data, the canvas shows the color under “ELSE” of the variable, provided there is a valid color there. This also applies if an if branch applies that reads, for example, an empty field. The mouse pointer on the color swatch then says “… gives no color with the sample data; the ELSE value … is shown”. In this case the PDF does not take the ELSE value as a substitute (see Full preview and PDF: What the canvas shows differently).

### What changes in the document?

**On the canvas:** You see the background and border almost as in the PDF. The border of a rectangle, group and table cell does, however, sit entirely inside (see Where the line sits). A color from a variable is resolved with the sample data; if none results, the area shows the color under “ELSE” (see Color from a variable). An invalid color code draws nothing here, too, but is not reported.

**In the PDF:** The border sits centered on the edge, half outside and half inside. Color variables are resolved with the real data; if no color results, the PDF draws nothing. An invalid color code draws nothing and is reported. If an object is split at the end of the page, each page gets its piece of the background and border (see Across several pages).

---

## Visibility

*For users · Properties of all objects · Page en/sichtbarkeit.html*

> **In short:** With a visibility rule, an object is printed only if a condition is met. Texts, images, codes, shapes, groups and tables have the setting. You build the condition in the “Visibility rule” window with the condition builder. The rule has no effect on the canvas; the “Full preview” shows whether the object is printed. Only a code, when it is hidden with the sample record, shows a pale pattern with “Hidden (visibility rule) — not printed” instead of an error: A hidden code is not checked, so its values may be empty. In the PDF a hidden object is missing, and directly in the document its space stays empty.

### The setting in the properties

A visibility rule prints an object only under a condition, for example a discount note only if there is a discount. It has nothing to do with the rules that filter and summarize lists (see Rules).

The setting is in the “General” tab under the heading “Visibility”. For groups and tables this is the case in every position. Text, image and shapes in a group or cell have no tabs; there the setting appears without a heading of its own at the end of the list, before “Actions”. A code has the “Visibility” section at the very top everywhere, above “Content”; when you double-click a GiroCode, the button “Visibility …” at the top of the window opens it as well. Which object has the setting where, and which does not, is shown in the table under Per object.

[Image: Excerpt from the “Properties” window of an image. The heading “Visibility”; below it a checked checkbox “Turn visibility rules on/off” with ⓘ; a wide white button with an arrow symbol “↳ Edit rule”; a small gray line “Rule: Bezahlt is yes”. Below that the heading “Actions” and a wide white button with a red trash can symbol and red text “Delete block”.]
Caption: The “Visibility” section of an object with a saved rule, here on the “Bezahlt” stamp of an invoice.
- Image marker 1: Turns the rule on or off.
- Image marker 2: Opens the “Visibility rule” window.
- Image marker 3: The rule in words.
- Image marker 4: The delete button is at the bottom of the “Actions” section for every object.

| Setting | What it does | Default |
|---|---|---|
| “Turn visibility rules on/off” (with ⓘ) | Turns the rule on or off. If a rule is already saved, it applies again; otherwise the “Visibility rule” window opens. What turning it off does differently from deleting, and what happens when you close the window without entering anything, is described under Turning off or deleting. | off |
| “↳ Edit rule” | Opens the “Visibility rule” window. It appears as soon as a rule is saved. | — |
| Line “Rule: …” or “Rule (disabled): …” | Shows the rule in words, for example “Rule: Amount greater than 100”; if you point at it with the mouse, it appears in formula notation. An expression written by hand that the condition builder cannot display appears unchanged as a formula. An empty rule appears as “empty”. | — |

### The “Visibility rule” window

In the “Visibility rule” window you build the condition. It opens via the checkbox or via “↳ Edit rule”. The condition is checked against the printed record on the sheet, and in a cell of a data table against the row. The field picker “Choose field” shows the whole data tree, and in such a cell additionally “Per row · …”. How the condition builder works is described under The builder.

[Image: The “Visibility rule” window. At the top left the title, at the top right the buttons “Always visible” and “✓ Done” (blue). Below them the sentence “The object is only shown when this condition is met (AND/OR, can be nested).” and the condition builder with one condition: “Rechnung › Rabatt – greater than – 0”, above it the “AND | OR” switch with an info symbol, below it the buttons “Condition” and “Subgroup”.]
Caption: The “Visibility rule” window with the rule “Rabatt greater than 0”.
- Image marker 1: Says what the rule does: The object is only shown when the condition is met.
- Image marker 2: The condition builder as everywhere; here without “ƒx”. Every entry applies immediately.
- Image marker 3: Deletes the rule together with its condition parts and closes the window, without asking.
- Image marker 4: Closes the window. There is no “Cancel”.

#### Creating a rule step by step

1. Select the object and find the setting: in the “General” tab under “Visibility”; for text, image and shapes in a group or cell at the end of the list without a heading; for a code always at the very top. Check the box “Turn visibility rules on/off” or click “↳ Edit rule”.
   → The “Visibility rule” window opens; via the checkbox only as long as there is no rule yet.
2. Build the condition in the condition builder, as in the image above: field, comparison and value.
3. Click “✓ Done”.
   → The properties show the rule in words, for example “Rule: Rabatt greater than 0”.
4. Check the result in the “Full preview”.

#### What the controls do

| Control | What it does |
|---|---|
| Sentence at the top | “The object is only shown when this condition is met (AND/OR, can be nested).” |
| Box “Written by hand — …” | Only for a condition that the condition builder cannot display (see Conditions written by hand). |
| Condition builder | The condition builder as everywhere, only without “ƒx”; you compare two numbers here via a variable of your own (see Fixed value or value from the data). Every real entry applies immediately. If the condition stays empty, the object is visible. |
| “Always visible” | At the top right. Deletes the rule (see Turning off or deleting). |
| “✓ Done” | At the top right, blue. Closes the window and redraws. A click next to the window and the Esc key do the same; if a field picker is open, Esc closes it first. |

### Turning off or deleting

A rule can be turned off or deleted. That is not the same thing.

- **The checkbox only turns it off.** If you uncheck it, a rule built with the condition builder stays saved, and the object is always printed again. The line in the properties then reads “Rule (disabled): …”. With the box checked, the rule applies again.
- **“Always visible” deletes.** The button removes the rule together with its condition parts and closes the window, without asking. This is the only way to delete a rule from the condition builder completely.
- **Without an entry, no rule is created.** Only the first entry in the condition builder creates a rule. If you check the box and close the window without entering anything, the box stays unchecked.

It is different for a rule that was not built with the condition builder, for example from an imported template: After you uncheck the box, it is gone if the condition builder cannot display it or if you have never opened the “Visibility rule” window for it. As long as the box stays checked, it keeps applying unchanged (see Conditions written by hand).

### What happens in the PDF

If the rule is not met, the object is missing in the PDF. What is different for individual objects, for example for groups and for the header and footer, is described under Per object.

- Directly in the document, the space of the hidden object stays empty. In a table cell the row can become shorter as a result.
- If a sheet contains only hidden items, the sheet is not printed. A sheet that is already empty on the canvas, for example via “Add page”, is kept (see Appending blank pages and removing pages).

### Per object

The table shows where the setting is located for which object and what is different there.

| Object | Where the setting is | What is different there |
|---|---|---|
| Text, image, codes and shapes | Directly in the document in the “General” tab under “Visibility”. In a group or cell at the end of the list without a heading of its own, before “Actions”. For a code, the “Visibility” section is at the very top everywhere, above “Content”. | An image in a grid cell does not have the section (see Images: Position, size and behavior of the image). You hide a GiroCode here where no transfer should be printed, for example on a credit note; a hidden code is not checked, and its fields may then be empty (see Barcode, QR code and GiroCode: What is checked). |
| Group | In the “General” tab under “Visibility”, in every position. | A hidden group is missing together with its content. |
| Header and footer | As with every group, in the “General” tab. | If the rule is not met, the row is missing on all pages and does not reserve any space either (see Header and footer: The settings field by field). |
| Data table | In the “General” tab under “Visibility”, in every position (see Data tables: Border, corners, guides, visibility). | The table’s rule is checked against the level on which the table stands, not against its own rows. This is how you print a line-items table only if there are line items, for example. The details are described under Conditions in a table cell. |
| Object in a cell of a data table | As for text, image, codes and shapes in a group or cell. | The rule applies to each row individually and does not find simple fields of the document. The details are described under Conditions in a table cell. |
| Free-form table | As for the data table. | A free-form table has no data rows; the rule in a cell is checked against the level on which the table stands (see Conditions in a table cell). |
| Cell of a free-form table | In the “Visibility” section of the cell’s settings (see Cells, header row and page break: Background, border and size of a cell). | If the rule is not met, the content of the cell is missing; row and column stay in place. Check in the “Full preview” whether the background and border of the cell disappear with the content. |
| Grid from older templates | None on the sheet. In a group or cell among the settings at the end of the list, before “🗑 Delete element”. | For a grid on the sheet, visibility cannot be set (see Free-form tables: Grid from older templates). |
| Page break | None. | A page break has no visibility (see Page break). |

### What changes in the document?

**On the canvas:** Visibility rules have no effect. The object is always visible, and no sign shows that it has a rule. The “Full preview” shows whether it is printed. One exception is a code: if it is hidden with the sample record, a pale pattern with “Hidden (visibility rule) — not printed” appears instead of an error.

**In the PDF:** A hidden object is missing. How this affects space, table rows and sheets is described under What happens in the PDF.

---

## Data sources and relationships

*For users · Data · Page en/quellen.html*

> **In short:** Every template prints from a primary source: the table in Dynamics for whose records the document is created, such as “Angebot”. Through relationships you reach connected records, for example the customer or the items; the designer fetches them from Dynamics itself. Additional sources bring in whole tables that are not connected to the document, such as the list of currencies. All of this is on the left in the data tree (see Data tree and field picker), and from there you drag fields into the template.

### The primary source

The primary source is the table the template prints from. Printing is always for exactly one record of this table, such as the quote on which someone clicks the button in Dynamics, or the record a flow passes on (see Buttons: the assistant). The fields and relationships the data tree offers you come from the primary source. In the “Manage data sources” window it is at the very top, with a ★ before the name. In the data tree it is the first source below “Custom variables” and “System variables”, with a ★ after the name.

You usually set the primary source when you create the template (see Creating a new template); without it, “Continue to settings →” stays blocked there. A document is also never created without a primary source.

#### Setting the primary source

1. Click “★ Set primary source”. You find the button in the “Manage data sources” window as long as there is no primary source yet, and in the “Primary source required” window.
   → The “Choose a table” window opens.
2. Type part of the table name, such as “Angebot”, and click the table.
   → The “Choose sample record” window opens.
3. Click the record you want to check the template with. You can also choose “Continue without a sample record” and add it later.
   → The designer loads the fields of the table (“Loading data source...”, then “Loading sample data...”) and reports “Source »Angebot« added.”. The source is at the very top in the “Manage data sources” window, with ★ before it, and in the data tree as the first source below “Custom variables” and “System variables”, with ★ after it.
4. If you started in the “Manage data sources” window, click “✓ Confirm” there. Then save the template.

- The source has the same name as the table in Dynamics. It cannot be renamed in the designer.
- If you close one of the two selection windows with the Esc key or a click next to it, no source is created.
- The primary source is fixed as soon as it has been created: it has no ✕ and cannot be swapped for another table. As long as you have not confirmed in the window, “Discard” takes it back (see Confirming, discarding, closing).
- If the template already has content but no primary source yet, for example after importing a template without sources, the designer then checks whether the fields in the content match the new table. If something is left open, the “Assign variables” window opens (see The “Assign variables” window).

> **Tip:** If you need the same design for another table, create a new template with the other table as its primary source and take over the content with copy and paste (see Working on the canvas: Copying, pasting and deleting). The “Assign variables” window then helps you move the fields over to the new table.

#### The “Choose a table” window

In this window you choose the table for the primary source or for an additional source.

| Control | What it does |
|---|---|
| Search box “Search… e.g. Account, Contact, Invoice” | Searches as you type in the name of the table and in its internal name. An exact hit is at the very top, then hits at the beginning of a name, then at the beginning of a word, then anywhere in the name; shorter names come first. At most 50 hits appear. When it opens, the cursor is already in the box. |
| Hit list | The name of the table in bold, its internal name in gray after it. A click chooses the table and closes the window. The tables offered are those Dynamics releases for advanced search. |
| “✕” at the top right | Closes without creating a source. A click next to the window and the Esc key do the same. |

Depending on the situation, the list says “loading tables…”, before the first input “Type to search for a table — e.g. Account, Contact, Invoice.” with the number of available tables, without hits “Nothing found.” and on an error “The tables could not be loaded. Please close the window and try again.”. If it says “(0 available)”, reload the designer; if that does not help, clarify your rights with your administrator (see Rights and roles). The designer always reads tables and fields with your sign-in and your rights.

#### The “Primary source required” window

This window opens by itself when you open a template without a primary source and when you call the full preview or the PDF while the primary source is missing. If there is no template at all yet, the “Welcome to Smart Templates” window appears instead (see Managing templates: When there is no template yet). This window says: “Every document needs a primary source — the table it is created from. Please set it now; this window can only be closed afterwards.”

[Image: A small window with the heading “Primary source required”. Below it the sentence “Every document needs a primary source — the table it is created from. Please set it now; this window can only be closed afterwards.” and a wide blue button “★ Set primary source”. There is no cross to close it.]
Caption: The “Primary source required” window: Without a primary source it sits above the designer; it can be closed only by way of the primary source.
- Image marker 1: The only button: It starts setting the primary source.

- The window has no ✕, and neither the Esc key nor a click next to it closes it. It disappears as soon as a primary source has been set.
- Its only button “★ Set primary source” starts setting it as above. If you cancel in the process, the window stays.
- This way the primary source applies immediately, without “✓ Confirm”. Then save the template.
- If the full preview or the PDF opened the window, it does not carry on by itself after you have set the source: click “Full preview” or “PDF” again. If you chose a sample record while setting it, the designer then no longer asks for one (see Full preview and PDF: Without a primary source).

### The “Manage data sources” window

In this window you set up the sources of a template: the primary source, the additional sources and the sample record. You do not create relationships and rules here; they are in the data tree (see Data tree and field picker: The data tree). You open the window in three ways:

- on the left above the data tree with “⚙ Manage data sources”,
- in the template settings in the “Data” tab with “⚙ Manage data sources”; if the primary source is still missing, the button is called “★ Set primary source” and is blue, but also opens this window (see Template settings),
- when creating a new template in step 1 with “⚙ Choose data source …”; if the primary source is already set, the button is called “⚙ Manage data sources — Primary source: …”, with additional sources with the suffix “· … more”.

The window opens over a window that is already open, such as the template settings. On the left are the sources, on the right the record from Dynamics, at the bottom the buttons for confirming and discarding.

[Image: The “Manage data sources” window. At the top left the title, at the top right the button “Close”. On the left a narrow column with two sources: “★ Rechnung” in blue on a light blue background, below it in gray “invoice · Example: RE-2026-000142”, and “Eigene Firma (Absender)” with “organization · List (all rows, at most 50 on the canvas)” and a red cross in a small frame. Below it the button “Additional source” with a database symbol and the note “The primary source is fixed. Every additional source is a list, not a single record.” with an info sign. On the right a header bar with “Rechnung”, “Sample record: RE-2026-000142” and the buttons “Choose another record”, “Remove” and “↗ Open in Dynamics”; below it a large, empty white area. At the bottom left “No changes”, at the bottom right the buttons “Discard” and “✓ Confirm” (blue).]
Caption: The “Manage data sources” window with the primary source “Rechnung” and the additional source “Eigene Firma (Absender)”. The frame on the right is left empty here; in Dynamics it shows the page of the record.
- Image marker 1: The primary source, with ★ before the name. Below it the internal name of the table and the sample record.
- Image marker 2: The ✕ exists only on additional sources. It removes the source after a confirmation question.
- Image marker 3: Adds an additional source: a whole table that is loaded as a list.
- Image marker 4: Header bar of the chosen source: name, sample record and the buttons for choosing, removing and opening in Dynamics.
- Image marker 5: The frame. In Dynamics it shows the real page of the record; here it is left empty.
- Image marker 6: On the left the state of the changes, on the right “Discard” and “✓ Confirm”. Only “✓ Confirm” takes the sources over into the template.

#### On the left: the sources

| Control | What it does |
|---|---|
| “★ Set primary source” | Blue, only as long as there is no primary source. Above it it says “No primary source yet. Choose the table this template prints from — fields and relationships then come from Dynamics.”. The button starts setting it (see above). |
| Row of a source | The name of the source in bold, for the primary source with ★ before it. Below it, in gray, the internal name of the table and a suffix. For the primary source this is “Example: …” with the name of the sample record, “Example: without a name · …” with the first eight characters of its identifier if it has no name, or “no sample record”; in case of a fault, “⚠ Record missing” or “⚠ could not be read (…)” is added in red (see below). For an additional source it says “List (all rows, at most 50 on the canvas)”. A click on the row shows the source in the right half; when it opens, the primary source is chosen. |
| “✕” in the row | Red, only on additional sources. Removes the source after a confirmation question (see Removing an additional source). |
| “Additional source” | Button with a database symbol below the list, as soon as there is a primary source. Adds an additional source (see Additional sources). |
| Note with ⓘ | “The primary source is fixed. Every additional source is a list, not a single record.” The ⓘ explains how you get values from an additional source. |

#### On the right: the record from Dynamics

The right half shows the source that is chosen on the left. If there is no source yet, it says “Choose a data source on the left — its record from Dynamics will appear here.”.

| Control | What it does |
|---|---|
| Header bar | The name of the source, for an additional source with “· List”. Next to it, for an additional source, it says “This source prints ALL rows of the table.”, for the primary source “Sample record: …” with its name, where applicable with “⚠ no longer exists in Dynamics” or “⚠ could not be read (…)”. If the sample record is missing, it says “No sample record — the records of »…« are listed below — choose one.”. You can choose only with the button “Choose record”, not in the frame below it. |
| “Choose record” or “Choose another record” | Only for the primary source. Opens the “Choose sample record” window (see below). After the choice, the designer rebuilds the sample data and reports “Sample record set: …”. A cancel or “Continue without a sample record” change nothing. The record is saved with the template; the choice therefore counts as a change and applies only with “✓ Confirm”. |
| “Remove” | Only for the primary source with a sample record. Takes it out of the template without a confirmation question and rebuilds the sample data (“Resetting sample data...”); the additional sources stay loaded. This changes nothing about the document that is printed in Dynamics. “Discard” brings it back. |
| “↗ Open in Dynamics” | For every source. Opens the same page as the frame in a browser tab of its own, for example when the frame shows nothing. |
| Frame with the page from Dynamics | Shows the form of the sample record; without a sample record and for an additional source, the list of the table, in each case without the navigation bar of Dynamics. The frame shows the real page from Dynamics and is for viewing. The template does not change through anything you do in it. |

#### Confirming, discarding, closing

What you change in the window you see in the data tree immediately. But it is taken over into the template only with “✓ Confirm”, and stored in Dynamics only with “Save” in the template row (see Managing templates: The template row). Therefore close the window with “✓ Confirm”, not with “Close”: If there are unconfirmed changes, the designer otherwise asks “Leave this window?”, and with “Leave and discard” they are gone, also a primary source you have just set.

| Control | What it does |
|---|---|
| “No changes” or “● Unconfirmed changes” | At the bottom left. Compares the sources with the state when the window was opened or after the last “Discard”. |
| “Discard” | Without a change, the designer reports “There is nothing to discard.”. Otherwise it asks “Discard all changes to the data sources?” with “Cancel” and “Discard”. Afterwards the sources are as when opened, the sample data is reloaded, and it reports “Reset.”. The window stays open. |
| “✓ Confirm” | Takes the sources over into the template and closes the window. The designer reports “Data sources applied — press »Save« to store them in Dynamics.” or “No changes.”. Everything you changed in the window is then a single step for Ctrl+Z (see Working on the canvas: Undo and redo). |
| “Close” at the top right, Esc key | Without a change, the window closes immediately. With a change, the designer asks in the “Leave this window?” window: “You have changes to the data sources that have not been confirmed yet. Leave anyway? The changes will be lost.” “Leave and discard” resets the sources and closes; “Back”, the Esc key or a click next to it lead back into the window. A click next to the window itself does not close it. |

> **Good to know:** If you opened the window from the template settings, the confirmed work on the sources belongs to their state: “Apply” there keeps it, “Cancel” and then “Discard” take it back too (see Template settings).
>
> When creating a new template, the message after “✓ Confirm” also says “Save”. But there you cannot save yet; you carry on with “Continue to settings →” and “Create template” (see Creating a new template).

### The sample record

The sample record is a real record of the primary source, such as a particular quote. You check the template with it: The full preview and the PDF from the designer show its values. On the canvas, by contrast, fields appear as a blue marker with their name. What is printed in Dynamics is the record for which a button or a flow prints: the record on whose page the button is clicked, in a list the checked rows, and if the button sits on another table, the record at the end of its path (see Buttons: the assistant); for a flow, the record it passes on. How the full preview differs from printing in Dynamics is described under Full preview and PDF: Full preview and printing in Dynamics.

- In the background the canvas calculates with the data of the sample record, for example for images from data fields, for the version of a text that it shows (see Texts: Content depending on a condition), for the image an image rule chooses (see Images), for the results of rules and for the preview in the window of a variable.
- When keeping warm, Smart Templates creates its test documents with this record; if it is missing, with any record of the table (see Template settings).
- The sample record is saved with the template. Only the primary source has one; an additional source is a list.
- If none is saved, the designer asks for one before every full preview and every PDF. If you choose one there, it is saved and stored with the template (see Full preview and PDF: What is checked before creating). In the template settings there is the note “Without a saved record, the designer asks for one before every full preview and every PDF.”

1. Open “Manage data sources”, choose the primary source on the left and click “Choose record” or “Choose another record” on the right.
2. In the “Choose sample record” window, find the record and click its row.
   → The designer shows “Loading sample data...” and then reports “Sample record set: …”.
3. Click “✓ Confirm” and save the template.

The same works in the template settings in the “Data” tab, section “Sample record”, with “Choose sample record” or “Choose another sample record”, “↗ Open in Dynamics” and “Remove” (see Template settings). The buttons work like the corresponding ones in the “Manage data sources” window (see On the right: the record from Dynamics); you take a change back there with “Cancel” and “Discard”.

> **Tip:** Check your template with several sample records: a customer with a long name, a quote with many items, a record in which fields are empty. That way you see whether everything fits before others print with it.

#### The “Choose sample record” window

The window is called “Choose sample record · …” with the name of the source. It opens through the buttons above, when setting the primary source and by itself before the full preview and the PDF if no sample record is saved or the saved one has been deleted in Dynamics. The records appear as a table with the columns of a view from Dynamics.

[Image: The “Choose sample record · Rechnung” window. At the top a wide search box with the placeholder “Search…”. Below it “View:” with a selection list “Meine aktiven Rechnungen (personal view)” and, next to it on the right, the display “5 columns”. Below that a wide button “Continue without a sample record”. Below it a table with the columns “Rechnungsnummer”, “Name”, “Gesamtbetrag” (right-aligned), “Fällig am” and “Statusgrund” and four rows. The first row reads “RE-2026-000142 · Beratung Dynamics 365 · 4444.65 · 2026-07-11 · Offen”; the invoice numbers are in bold.]
Caption: Choosing the sample record: The view determines the columns, a click on a row saves the record.
- Image marker 1: Searches shortly after the last keystroke in the text columns of the view shown.
- Image marker 2: The views of the table from Dynamics. The view determines the columns and the search columns.
- Image marker 3: How many columns the view has; at most eight are shown.
- Image marker 4: Closes the window without a choice.
- Image marker 5: The records. A click on a row saves this record.

| Control | What it does | Default |
|---|---|---|
| Search box “Search…” | Searches shortly after the last keystroke in all text columns of the view shown; a hit must contain the search text. If the view shows no text column, the name is searched. The % character stands for any characters. | empty; the cursor is in the box |
| “View:” | The views of the table from Dynamics. First your own views with the suffix “(personal view)”, then the default view, the other main views and last the Quick Find view with “(Quick Find)”, within these groups in alphabetical order. The view determines the columns of the table and the columns that are searched. The designer cannot find out which view you last used in Dynamics; that is why you choose here. If Dynamics returns no list of views, the selection is missing together with “View:”; the window then picks a view of the table itself or shows only the name. | the first view in the list |
| Display next to the view | “loading…”, “loading view…”, then for example “5 columns” or “8 of 33 columns”; without columns “no columns — name only”. At most the first eight columns of the view are shown; columns that a view fetches from a linked table are not shown by the window. When you point at it with the mouse, the display gives the name of the view. | – |
| “Continue without a sample record” | Closes the window without a choice. When setting the primary source, the source is then created without a sample record; before the full preview and the PDF, the document carries on without a new record; otherwise everything stays as it was. | – |
| Table of records | The columns of the view; if the view does not show the name, a “Name” column is added at the front. Sorted by name, numbers and amounts right-aligned. A click on a row saves the record. With the Tab key you can also reach the rows by keyboard; the Enter key or the Space bar chooses. If the record has no name, the name column says “(no name)”, and the first filled-in value of the row becomes its label. It is always fetched by its internal identifier. | – |
| Close | With the Esc key or a click next to the window; there is no ✕ here. Nothing changes: When setting the primary source, no source is created, and before the full preview and the PDF no document is created, without a further message. | – |

Below the view it says, depending on the situation, “loading…”, “No records found.” or, in red, “The records could not be loaded with this view. Choose a different view above.” (without a list of views: “The records could not be loaded.”). The window shows at most 50 records. If there are more, it says below “There are more than 50 hits — the first 50 are shown. Search more precisely if your record is not among them.”

#### When the sample record is missing or cannot be read

The designer fetches the sample record from Dynamics anew every time the sample data is loaded. It distinguishes two cases:

| Case | What you see | What happens |
|---|---|---|
| The record was deleted in Dynamics. | In the list of sources, in red “⚠ Record missing”, on the right in the header “⚠ no longer exists in Dynamics”. In the template settings, after the name it says “— no longer exists in Dynamics” and below it in red “This record was deleted in Dynamics or can no longer be read. The canvas therefore shows no sample values — please choose another one.” | The full preview and the PDF ask for another record before every call. Choose another record. If you only take the old one out with “Remove”, the designer still asks for one before every full preview and every PDF; “Continue without a sample record” then delivers a document with empty fields instead of an error message. If the deleted record stays saved, “Continue without a sample record”, by contrast, creates no document: The error message says in English that the record was not found (see Full preview and PDF: Without a sample record). |
| Dynamics did not deliver it just now, for example because you lack the read permission or the fetch failed. | “⚠ could not be read (no read permission)” or “(fetch failed)”, once the message “⚠ The sample record »…« could not be read …”, in the template settings in red “Dynamics did not deliver this record just now (…) — it was NOT deleted. …” | The record stays saved. The full preview and the PDF do not ask for another one but create the document with it. If you lack the read permission, the document is then aborted with an English message that begins with “NO ACCESS” (see Rights and roles: When a right is missing). The next time the sample data is loaded, for example when you reopen the template, the designer tries again. |

The notes say that the canvas shows no sample values. Fields appear on the canvas as markers with their name anyway; what is affected is what the canvas calculates in the background with the sample data, such as images from data fields.

### Additional sources

An additional source brings in a whole table from Dynamics that is not connected to the record being printed: for example the currencies, the bank details of your company or a table of text modules. Unlike the primary source, an additional source is always a list, never a single record. For connected records, such as the customer of a quote, you do not need an additional source; you reach them through relationships.

1. Open “Manage data sources” and click “Additional source” on the left below the sources.
2. In the “Choose a table” window, find the table and click it.
   → The designer does not ask for a sample record here. First it asks in the “Additional data source without a condition” window whether it should load sample rows (see below). Then it reports “Source »…« added.”; the source is in the list on the left and in the data tree.
3. Click “✓ Confirm” and save the template.

The designer does not check whether the same table is already there as a source. Create each table only once as an additional source.

#### The question “Additional data source without a condition”

Before the canvas fetches rows of an additional source without a rule, it asks: when creating it, when opening the template and when it rebuilds the sample data, but only once per table until you reload the page. The window explains: A rule can shorten the result with a filter or with “The first N”; this cannot reduce what is loaded, because for the printed document an additional source is always loaded in full (see What the canvas loads and what is printed).

| Button | What it does |
|---|---|
| “Load preview” | Fetches at most 50 rows for the canvas, in the same order as printing. If there are more, the designer reports once “Preview: of »…« the canvas shows at most 50 rows. All are printed — up to the upper limit that the document reports when it is reached.”. If loading fails, it reports “⚠ The preview of the source »…« failed — the canvas shows no rows there, the printed document does. …” |
| “Don't load”; likewise the Esc key and a click next to the window | The preview of this source stays empty on the canvas until you reload the page or attach a rule to the source. After reloading, the designer asks again; with a rule, the preview comes the next time the sample data is loaded. The source is printed anyway. The designer reports “Preview: »…« is not loaded because of your answer — …”. |

If a rule is attached to the source, the canvas does not ask. The preview then comes the next time the sample data is loaded, for example when you choose another sample record.

#### Getting values from an additional source

- **A particular record:** In the data tree, click “ƒ” on the header of the source and create a rule. Filter in it, for example “Code is EUR”, and in the “Selection” tab check “Keep only specific records”; “Only the first” is then preselected (see Rules). You then drag the fields of this rule into the template like any other field.
- **As a table:** Drag a rule on the source onto the page, or take it as the row source of a data table (see Data tables: The row source). The source itself is not available for choosing there.
- **Sum, count and the like:** In conditions, the fields of an additional source offer sum, count and the like over all their rows (see Conditions: Sum, count and so on over a list).

> **Caution:** Fields directly under the source carry the suffix “first value” in the data tree (see Data tree and field picker: What the badges and suffixes mean). If you drag one into a text, the value from the first row of the unfiltered list is printed, sorted by the internal identifier, so not a particular record. You get a particular record only through a rule as described above.

- Lists (1:N) under an additional source cannot be dragged onto the page: They belong to each individual row of the source. A table on the source always sits on a rule on the source itself.
- An additional source is always loaded in full when printing, even if a rule filters it; use tables with a manageable number of records for this (see What the canvas loads and what is printed).

#### Removing an additional source

The red “✕” in its row (“Remove this data source”) asks for confirmation: “Really delete the source »…«? Its rules go with it. Tables and fields that point to this source or its rules stay empty afterwards.” With “Delete” the source disappears together with its rules, and the sample data is rebuilt (“Removing data source...”); “Cancel” leaves it. Like every change in the window, this applies only with “✓ Confirm”; “Discard” brings the source back. The primary source cannot be removed.

> **Caution:** A table on the removed source or on one of its rules then prints only its header row; the feedback on the document reports this as a warning (see Problems and messages: Notes and warnings). Fields from it, by contrast, stay empty without any message. Therefore first remove the tables and fields that use the source.

### Relationships

Under each source in the data tree are its fields and its relationships to other tables. You do not have to create relationships; the designer fetches them from Dynamics itself. There are two kinds:

| Badge | What it is | Example |
|---|---|---|
| “N:1” (blue) | A lookup to exactly one record. You insert its fields like the source’s own. | from the quote to the currency, the customer or the owner |
| “1:N” (violet) | A list of records. A data table is made from it. You show sums and counts as a one-row table on a rule (see Rules) or with a custom variable (see Variables). | from the quote to its items |

- The name of a relationship gives first the table it leads to, after it the field that connects the two, such as “Angebotsposition · Angebot”. That way you can also tell several relationships to the same table apart. The search also finds a relationship by its internal name.
- A relationship loads its fields only when you expand it (see Data tree and field picker: Expanding, loading, depth).
- Relationships can be expanded one after another, for example from the quote to the item and on to the product. Printing goes down to the sixth level; the data tree offers nothing deeper.
- A lookup field such as “Currency” appears in the data tree as “Currency (Name)” with the badge “Abc”: It prints the name of the record it points to. Next to it is “Currency (ID)” with the internal identifier of this record. For all other fields of the record, expand the relationship of the same name. For some lookups Dynamics keeps no name, such as “Owner (User)” and “Owner (Team)”. There only “… (ID)” appears; you insert the name from the relationship of the same name.
- Relationships with many records on both sides (N:N) are not offered by the designer.
- A new data table always sits on a rule. If you drag a list onto the page, the designer therefore first creates a rule (see Data tree and field picker: Clicking and dragging).
- A relationship costs no query of its own when printing; more on this under How the document fetches the data.

The data tree itself has a page of its own: structure, search, expanding and dragging, the badges and suffixes and the field picker in conditions are described under Data tree and field picker.

### The “Assign variables” window

Fields in an inserted excerpt still point to where they come from. The “Assign variables” window asks you once what they should point to here. “Variables” here means all fields and custom variables in the excerpt. The window writes nothing into the template until you apply.

[Image: The “Assign variables” window. At the top a sentence: “The inserted excerpt comes from »Auftragsbestätigung« and still points to the fields from there. Here you decide what it should point to in this template. Whatever stays open is removed from the text when you apply.” with an info sign. Below it the group “Document” with the note “Fields without a table” and five rows, each with a type badge, the field name, an arrow, a target field and a label: “Name → Name” with the green label “assigned”, “Bestellnummer → — choose —” with the gray label “will be removed”, “Ort → Ort” (green), “Statusgrund → Statusgrund” with the violet badge “Selection” (green) and “Rabatt (%) → Rabatt (%)” with the badge “?”, a yellow label “check” and a button with a check mark next to it. Below it the table “salesorder_details_Regel” with “Rows from:”, an info sign, the button “— choose —” and the gray label “stays empty”, the sentence “Without a row source this table stays empty — including the fields below it.” and two field rows “Beschreibung” and “Menge”, whose button “— choose —” is pale and disabled, each with the gray label “will be removed”. At the bottom left the button “Remove variables” in red text, next to it the sentence “3 assigned · 4 will be removed (1 of them unchecked) · 1 table without rows”, on the right “Cancel” and the blue button “Apply”.]
Caption: The “Assign variables” window after pasting an excerpt from another template: green is assigned, gray is removed or stays empty, yellow needs to be checked.
- Image marker 1: Names the reason: where the excerpt comes from and that anything left open is removed from the text when you apply.
- Image marker 2: Green: The internal name and the type match. The designer found the target itself.
- Image marker 3: Gray: Nothing was found. The place is removed from the text when you apply.
- Image marker 4: Yellow: The name matches, the type could not be confirmed. Only a click on ✓ counts as done.
- Image marker 5: A table needs a row source. Without one it stays with its header row and design but empty; the label “stays empty” shows this.
- Image marker 6: On the left “Remove variables”, in the middle the counting line, on the right “Cancel” and “Apply”.

#### When it appears

| Occasion | Title of the window |
|---|---|
| You paste an excerpt from another template with Ctrl+V, also several objects at once or in the group designer. | “Assign variables” |
| You set the primary source of a template that already has content. Its custom variables are checked too. | “Assign variables” |
| You paste an excerpt into another table row of the same template. | “Variables are leaving their row” |
| In the “Edit text” window you paste copied text into another row. Here the designer asks before it pastes. | “Variables are leaving their row” |
| All the fields match, but the excerpt uses custom variables that do not exist in this template. | “Custom variables are missing here” |
| In the properties of a data table you change the row source and keep the columns (see Data tables: Changing the row source). | “Assign the columns to the new row source” |

The window appears only if, after the designer’s suggestions, something is left open. Otherwise it reports “The variable fits here — nothing to assign.”, “All … variables fit here — nothing to assign.” or “The columns match the new row source — nothing to assign.”; in the “Edit text” window the text is then pasted without a message.

#### What is in the window

- **At the top** a sentence that names the reason, such as “The inserted excerpt comes from »…« and still points to the fields from there. …”, with an ⓘ. If you pasted into a table row, it is followed by “Pasted into: »…« — this row is fixed and is not asked about.”
- **The box “Custom variables that do not exist in this template”**, if the excerpt uses such variables. It explains: “Custom variables belong to the TEMPLATE, not to the data source …”. For each @variable you choose in a selection list. Preselected is “take along — create here (…)” with its type. If its definition did not come along, “take along — create empty (the definition was not copied)” appears there instead. In addition, for each custom variable of this template there are “point to »@…«” and “nothing — remove from the text when applying”.
- **“Document”** with the gray note “Fields without a table”: the fields outside tables.
- **One indented header per table** with its name and “Rows from:”. The button next to it shows the chosen row source or “— choose —” and opens the “Row source for »…«” window. A table in a table cell shows “— outer table first —”; it can be assigned only once the outer one is fixed. Without a row source it says below it “Without a row source this table stays empty — including the fields below it.”
- **One row per field**: badge (or “?” if the type is unknown at the origin), the field name and after it a button with the chosen target or “— choose —”. It opens the “Field for »…«” window and is disabled as long as the table lacks its row source. A field that appears in several places is only one row and one decision; when you point at the name with the mouse, you see in how many places it occurs. If you choose a field of another type, the designer warns: “»…« is …, the original field was …. Assigned — please check the result.”

On the right in each row a label shows what happens when you apply:

| Label | Meaning |
|---|---|
| “fixed” (blue) | The row you pasted into. It is the location, not an assignment, and is not asked about. |
| “assigned” (green) | The internal name and the type match, or you chose or confirmed the target yourself. |
| “check” (yellow) with “✓” | The name matches, the type could not be confirmed. This does not count as done: A click on “✓” confirms the suggestion, otherwise the place is removed when you apply. |
| “will be removed” (gray) | Nothing was found. The place is removed from the text when you apply. |
| “stays empty” (gray, on a table) | The table has no row source. It stays with its header row and design, only without data rows. |

At the bottom a line adds up, for example “3 assigned · 2 will be removed (1 of them unchecked) · 1 table without rows”; for custom variables it is preceded by how many are taken along, re-pointed or removed.

#### The “Row source for …” and “Field for …” windows

Both windows show the familiar data tree (see Data tree and field picker: What is in the tree), but without custom variables and system variables; nothing can be dragged in them. If you close them with ✕, the Esc key or a click next to them, nothing changes.

- **Row source:** As in the “Choose the row source of the table” window, the tree shows only relationships and rules, has the same search box and, on lists (1:N) and rules, the small button “choose” (see Data tables: The “Choose the row source of the table” window). Here the current choice is also highlighted, and under an additional source the button exists only on the rules of the source itself. A rule can be used immediately. If you choose a list, the designer creates a rule for it and opens “Edit rule”; if you cancel there, nothing is left behind. The rule costs a query of its own only if its filter already takes effect when loading; the explanatory text in the window says this too (see How the document fetches the data). A lookup (N:1) is not available for choosing, but you can go on through it. If the table is in a table cell, the lists offered apply within a row of the outer table.
- **Rule with a single selection:** If a rule has the selection “Only the first”, “Only the last” or “The one at a specific position”, the designer warns before the choice, as for a data table, in the “This rule returns only one record” window (“Cancel” / “Use it anyway”): As a row source, the table prints no row in the PDF, but the canvas still shows the sample row (the reason is described under Rules: Keeping specific records).
- **Field:** The tree shows the fields, with the search box “🔍 Search fields & relationships…”. In a table the fields apply within one of its rows, and the tree is structured as in the “Choose a field of this row” window (see Data tree and field picker: The “Choose a field of this row” window). On the right, on fields under a list, you choose what becomes of them, as in conditions (see Conditions: Sum, count and so on over a list).
- **Below the tree** a button clears the choice: “— no row source —” (the table stays without data rows) or “— assign no field —” (the place is removed when you apply).

#### Applying, removing or canceling

| Button | What it does |
|---|---|
| “Assign all” or “Apply” | Blue, on the right. It is called “Assign all” if nothing is removed, every table has a row source and the excerpt brings no custom variables that do not exist here; otherwise “Apply”. Enters all confirmed assignments. What is open and unchecked is removed from the texts, a table without a row source stays without data rows. If there are unchecked suggestions, the designer first asks in the “Unchecked suggestions” window with their list (“Back” / “Apply anyway”). |
| “Remove variables” | Red, on the left. Removes all variables from the texts and detaches the tables from their row source, after a confirmation question that counts the places concerned (“Cancel” / “Remove”). A table does not become empty as a result, but prints one row that is bound to the main record; you set the row source anew by hand afterwards. Page number, date, user and formulas in the text stay. Conditions, sort orders and the origin of images also stay and then point to nothing; the designer names them. |
| “Cancel” or “Insert unchanged”, Esc key, click next to the window | Leaves everything as it is; the fields keep pointing to their origin. The designer reports, for example, “Nothing assigned — the pasted content still points to the old fields.”. In the “Edit text” window the button is called “Insert unchanged”: The text is pasted with the old variables (“Inserted unchanged — the variables still point to the old row.”). |

After “Apply” or “Remove variables”, the “What happened” window shows what was entered, removed and left standing, with a number per group: “Zugeordnet”, “Zeilenquellen”, “Neue Regeln”, “Bildherkunft mitgezogen”, “Gleich geblieben”, “Aus den Texten entfernt”, “Tabellen ohne Zeilenquelle”, “⚠ Bleibt stehen und zeigt ins Leere” and “⚠ Nicht zugeordnet”. Only groups with content appear; when you point at a row with the mouse, you see the exact path. “Got it”, the Esc key or a click next to it close the window. If there was nothing to do, the designer only reports “Nothing to do — there were no data references.”

> **Caution:** What is under “⚠ Bleibt stehen und zeigt ins Leere” you check yourself: A condition whose field is missing, depending on how it is worded, never or always applies, and such a filter may let all rows through. Replace the field there by hand.

### What the canvas loads and what is printed

To keep the designer fluid, the canvas loads only an excerpt of the data. The document loads everything it needs for printing as soon as it is created for a real record. Without a sample record, the full preview and the PDF from the designer show only what the canvas has loaded (see Full preview and PDF: Without a sample record).

|   | Canvas | Full preview and PDF |
|---|---|---|
| Primary source | the sample record | from the designer the sample record; through a button or flow the record being printed |
| Lookup (N:1), such as the opportunity of a quote | the linked record of the sample record, as soon as the template uses one of its fields (in a condition, a custom variable, an image, the currency) or you expand the relationship in the data tree; only with a sample record | always the linked record |
| List (1:N), such as the items | at most 20 rows, only with a sample record | all rows; a filter in the rule of the list can already shorten loading if nothing else needs the whole list |
| Additional source | at most 50 rows, without a rule only after a question | the whole table is loaded, even if a rule filters; the rule only afterwards shortens what is printed |
| Relationships one after another | down to the sixth level | down to the sixth level |

If a list has more rows than the canvas loads, the canvas says so once (see Data tree and field picker: Expanding, loading, depth). Where the canvas calculates with sample data, such as in rules, sums, “The first N” and conditions and in the preview in the window of a variable, it then calculates only with these rows. The correct numbers are shown by the full preview and the PDF.

Other limits: The table choice shows at most 50 hits, the choice of the sample record at most 50 records with at most eight columns.

> **Good to know:** The document also has an upper limit that should not come into play in everyday use: 20,000 rows per query and 90 seconds for loading. If one of them is reached, loading stops there, and the feedback on the document reports it as a warning (see Problems and messages: Notes and warnings). Sums and counts over this list are then not correct. For a list such as the items, a filter in its rule that already takes effect when loading helps, for example “Quantity greater than 0”; not every filter takes effect when loading (see Rules). This helps only as long as nothing else needs the whole list, such as a sum over all items in a text (see How the document fetches the data). For an additional source no filter helps, because it is always loaded in full; there only a table with fewer records helps.

#### How the document fetches the data

When printing, the document fetches the data in queries to Dynamics. You usually do not notice this; but it explains why relationships cost nothing and additional sources do:

- Queries arise per source and per rule on a list whose filter already takes effect when loading (see Rules), at most one per rule. Every other rule, including every rule directly on a source, calculates over rows that are loaded anyway and costs no query of its own. The document loads the whole list only if something needs it unfiltered: the template itself, such as a sum over all items in a text, a rule without such a filter or a rule outside the list, such as on the invoice, that calculates over all rows of the list. If only rules with such a filter need the list, each of them fetches only its own rows. A rule that nothing in the template points to is not calculated by the document at all.
- A relationship costs no query of its own: Connected records, lookups as well as lists, are fetched by the document in the same query.
- A further query otherwise begins only if a query would become too large or hit a limit of Dynamics: with more than four lists in a row, such as quote › items › batches › …; as soon as two lists side by side would come into the same query, such as the items and the contacts of the customer, because together they would produce every combination of the two lists; and with more than ten links in a query.
- The document never asks for each record individually.
- How many queries there are in the end also depends on the data.

### What changes in the document?

**On the canvas:** Fields appear as a blue marker with their name, not with their value, and data tables show a sample row. The sample record still has an indirect effect: Images from data fields show its image, and for texts with versions and for image rules, what is seen depends on its values. Sources, relationships and rules themselves you see only in the data tree.

**In the PDF:** Each field shows the value of the record being printed for, from the designer that of the sample record. Each data table shows all rows of its rule, and additional sources are loaded in full.

---

## Data tree and field picker

*For users · Data · Page en/datenbaum.html*

> **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.

[Image: Excerpt of the left column of the designer. At the top the heading “Data” with the sentence “Drag a field into a text box or onto a text element.”, below it the button “⚙ Manage data sources” and the search box “Search fields & relationships…”. Then follow the collapsed entries “Custom variables” (with an @ sign) and “System variables”, then the expanded source “Rechnung ★” with an ƒ sign and an info sign and its own search box “Search in »Rechnung ★«…”. Below it the fields in alphabetical order, each with a colored badge: “Yes/No” Bezahlt, “Date” Fälligkeitsdatum, “123” Gesamtbetrag (on the right “Decimals: currency”), “Date” Leistungsdatum, “123” Rabatt (%) (on the right “2 decimals”), “Date” Rechnungsdatum, “Abc” Rechnungsnummer and “Selection” Statusgrund. After that the collapsed relationship “N:1 Firma · Kunde” and the expanded relationship “1:N Rechnungsposition · Rechnung” with its own search box and five fields (Einheit, Einzelpreis, Gesamt, Menge, Pos.-Nr.), which carry the suffix “per row” on the right. Below them two collapsed sub-relationships (“N:1 Produkt · Produkt”, “1:N Charge · Rechnungsposition”) and the collapsed rule “ƒ Charge · Chargenliste” with a gear; then two collapsed rules “ƒ Rechnungsposition · Positionen” and “ƒ Rechnungsposition · Kennzahlen”, also with a gear, and at the very bottom the collapsed additional source “Eigene Firma (Absender)” with ƒ and an info sign.]
Caption: The data tree on the left in the designer: the primary source “Rechnung” with its fields, a lookup (N:1), a list (1:N), rules (ƒ) and an additional source.
- Image marker 1: Opens the “Manage data sources” window.
- Image marker 2: Header of the primary source. The ★ marks it; ƒ creates a rule directly on this source, the info sign explains it.
- Image marker 3: A field: badge (here “123” for a number or amount), name and, on the right, a suffix, here where the decimal places come from.
- Image marker 4: N:1 relationship (blue): a lookup to exactly one record. You insert its fields like the source’s own.
- Image marker 5: 1:N relationship (violet): a list, here the invoice items. Its fields carry the suffix “per row”.
- Image marker 6: A 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

[Image: The “Choose field” window with a × at the top right. Below it a search box with the placeholder “Search all fields …”. Below that a list: the collapsed entry “Custom variables” with an @ sign on the right, then the expanded source “Rechnung ★” with an ƒ sign and an info sign, its own search box “Search in »Rechnung ★«…” and the fields in alphabetical order: “123 Betrag” (“Decimals: currency”), “Yes/No Bezahlt”, “Abc Land”, “123 Rabatt” (“2 decimals”), “Abc Rechnungsnummer”, “Abc USt-IdNr.” and the collapsed relationship “1:N Rechnungsposition · Rechnung”.]
Caption: The field picker: A click on a field chooses it and closes the window.
- Image marker 1: Closes without a choice. A click next to the window and the Esc key do the same.
- Image marker 2: Has the focus when opened and filters the tree as you type.
- Image marker 3: “Custom variables” is always at the very top.
- Image marker 4: Each source is a category of its own; ★ marks the primary source, ƒ creates a rule.
- Image marker 5: A 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.

---

## Conditions

*For users · Data · Page en/bedingungen.html*

> **In short:** A condition decides whether something applies: whether an object is printed, which image or text appears, which rows a rule keeps, what value a variable or a template setting gets or which email template a button uses. It is built everywhere with the same builder: choose a field, choose a comparison, enter a value and combine several conditions with AND or OR. Only the versions of a text have a simpler input of their own. On the canvas, conditions take effect only in part; what is printed is shown by the full preview and the PDF. The fields you choose in a condition come from the field picker; it is described under Data tree and field picker.

### The builder

The builder is a group of conditions. In the header of the group you set how the conditions work together. Below it there is one condition per row, a small sentence made of field, comparison and value, such as “Rabatt greater than 0”. At the bottom of the group you add further conditions or a subgroup. A new builder begins with an empty condition in an AND group.

[Image: The builder for conditions: a group in a light gray frame. At the top left the switch with the two halves “AND” (blue, selected) and “OR”, next to it an info sign. Below it two conditions, each in a white box: at the top a wide button with the field and a small arrow, “Rechnung › Rabatt” and “Rechnung › Betrag”, below it a selection list “greater than” and a value box with “0” and “100”. At the top right of each box a gray cross. At the bottom of the group two buttons “Condition” and “Subgroup”.]
Caption: The builder with two conditions joined by “AND”: “Rabatt greater than 0” and “Betrag greater than 100”.
- Image marker 1: Sets whether all conditions of the group must be met (“AND”) or one is enough (“OR”).
- Image marker 2: Opens the field picker. Afterwards the button shows the chosen field.
- Image marker 3: The comparison. Which comparisons there are depends on the kind of the field.
- Image marker 4: The value that is compared with.
- Image marker 5: Removes the condition without a confirmation question.
- Image marker 6: “Condition” appends an empty condition, “Subgroup” an offset subgroup.

1. In the empty condition, click “Choose field …”.
   → A field picker opens. Which one it is depends on where you are (see Data tree and field picker: The field picker).
2. Click the field, such as “Rabatt”.
   → The field picker closes. The button now shows the field, below it a selection list with the comparisons that fit this field, and the input box “Value”.
3. Choose the comparison, such as “greater than”, and enter the value, such as 0.
4. For a second condition, click “Condition” at the bottom of the group and build it the same way. In the header you use “AND” or “OR” to set whether all of them or only one must be met. If the group has only one condition, the button is called “Another condition” in the window of a variable and in the windows that also use it (“Wenn-Dann für …” on an entry of the e-invoice, “Wert für …” for barcode, QR code, GiroCode and in a step of a button); the switch and “Subgroup” appear there only with the second condition.

| Setting | What it does | Default |
|---|---|---|
| “AND” \| “OR” | In the header of every group, even if it has only one condition; only in the window of a variable and the windows that also use it, from the second condition on. Sets whether all conditions and subgroups of the group must be met or one is enough (see AND, OR and subgroups). | AND; a new subgroup gets the opposite of its parent group |
| ⓘ in the header | Only on the top group. If you point at it, the explanation of AND and OR appears. A click, the Enter key or the Space bar opens it in the “AND / OR — when is something shown?” window with two example images. | – |
| “Choose field …” ▾ | Opens the field picker (see Data tree and field picker). Afterwards the button shows the chosen field with source and path, such as “Rechnung › Kunde › Name”, for a summary for example “Sum of …”; in the filter of a rule, in the condition branches of a variable of the rule and in the button assistant only the field name or “relationship · field”. If you choose another field, the designer resets comparison and value. | no field |
| Comparison (selection list without a label) | Appears as soon as a field is chosen. Which comparisons there are depends on the kind of the field (see The comparisons). | the first comparison in the list |
| “Value” | The value that is compared with: for text a text box, for numbers a number box, for a date a box with a calendar. With “between” there are two boxes with “and” between them. With “is filled in”, “is empty”, “is yes” and “is no” there is no value box. Text counts as you type it, also with an apostrophe as in “O'Neill”; spaces at the beginning and end are dropped. An empty value box means: This condition is not checked (see A condition without a value). | empty |
| “123” \| “ƒx” | Only in the filter of a rule and in the condition branches of a variable of the rule: a fixed value or a value from the data (see Fixed value or value from the data). | “123” |
| ✕ at the end of the condition | Tooltip “Remove this condition”. Removes the condition without a confirmation question. If it was the last one in the group, an empty condition is there again. | – |
| “Condition” | At the bottom of every group. Appends an empty condition. | – |
| “Subgroup” | At the bottom of every group. Appends a subgroup, offset in color, with an empty condition. In the window of a variable and the windows that also use it, from the second condition on. | – |
| “✕ Group” | On the right in the header of a subgroup. Removes the subgroup together with all its conditions, without a confirmation question. The tooltip says “Remove this group of conditions”, but the conditions do not move into the group above; they are gone. | – |

> **Good to know:** From the condition parts, the designer writes the condition in a short formula notation; only this counts in printing. You see it, for example, when you point at the “Rule: …” row of a visibility rule in the properties (see Visibility). When a change in the builder takes effect, immediately or only with a button such as “Save”, depends on where you are; the overview is under Where conditions occur.

### AND, OR and subgroups

- **AND:** The group applies only if all its conditions are met. Each further condition narrows the selection. Example: “Bezahlt is yes” AND “Betrag greater than 100”.
- **OR:** It is enough if one condition is met. Each further condition widens the selection. Example: “Land is Deutschland” OR “Land is Österreich”.

The switch applies to all conditions and subgroups of its group. Its tooltip says “Sets whether ALL conditions (AND) or only ONE (OR) must be met”.

#### Mixing both: subgroups

With a subgroup you mix AND and OR, such as “paid AND (Germany OR Austria)”:

1. Leave the top group on “AND” and build the first condition: “Bezahlt” “is yes”.
2. Click “Subgroup” at the bottom.
   → A group offset in color with an empty condition appears. It is already on “OR”, because a new subgroup always gets the opposite of its parent group.
3. In the subgroup, build “Land” “is” “Deutschland”. In the subgroup, click “Condition” and build “Land” “is” “Österreich”.

Subgroups can be nested further.

[Image: The builder with a subgroup. At the top the outer group with the switch “AND” (blue) and “OR” and an info sign. In it first a condition “Rechnung › Bezahlt” with the selection list “is yes”. Below it an offset subgroup with a thick violet line on the left edge: at the top its own switch with “AND” and “OR” (“OR” blue) and on the right the button “✕ Group”, below it two conditions “Rechnung › Land – is – Deutschland” and “Rechnung › Land – is – Österreich”, each with a cross at the top right, and the buttons “Condition” and “Subgroup” of the subgroup. At the very bottom “Condition” and “Subgroup” once more for the outer group.]
Caption: “Bezahlt is yes” and (“Land is Deutschland” or “Land is Österreich”): The subgroup is on “OR”, the outer group on “AND”.
- Image marker 1: The outer group is on “AND”: “Bezahlt” and the whole subgroup must be met.
- Image marker 2: The subgroup is offset in color, with a violet line on the left, and has a switch of its own.
- Image marker 3: A new subgroup always gets the opposite of its parent group, here “OR”.
- Image marker 4: Removes the subgroup together with all its conditions, without a confirmation question.
- Image marker 5: Appends a subgroup. Subgroups can be nested further.

#### A condition without a value

A condition whose value box is still empty is not checked. What this does depends on the group:

- In an AND group this restriction drops out. The selection becomes wider.
- In an OR group this possibility drops out. The selection becomes narrower as long as the group still checks something else. Then the note “⚠ No value yet — this condition is not checked. …” appears below the row (see Notes and warnings).
- If no condition of a group is filled in, the whole group drops out.

> **Caution:** A half-filled condition looks complete in the builder. If you mean “the field is empty” for a text field, do not leave the value box empty but choose the comparison “is empty”. If an AND subgroup under an OR group has conditions that all have no value, no note appears; the subgroup then drops out as a possibility.

[Image: The builder with an OR group. At the top the switch “AND | OR” with “OR” selected (blue) and an info sign. Below it two conditions: “Rechnung › Land – is – Deutschland” and “Rechnung › USt-IdNr. – is” with an empty value box in which the placeholder “Value” appears. Below the second condition, in orange: “⚠ No value yet — this condition is not checked. In this OR group it therefore drops out as an option; only the others count. Did you mean »is empty«? There is a separate comparison for that.” At the bottom the buttons “Condition” and “Subgroup”.]
Caption: An “OR” group with a condition without a value: The orange note says that this condition is not checked.
- Image marker 1: The group is on “OR”. Only then does the note appear.
- Image marker 2: The value box is empty. The builder still looks complete.
- Image marker 3: The condition is not checked and drops out as a possibility. For “the field is empty” there is the comparison “is empty”.

### The comparisons

Which comparisons are in the selection list depends on the kind of the field. The first comparison in the list is the default each time. For each kind, the table names the section in which its comparisons are described.

| Kind of field | The comparisons are under | Default |
|---|---|---|
| Text, lookup, image, file | Text, choice field and lookup | “is” |
| Choice field, status, status reason, multiple choice | Choice fields: by option value | “is”, for a multiple choice “contains” |
| Number, amount, decimal number, whole number | Numbers and amounts | “equals” |
| Date, date with time | Date | “on” |
| Yes/No | Yes/No | “is yes” |

- For a custom variable, its type determines the list: number and currency like a number, date like a date, yes/no like yes/no, text and color like text.
- Sum, average and count over a list are always numbers. First, minimum and maximum have the kind of their field (see Sum, count and so on).
- The builder offers the comparison “does not contain” only for a multiple choice whose value you choose “by option value”. “is filled in” and “is empty” exist for text and for choice fields.

#### Text, choice field and lookup

A lookup is compared with the text Dynamics displays, such as the name of a company. An image field and a file field have the same comparisons. A choice field you usually compare by its options (see Choice fields: by option value); with “by text”, it is compared with its label as described here, such as “Offen”.

> **Caution:** The display texts of choice fields and yes/no fields come in the language of the user who creates the document. A condition “by text” such as “Status is Offen” does not apply for a user with an English interface; there the value is “Open”. Therefore choose the value of a choice field “by option value” (see Choice fields: by option value): Then the comparison is made via the code of the option, and the condition applies in every language. When printing, choice and yes/no fields appear in the option label language, by default the template language, not the language of the user (see Numbers, currency and dates: Option label language); a condition “by text” still compares with the text in the language of the user. How a yes/no field is compared is described under Yes/No.

| Comparison | What it checks | Example |
|---|---|---|
| “is” | The text matches exactly. Uppercase and lowercase count. | “Status is Offen” applies to “Offen”, not to “offen”. |
| “is not” | The opposite of “is”. Also applies to an empty field. | “Land is not Deutschland” |
| “contains” | The value occurs somewhere in the text. Uppercase and lowercase do not count. | “Name contains gmbh” applies to “Muster GmbH”. |
| “starts with” | The text begins with the value, regardless of case. | “Artikelnummer starts with A-” |
| “ends with” | The text ends with the value, regardless of case. | “Dateiname ends with .pdf” |
| “is filled in” | The field has a value that does not count as “empty” (see below). | “USt-IdNr. is filled in” |
| “is empty” | The field is empty or contains a value that counts as “empty”. | “Bemerkung is empty” |

“is filled in” and “is empty” are actually a yes/no check. Therefore the texts “Nein”, “No”, “false”, “off”, “n”, “non”, “nee” and “nie” also count as empty, regardless of case, so also “NEIN” or “False”, and every zero with a period as the decimal separator such as “0”, “00” or “0.00”; “0,00” with a comma counts as filled in. A text field that contains only “Nein” is therefore “empty”. If you use “contains”, “starts with” or “ends with” to compare a field that contains a number, the spelling with a period applies: “5.5”, not “5,5”. For a yes/no field from Dynamics, by contrast, what counts is whether it is set to yes or no, not its label (see Yes/No).

> **Tip:** “does not contain” can be built for the printed record with a custom variable: Create a variable of type text with the condition branch IF “Name contains GmbH” THEN “ja” and leave ELSE empty (see Variables: Condition branches). Then check “@variable” “is empty”. The variable has a value in the whole document; for each row of a table separately you need a variable of the rule.

#### Choice fields: by option value

For a choice field, also for status, status reason and multiple choice, the options that Dynamics knows for this field appear instead of the value box, such as “Neu · 1”: first the label in the language of your Dynamics interface, then the code of the option. In the window of a variable and in the windows that also use it (“Wenn-Dann für …” on an entry of the e-invoice, “Wert für …” for barcode, QR code, GiroCode and in a step of a button) only the label appears there, such as “Gutschrift”; the code of the chosen option is shown small and gray next to it on the right, every code also in the tooltip of its entry. If two options have the same label, their code appears after it in brackets. The comparison is made via the code. The condition therefore applies regardless of the language in which Dynamics delivers the label and the language in which the document prints it. The options appear everywhere you build conditions: in the filter of a rule, for visibility, image rules and dynamic text, in the condition branches of variables and settings, in the email cases of a button and in the versions of a text.

| Comparison | What it checks | Example |
|---|---|---|
| “is” | The field has exactly this option. | “Statusgrund is Neu” |
| “is not” | The field has another option or is empty. | “Status is not Abgesagt” |
| “contains” | Only for a multiple choice: This option is among the chosen ones. | “Kategorien contains Rot” |
| “does not contain” | Only for a multiple choice: This option is not among them, also if the field is empty. | “Kategorien does not contain Rot” |
| “is filled in”, “is empty” | As for text (see Text, choice field and lookup). | “Priorität is empty” |

- The switch “by option value” | “by text” before the comparison switches between the options and the comparison with the label (see Text, choice field and lookup). It is called this in every builder. A new condition begins with “by option value”. A condition that has already been built with a label stays as it is and works as before; only a click on “by option value” converts it. If its label is among the options, the builder takes over the matching option. With a variable instead of a fixed value (“ƒx”) you compare under “by text”.
- Without a connection to Dynamics the designer does not know the options. Then the text box appears as for text; a condition that has already been built via the code shows the code as a number.
- If a saved option no longer exists in the table, it appears as “⚠ … — unknown in this table” among the options and stays until you choose another.
- In the template the condition is written as an expression over the raw value, such as `statuscode_code == 1`, for a multiple choice `contoso_tags_code contains 100000001` (see Template format: Conditions).

#### Numbers and amounts

| Comparison | What it checks | Example |
|---|---|---|
| “equals” | The number is equal. Tiny rounding remainders do not count. | “Menge equals 1” |
| “does not equal” | Any other number. Also applies to an empty field. | “Rabatt does not equal 0” |
| “greater than” | The number is greater than the value. | “Betrag greater than 1000” |
| “less than” | The number is less than the value. Also applies to an empty field. | “Menge less than 10” |
| “greater than or equal to” | The number is at least as large as the value. | “Menge greater than or equal to 1” |
| “less than or equal to” | The number is at most as large as the value. Also applies to an empty field. | “Rabatt less than or equal to 5” |
| “between” | The number lies between the two values; both limits are included. If one limit is missing, only the other applies; if both are missing, the condition is not checked. | “Betrag between 100 and 500” also applies at exactly 100 and exactly 500. |

Enter the number without a thousands separator. A period always counts as the decimal separator: “1.000” is 1, not one thousand. A comma as the decimal separator is taken by the designer as a period: 1,5 is 1.5. Anything that is still not a number after that is compared as text. An amount is compared as a number, without a currency symbol.

The comma is not treated everywhere as it is in the builder. The table puts the places where you type a number side by side:

| Where you type the number | A comma as the decimal separator | More |
|---|---|---|
| Value box of a condition in the builder | The builder converts it when it writes the condition: 1,5 becomes 1.5. In a condition written by hand, by contrast, a decimal comma is not converted; the designer reports it (see Notes and warnings). | Numbers, currency and dates: Reading numbers: comma and period |
| Fixed value of a custom variable | Is not converted: “1,19” cannot be calculated. Write decimal numbers with a period. | Variables: Fixed values |
| Formula | Is not converted: A comma turns the formula into text. Write decimal numbers with a period. | Template format: Formulas |

#### Date

Date comparisons are exact to the day as long as one side carries no time, also for a field with a time such as “Erstellt am”. The tooltip of the comparison list says this too. Only “before”, “after”, “on or before”, “on or after” and the lower limit of “between” compare exactly down to the time, and only if both sides carry a time, for example for a field via “ƒx”. “on” and “not on” always compare the calendar day. The calendar day of a stored point in time counts in the time zone of the Dynamics user. You choose the value in the calendar of the value box.

| Comparison | What it checks | Example |
|---|---|---|
| “on” | The same calendar day; the time does not matter. | “Rechnungsdatum on 31.08.2026” |
| “not on” | Any other day. Also applies to an empty field. | “Lieferdatum not on 24.12.2026” |
| “before” | An earlier day. Also applies to an empty field. | “Fälligkeit before 01.10.2026” |
| “after” | A later day. | “after 31.08.2026” begins on 01.09.2026. |
| “on or before” | This day or earlier. Also applies to an empty field. | “on or before 31.08.2026” includes the whole of 31.08. |
| “on or after” | This day or later. | “on or after 01.09.2026” |
| “between” | A day between the two dates; both days are included. If one limit is missing, only the other applies. | “between 01.08.2026 and 31.08.2026” is the whole of August. |

#### Yes/No

| Comparison | What it checks | Example |
|---|---|---|
| “is yes” | The field is set to yes. For a yes/no field from Dynamics its value counts, not its label. If the document knows only the label (own data, sample data without Dynamics), everything except the no words counts as yes (see Text, choice field and lookup), so also “Yes”, “1” or “on”. | “Bezahlt is yes” |
| “is no” | The field is set to no, also with a label of its own such as “Unbezahlt”; without a value from Dynamics also “No”, “0” or “off”. If the field is not set at all in Dynamics, neither “is yes” nor “is no” applies. | “Gesperrt is no” |

> **Caution:** A yes/no field comes with its label from Dynamics and, next to it, with its value, yes or no. “is yes” and “is no” go by this value. If a yes/no field in your Dynamics has labels of its own, such as “Aktiv” and “Inaktiv”, “is no” therefore applies to “Inaktiv”, and likewise to a no in another language such as “Nej”. Formerly the label decided here: Everything except the no words counted as yes, and “is no” never applied to “Inaktiv”. A comparison with the text, such as “Bezahlt is Unbezahlt” written by hand, still compares the label. If the data come without Dynamics (sample data, a flow with its own data), there is only the label; then, as before, everything except the no words counts as yes. Such a field is printed with its label, so “Inaktiv” (see Numbers, currency and dates: Option label language). The same applies to a variable of type yes/no that takes over such a field, also for a variable of a rule: “is no” applies to “Inaktiv”. A variable of a rule still prints the label, a custom variable “Nein” (see Variables: Type yes/no).

Only the simple input of the versions counts an unset field as no with “is empty / no” (see Texts: Content depending on a condition).

#### What happens with empty fields

An empty field is not a special case that the builder intercepts. It behaves like this:

- **Applies:** “is not”, “does not equal”, “not on”, “is empty”, and also “less than”, “less than or equal to”, “before” and “on or before”: An empty field counts as less than or earlier than any value.
- **Does not apply:** “is”, “contains”, “starts with”, “ends with”, “is filled in”, “equals”, “greater than”, “greater than or equal to”, “on”, “after”, “on or after”, “between”, “is yes” and “is no”. An empty number field is therefore not “equal to 0”, and an unset yes/no field is neither yes nor no.
- **In a rule and in a table row** an empty field stays empty. If the row above has a field of the same name, such as the invoice and its items each having an “Art”, its value does not step in, not even if you compare a choice field “by option value” (see Choice fields: by option value). Only what the row does not have at all is looked up higher up. This also applies to a field behind an empty lookup, such as the name of the currency for an item without a currency: It is empty, even if the row above has filled the same lookup.

> **Tip:** If rows without a value should not count, use “between” with a lower limit instead of “less than or equal to”, such as “Rabatt between 0 and 5” instead of “Rabatt less than or equal to 5”. For text, join the condition “is filled in” with AND; rows in which only “Nein”, “0” or a similar word appears also drop out (see Text, choice field and lookup). For a date, likewise use “between” with an early start date instead of “before” or “on or before”.

### Fixed value or value from the data: “123” and “ƒx”

On the right in a condition there is normally a fixed value that you type. In the filter of a rule and in the condition branches of a variable of the rule, next to the comparison there is also the switch “123” | “ƒx” with the tooltip “A fixed value or a variable from the data tree”. Everywhere else the value is always fixed.

[Image: A condition in the filter of a rule. At the top left the switch “AND | OR” with an info sign. Below it a wide button with the field “Betrag” and a cross next to it on the right. In the row below it the selection list “greater than”, a small switch with the halves “123” and “ƒx” (“ƒx” blue, selected) and a wide button with “@Grenze” and an arrow. Below it in gray text: “ℹ »@Grenze« applies document-wide here — the variable is calculated once on the main record before the rules run, and therefore has the same value for every row.” At the bottom the buttons “Condition” and “Subgroup”.]
Caption: In the filter of a rule the value can be taken from the data: “Betrag greater than @Grenze”.
- Image marker 1: “123” is a fixed value that you type; “ƒx” takes the value from the data.
- Image marker 2: Opens the field picker with the whole data tree. Chosen here is the custom variable “@Grenze”.
- Image marker 3: A custom variable has a value in the whole document, the same in every row.

| Setting | What it does | Default |
|---|---|---|
| “123” | Fixed value. You type it into the “Value” box. | selected |
| “ƒx” | Value from the data. Instead of the input box, the button “Choose variable …” appears. It opens the field picker “Choose field” with the whole data tree, without system variables (see Data tree and field picker: The “Choose field” window). You can choose, for example, a field of the document such as the customer’s credit limit or a custom variable such as “@Grenze”. | – |

- The switch appears only for comparisons with a value, so not for “is filled in”, “is empty”, “is yes” and “is no”. Switching clears the value.
- Example: In the filter of the items “Betrag greater than @Grenze”. A custom variable has a value in the whole document and is therefore suitable as a fixed comparison value.
- Before the designer accepts a choice, it checks it: The rule must not read itself (its result only comes into being through it), must not close a cycle with another rule (see Rules: When rules read each other in a cycle) and must not read anything from a rule higher up (see Rules: What a rule may read). Otherwise a message with “⚠” appears at the top, and the value is not accepted. The sentences the designer shows for this are under Notes and warnings.
- With “between” only the lower limit comes from the data; the upper one stays a fixed value.
- For a date, what is under Date applies. With “between” only the lower limit from the data can carry a time; the upper one is a fixed day and is compared exact to the day.

> **Tip:** To compare two numbers where there is no “ƒx”, such as in a visibility rule: Create a custom variable of type number that calculates the difference, such as “Betrag” “minus” “Kreditlimit” (see Variables: Operators). Then check “@Unterschied greater than 0”. An empty field counts as 0 in the calculation: If no credit limit is entered, the condition applies to every amount above 0.

### Sum, count and so on over a list

A field from a list (1:N) has many values, a condition needs one. That is why there is a small selection list on the right of such fields: First choose the summary and then click the field. The tooltip says so: “Click to choose (summary selectable on the right)”. The selection exists on the fields of a list, under a rule that returns a list, and on an additional source. The tree in which it appears is described in Data tree and field picker: The tree in the field picker.

| Summary | Result | For |
|---|---|---|
| “Sum” | All values added up. Each value is rounded beforehand (see Rules: Round first, then sum). | number, amount |
| “Avg” | The average over the filled rows; here too each value is rounded beforehand (see Rules: Round first, then sum). | number, amount |
| “First” or “First value” | The value from the first row of the list, even if it is empty. Which row is the first is not fixed without sorting. | all fields |
| “Count” | How many rows the list has. | all fields |
| “Min”, “Max” | The smallest or largest value. | number, amount |

- Numbers and amounts offer “Sum”, “Avg”, “First”, “Count”, “Min” and “Max”; all other fields, also a date, only “First value” and “Count”. The first entry is the default.
- In the field button it then says, for example, “Sum of …”, “Average of …”, “First value of …”, “Count of …”, “Minimum of …” or “Maximum of …”; after a choice in “Choose a field of this row” it says “First of …” instead of “First value of …” (see Data tree and field picker: The “Choose a field of this row” window).
- The calculation is made after loading over all rows of the list. This costs no additional query, unless the list is otherwise needed only by rules whose filter already takes effect when loading: Then printing loads it in full for that (see Data sources and relationships: How the document fetches the data).
- Over an empty list, sum, average, count, minimum and maximum give 0, and the document reports it. If you mean “has rows, and the value is 0”, join “Count of … greater than 0” with AND.

The same kinds of calculation also exist in the calculations of a rule and in custom variables, there with other names and for other fields. The table puts them side by side. After the name it says for which fields the kind of calculation exists, for a custom variable for which types of the variable:

| Kind of calculation | In a condition | In the calculation of a rule | In a custom variable |
|---|---|---|---|
| Sum | “Sum”: number, amount | “Sum”: only numbers and amounts | “Sum of”: number, currency |
| Average | “Avg”: number, amount | “Average”: only numbers and amounts | “Average of”: number, currency |
| Count | “Count”: all fields | “Count”: needs no field | “Count of”: text, number, currency |
| Smallest and largest value | “Min”, “Max”: number, amount | “Minimum”, “Maximum”: all fields, also text and date | “Smallest value of”, “Largest value of”: number, currency |
| First value | “First” or “First value”: all fields | does not exist; you choose the first record in the “Selection” tab with “Only the first” | “First value of”: text, number, currency, yes/no, date |
| Earliest and latest date | cannot currently be queried in a condition | “Minimum” and “Maximum” apply to all fields, also to a date | “Earliest of”, “Latest of”: date, only in the first row |

Example: In the filter of the rule on the items, only items should remain whose batches together add up to more than 1,000 pieces.

[Image: The “Choose a field of this row” window with a ✕ at the top right. Under the title the note “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.” Below it a search box “Search…” and a list: “Custom variables” with “123 @Grenze”, then an area with a violet background “Row from »Rechnungsposition · Rechnung«”, in it a search box of its own, the collapsed entry “Felder dieser Zeile (3)” and the expanded entry “Via a relationship — here you get Sum, Count, Avg, Min, Max”. Below it the expanded relationship “1:N Charge · Rechnungsposition” with two fields: “Abc Chargennummer” with the selection list “First value” on the right and “123 Menge” (“2 decimals”) with the selection list “Sum” on the right.]
Caption: The “Choose a field of this row” window: On the right of the field “Menge” you first choose the summary “Sum” and then click the field.
- Image marker 1: Explains that the filter runs per row and that the summary is calculated after loading, without an additional query.
- Image marker 2: Names the list whose row is being checked.
- Image marker 3: The row’s own fields, with their number. Collapsed, because the row has relationships.
- Image marker 4: Here are the lookups (N:1) and lists (1:N) of the row. Only on the fields of a list is there the summary.
- Image marker 5: The summary. Choose “Sum” here first, then click the field.

1. In the “Filter” tab, click “Choose field …”.
   → “Choose a field of this row” opens.
2. Under “Via a relationship — here you get Sum, Count, Avg, Min, Max”, expand the batches.
3. On the right of the field “Menge”, choose the summary “Sum” and then click the field.
   → The field button says “Sum of …”; the comparisons are those of a number.
4. Choose “greater than” and enter 1000.

> **Caution:** Under a list, the field picker also shows its rules with their calculated fields, likewise in the large picker under the lists of the document. A condition on the fields of a rule that sits on a list may find no value in the PDF. It then calculates with 0 or with an empty field and applies differently from what you expect. Therefore check such a condition in the full preview before you rely on it. The rules say so too: Whether such a comparison takes effect correctly in the document is currently not assured (see Rules: Comparing with a list, a variable or another rule). The summary directly on the field of the list, as in the example above, works reliably.

### Custom variables in a condition

- Custom variables are at the very top of the field picker under “Custom variables” and appear in the field button as “@Name”. Their type determines the comparisons.
- A custom variable has a value in the whole document, in a filter and in every table row the same. A filter that compares only a variable with a fixed value therefore lets all rows through or none (see Variables: When a custom variable is calculated).
- If a variable does not exist (any more), a condition on it does not apply, not even with “is not” or “does not equal”. Before the full preview and the PDF, the designer reports names that do not exist (see Notes and warnings).
- In the filter of a rule, a variable should not read results of rules: They do not exist there yet, and the variable is then empty or 0 (see Variables: When a custom variable is calculated). The builder points this out (see Notes and warnings).
- In the condition branches of the template settings a custom variable works as everywhere; there it is calculated with the fixed decimal places and the fixed number style of the template (see Numbers, currency and dates: Condition branches). In the button assistant it does not exist at all.

### Conditions in a table cell

If an object is in a cell of a data table, its condition is checked for each row separately: the visibility rule, the image rule, the dynamic text and the versions of a text. For the first three, the field picker then offers the fields of this row under “Per row · …” (see Data tree and field picker: The data tree in the cell designer and column designer); for the versions a restriction applies, which is described further below. What the condition can read there:

- the fields of the row, for a table on a rule also its “Calculated fields”,
- sum, count and the other summaries over a list of the document,
- your custom variables.

A simple field of the document, such as the status of the invoice, is not found by the condition in a cell, although the field picker offers it under “All fields”. If you need it, create a custom variable that reads this field and check the variable.

The same applies in a cell of a data table for image rules and dynamic texts. The versions of a text are also checked against the row there; but their field list offers only fields of the document. If a text in a cell is to differ per row, use a dynamic text with the fields under “Per row · …” and check the result in the full preview.

In a free-form table there are no data rows, and a header cell of a data table does not belong to any row either. There the condition is checked against the level on which the table sits. Directly in the document this is the record being printed, as outside a table; the fields of the document are then also found, and the field picker shows no “Per row · …”.

A table itself checks its visibility against the level on which it sits, not against its own rows. Typical for an items table: “Count” on a field of the items, comparison “greater than”, value 0. Then the table appears only if there are items; “Count” counts the rows, even if the chosen field is empty in them. All items of the relationship are counted, also those that the filter of the table rule takes out.

### Notes and warnings

Below a condition, at the top of the canvas or before the full preview and the PDF are created, the designer explains when something does not work as it looks:

| Note | When it appears | What you do |
|---|---|---|
| “⚠ No value yet — this condition is not checked. In this OR group it therefore drops out as an option; only the others count.” (orange) | In an OR group, when a condition has a field but no value and the group otherwise still checks something (see A condition without a value). For a text field it is followed by “Did you mean »is empty«? There is a separate comparison for that.”. With “ƒx” it begins with “⚠ No variable chosen yet”. | Enter a value, choose “is empty” or remove the condition with ✕. |
| “⚠ No variable has been chosen yet.” (red) | After switching to “ƒx”, as long as no value is chosen. | “Choose variable …” or back to “123”. |
| Red sentence, depending on the case “⚠ »…« cannot refer to itself — its result only comes into being through that.”, “⚠ Cycle: »…« itself accesses »…«. One of the two directions must go.” or “⚠ »…« is on a higher level. … this reference will be deleted. …”; when choosing, a message at the top with “⚠ …” instead | The value with “ƒx” reads the rule the condition is in, a rule in a cycle or a rule higher up. When choosing, such a value is not accepted. The check is described under Fixed value or value from the data. | Choose another value. For a rule higher up, create the key figure as a rule of its own on this level and compare against it (see Rules: What a rule may read); for a cycle, take out one of the two directions (see Rules: When rules read each other in a cycle). |
| “ℹ »@…« applies document-wide here — the variable is calculated once on the main record before the rules run, and therefore has the same value for every row.” (gray) | In the filter of a rule or in the condition branch of a variable of the rule, a custom variable is on the left or under “ƒx”. | Nothing; for information only. |
| Red sentence about a custom variable, such as “The variable »@…« does not exist (any more).” | At the same place, when the variable is missing, when its own condition reads row fields, results of rules or page numbers (the sentence calls page numbers “system values”; the variable then silently falls back to its default value) or when its content reads a result of a rule. Today’s date and the user do not trigger the sentence. | Adjust the variable (see Variables: When a custom variable is calculated) or choose another. |
| Orange note “Without a condition this rule always applies …” for an image rule and “Without a condition this version always applies …” for a version of a text | An image rule has no condition, or a version that is not the last has no condition. The windows themselves give the wording and the consequences (see Images: The “Except when — which image when?” window and Texts: Content depending on a condition). | Build a condition or remove the image rule; for a version, set a condition or move it to the end with ▼. |
| English message at the top, beginning with “condition '…':” | A condition written by hand has a suspicious spelling, such as a single instead of a double equals sign, a single “&” instead of “&&”, a bracket without a counterpart, a decimal comma or a word such as “isEmpty” (see Checking for empty in a condition written by hand), or a part is missing (see Incomplete conditions). The message corrects nothing; the PDF reports the same. The wording is given in Problems and messages: Variables and conditions. | Rebuild the condition with the builder (see Conditions written by hand). |
| “Deleted: rule »…« — …” | When the sample data is recalculated, if a filter or a variable of a rule reads a rule higher up. | See Rules: What a rule may read. |
| Confirmation question “Something is wrong with the custom variables: …” with the buttons “Generate anyway” and “Cancel” | Before the full preview and the PDF, among other things when a condition names a variable that does not exist, or when a condition branch without a condition comes before others in a variable or a template setting. All findings are under Variables: The check before the full preview and the PDF, the dialog under Full preview and PDF: Confirmation question about rules and variables. | With “Cancel” go back and correct; “Generate anyway” generates as set. |
| Confirmation question “Some conditions in the template are incomplete: …” with the buttons “Generate anyway” and “Cancel” | Before the full preview and the PDF, when a condition of the template is missing a part (see Incomplete conditions). One point per condition, in the wording of the note of the check. | With “Cancel” go back and complete; “Generate anyway” generates as set, the missing part never counts as met. |

If two rules read each other in a cycle, the designer also warns when the rule is saved, on the canvas and before the full preview and the PDF (see Rules: When rules read each other in a cycle).

### Conditions written by hand

A template can contain conditions that were not built with the builder, for example from an imported template, from the AI package or from an older version. If the builder cannot display such a condition exactly as it is, for example because it uses “does not contain”, has a composite field or a comparison that the kind of the field does not know, then: It stays valid unchanged, and merely opening it changes nothing. How it is displayed depends on where you are:

[Image: Excerpt from the “Visibility rule” window: at the top the sentence “The object is shown only if this condition is met (AND/OR, can be nested).”, below it a light brown box with a thick brown line on the left: “Written by hand — and this is the condition that applies: new_ustid notContains 'DE'. The condition parts below cannot represent this expression. It stays as it is until you fill them — then they replace it.” The expression is in typewriter font. Below it the builder with the switch “AND | OR”, an empty condition “Choose field …” and the buttons “Condition” and “Subgroup”.]
Caption: The “Written by hand” box: The condition continues to apply unchanged until you fill the condition parts below it.
- Image marker 1: Shows the condition word for word. It continues to apply, even if the condition parts look empty.
- Image marker 2: The condition parts are empty. As soon as you build a condition here, it replaces the expression in the box.

| Where | What you see | How to replace it |
|---|---|---|
| Visibility rule, image rule, dynamic text | Above empty condition parts a box with a brown line: “Written by hand — and this is the condition that applies: … The condition parts below cannot represent this expression. It stays as it is until you fill them — then they replace it.” | Build a condition in the condition parts below it. As soon as it yields something, the box disappears, and the new condition applies. |
| Cases “Je nach Bedingung” in the button assistant | The same box with “… and this is the case that applies: …”. | As above. |
| Versions of a text | The same box as above, above empty condition parts of the version, for example for `feld == ''` or `a == 1 \|\| b == 2` (see Texts: Content depending on a condition). | Fill in the condition parts of the version. As soon as they yield something, the box disappears, and the new condition applies. |
| Filter of a rule | At the top of the tab: “This rule has a filter that was not built with the builder: »…«. It is kept. As soon as you create a condition here, the builder replaces it.” | Create a condition, or “🗑 Remove filter”. “Cancel” in the rule window restores the old filter. |
| Condition branches of a variable | The condition in gray typewriter font, below it “Hand-written condition — stays unchanged. The condition builder would replace it.” | “Rebuild with the condition builder”. You answer the confirmation question “The condition »…« will be discarded in the process. Continue?” with “Replace” or “Cancel”. |
| Condition branches of the template settings | The condition in a gray box with the note that it was written by hand and stays unchanged. If it contains a field in “{{ }}” or one of the words “isEmpty”, “notEmpty”, “isNotEmpty”, this note is missing; instead there are the red note “⚠ Typo: …” and the button “Rebuild with the condition builder” (see Fields in “{{ }}” and Checking for empty in a condition written by hand). | Remove the whole branch with ✕ and create it anew. For “{{ }}” or “isEmpty” & co. also “Rebuild with the condition builder” with the same confirmation question as above; afterwards “Done” stays disabled until the new condition is complete. |

If you uncheck the box in the properties for such a visibility rule, it is gone if the builder cannot display it. The second case and the difference between switching off and deleting are described in Visibility: Switching off or deleting.

#### Incomplete conditions

If a part is missing from a condition written by hand, for example after an AND or OR (`status == 'Offen' &&`), before a comparison (`!= 5`) or its value (`status !=`), the missing part never counts as met. With AND the condition then never applies, with OR only if the complete part applies. Formerly the missing part counted as met: `status == 'Offen' ||` applied to every record without anyone noticing. The PDF reports such a condition as a warning (see Problems and messages: Variables and conditions), and when a template is imported, the check names the place as a note. At the top of the canvas the designer reports it as soon as it evaluates the condition with the sample data, for example in the filter of a rule or in the versions of a text; it does not evaluate a visibility rule there (see What changes in the document?). Before “Full preview” and “PDF” the designer asks if a condition of the template is incomplete, also a visibility rule (see Full preview and PDF: Confirmation question about rules and variables). A completely empty condition is not incomplete; it still means “always”. The builder does not write incomplete conditions.

#### Fields in “{{ }}”

In a text, double curly brackets fetch a field: `{{betrag}}`. In a condition the field appears *without* them: `betrag > 100`. If it does appear with brackets, such as `{{betrag}} > 100` from a template written by hand or produced by an AI, the field is not read at all, and the condition mostly never applies (with “is not”, by contrast, always). Until now this happened without a word. Now it is reported, also in templates that are already in use; the calculation continues as it stands:

- The PDF reports the condition as a warning (`condition '…': '{{' and '}}' do not belong in a condition`, see Problems and messages: Variables and conditions). The document looks as before.
- In the e-invoice it is an error: No e-invoice is created, and the message names the place, such as “the condition »…« cannot be evaluated like this: »{{ }}« does not belong in a condition …” (see Problems and messages: E-invoice). This applies to “Only if …”, to the condition of a list and of a fixed entry and to every branch of an if-then, also one that does not take effect for the document at all.
- When importing and when the AI makes a change, the check names the place, under “eRechnung” as an error (with the e-invoice switched off as a note), otherwise as a note. Before “Full preview” and “PDF” the designer asks (see Full preview and PDF: Confirmation question about rules and variables).
- In the window of a variable, in the if-then of an entry of the e-invoice and in the condition branches of the template settings, the red note “⚠ Typo: »{{ }}« does not belong in a condition; as written the field is not read at all. Rebuild the condition.” appears below the branch, next to the buttons “⚠ Typo in the condition: branch …”, and “Save”, “Apply” or “Done” stays disabled. Rebuild the condition with “Rebuild with the condition builder” or remove the branch; both work in all three windows. In the condition branches of the template settings, “Done” stays disabled after rebuilding (“⚠ Condition incomplete: branch …”) until the new condition is complete: This window applies changes immediately and has no “Cancel”, and a branch without a condition would apply to every document there (see Numbers and dates: Condition branches).

If `{{` is in a text in quotation marks, such as `name == '{{x}}'`, this is an ordinary comparison with this text and is not reported. The builder never writes `{{ }}` into a condition.

#### Checking for empty in a condition written by hand

For “is empty” the builder writes `!feld` and for “is filled in” `feld`. In a condition written by hand, for example from an import or by an AI, with `==` and `!=` the following also applies: Empty equals empty. An empty field from Dynamics, a field that does not exist, a field behind an empty lookup (`produkt.name`) or a rule without a hit (`TeuresProdukt.name`), `null` and the empty text `''` are equal to one another. So `feld == ''` matches an empty field, `feld != ''` only a filled one. Formerly `feld != ''` was always met for an empty field from Dynamics and `feld == ''` never. Unlike `!feld`, the number 0 and the label “Nein” do not count as empty here. A real yes/no value no does not count as empty here either: For the value behind a yes/no field (`feld_code`) and for a custom variable of type yes/no, `== ''` and `== null` do not apply for no. Conversely, an empty value is neither yes nor no: `feld == false` does not match an empty field, not even through a yes/no variable. You check whether a yes/no field is empty with `feld == ''`, whether it is set to no with `feld == false`. A rule with “Only the first”, “Only the last” or “The one at a specific position” that has found nothing is also empty: `TeuresProdukt == ''` and `!TeuresProdukt` apply, `TeuresProdukt != ''` does not, and `count(TeuresProdukt)` is 0.

A field behind an empty lookup is also empty in the filter of a rule: If an item has no currency but the invoice has “Euro”, in the filter of the items `waehrung.name == ''` applies and `waehrung.name != ''` does not. Only a field that does not exist on the row at all takes the value of the row above there (see What happens with empty fields). In a table cell only the row itself counts.

In the versions of a text such a condition stays. The simple input of the version cannot represent `feld == ''`, `feld != ''` and `feld == null`; it therefore shows the condition in the box “Written by hand — and this is the condition that applies: …” above empty condition parts. The condition applies unchanged until you fill the condition parts below it; then these replace it. If you want to use the input of the version, use “is empty / no” or “is set” there; like `!feld` they also count 0 and “Nein” as empty.

A condition does not know words such as `isEmpty`, `notEmpty` or `isNotEmpty`. It reads such a thing as a field that does not exist, and the condition mostly never applies. This is reported like a field in “{{ }}”: in the PDF as a warning (`condition '…': 'isEmpty' is not known - write '!field' for 'is empty' and 'field' for 'is filled'`), in the e-invoice as an error, when importing and when the AI makes a change as a note, and before “Full preview” and “PDF” the designer asks. In the window of a variable, in the if-then of an entry of the e-invoice and in the condition branches of the template settings, such a word disables “Save”, “Apply” or “Done” like “{{ }}” (see Fields in “{{ }}”); below the branch it says in red “⚠ Typo: there is no »isEmpty« in a condition. For »is empty« write »!field«, for »is filled« »field«. Rebuild the condition.” The calculation continues as it stands. Write `!feld` for “empty” and `feld` for “filled in”.

### Where conditions occur

The builder is the same everywhere. Depending on where you are, what is checked against, which field picker opens, whether there is the switch “123” | “ƒx”, what happens without a condition and when a change takes effect differ. Where several conditions are checked one after another, the same principle applies everywhere: from top to bottom, the first one that applies wins. The first table names what is checked against and what is available to choose; the second, what happens without a condition, in which order the checking is done and when a change takes effect.

| Where | Checked against | Field picker | 123 / ƒx | Custom variables | More |
|---|---|---|---|---|---|
| Filter of a rule: “Filter” tab in the “Edit rule” window | each row of the list separately | “Choose a field of this row” | Switch “123” \| “ƒx” | are available | Rules: The “Filter” tab |
| Condition branches of a custom variable: button “Condition branch” in the window of the variable | the printed record, once, before the rules run | “Choose field” | only a fixed value | are available | Variables: Condition branches |
| Condition branches of a variable of the rule: “Variables” tab in the rule window | each row separately, after filtering, grouping and selecting | “Choose a field of this row” with a note of its own; nothing from above | Switch “123” \| “ƒx” | are available | Rules: The “Variables” tab |
| Condition branches of the template settings: “Numbers & date” tab, window “Condition branches: …” | the printed record, once for the whole document | “Choose field” | only a fixed value | are available, but have no effect here | Numbers, currency and dates: Condition branches |
| Visibility: section “Visibility” in the properties, window “Visibility rule” | on the page the printed record, in a cell of a data table the row | “Choose field”, in such a cell with “Per row · …” | only a fixed value | are available | Visibility: The “Visibility rule” window |
| Image rule: “Except when” on an image, window “Except when — which image when?”, row “If …” | like visibility: in a cell of a data table against the row | as for visibility: “Choose field”, in a cell with “Per row · …” | only a fixed value | are available | Images: A different image depending on a condition |
| Dynamic text: window “Dynamic text”, cards “Except when …” | the printed record, in a cell of a data table the row | “Choose field”, in a cell with “Per row · …” | only a fixed value | are available | Texts: Dynamic text |
| Versions of a text: window “Conditional content — which version?” | the printed record, in a cell of a data table the row | no field picker, but a field list of its own with the fields of the sources and their lookups | only a fixed value and exactly one comparison | do not exist; no lists either | Texts: Content depending on a condition |
| Email template “Je nach Bedingung” in the button assistant, card “If” per case | the same data as the visibility rules, after the document is built | “Choose a field of this row”, only with the fields the template carries from its primary source; no relationships or rules | only a fixed value | do not exist | Buttons: Depending on a condition: the cases |

| Where | Without a condition | Order | A change takes effect | Other |
|---|---|---|---|---|
| Filter of a rule | Without a condition, all rows are included. | – | On the sample data only with “Save” of the rule window; “Cancel” takes everything back. | “🗑 Remove filter” takes out all conditions. If the filter reads a rule higher up, the designer deletes this part. |
| Condition branches of a custom variable | A branch without a condition always applies. | From top to bottom, the first branch that applies wins, otherwise “ELSE” applies. | Applied with “Save” of the variable. | – |
| Condition branches of a variable of the rule | As for a custom variable. | As for a custom variable. | Applied with “Save” of the variable and then with “Save” of the rule window; its “Cancel” takes them back. | – |
| Condition branches of the template settings | A branch without a condition always applies; if it comes before others, the designer reports this before the full preview and the PDF. | From top to bottom, the first branch that applies wins; the branches cannot be re-sorted. | Every input is in the template immediately; the window has no “Cancel” of its own. Applied with “Apply” of the template settings, taken back with their “Cancel”. | – |
| Visibility | If the condition stays empty, the object is visible. | – | Every input applies immediately. | Has no effect on the canvas. |
| Image rule | A rule without a condition always applies; the designer warns. | From top to bottom, the first rule that applies wins; if none applies, the image from the properties stays. | Every input applies immediately; “✓ Done” discards rules without an image. | The canvas shows the image that applies with the sample data. |
| Dynamic text | The designer discards a rule without a condition when saving. | The first matching rule wins; if none applies, the default applies. | Applies with “Save” in the window and then with “Apply” in the “Edit text” window. | On the canvas a green pill with its label, without evaluation; the result with sample data is shown only by the window. |
| Versions of a text | A version without a condition always applies; if it is not at the end, those below it are never printed. | The first version that applies is printed; if none applies, the text stays empty. | Every input applies immediately. | The canvas shows the version that applies with the sample data. |
| Email template “Je nach Bedingung” | A case counts only once the condition and the email template are set. | The first case that applies wins. | A complete case is in the opened template immediately. | Checked when the button is clicked, without any influence on the document. |

Everything is stored in Dynamics only with “Save” in the template row.

If an object is in a cell of a data table, the restrictions under Conditions in a table cell apply to visibility, the image rule, the dynamic text and the versions.

The versions of a text have no builder but a simple input of their own: per version a field, a comparison and a value, without AND, OR and subgroups. All fields of the window are described in Texts: Content depending on a condition.

“Rule” in the visibility rule and in the image rule only means “this condition”. They have nothing to do with the rules from the chapter Rules, which filter and summarize lists.

### Conditions and loading the data

Most conditions only decide what is printed; they do not reduce what is loaded. Only the filter of a rule on a list can load less, and even it only as long as nothing else needs the whole list (see Data sources and relationships: How the document fetches the data). A firm principle applies: rather load too many rows than too few.

- **Already when loading:** Simple comparisons on text and number fields of the row itself, joined with AND, are passed on to Dynamics by Smart Templates right away, such as “Menge greater than 0”. Dynamics then delivers fewer rows.
- **Only after loading:** everything that is joined with OR (if the top group is on OR, the whole condition; otherwise the OR subgroup), negations such as “is not”, “does not equal” or “is empty”, “is filled in”, fields via a relationship, comparisons with a date, a choice field, yes/no or a lookup, “greater than” and “less than” for text, search texts with % or _, comparisons with a value from the data via “ƒx”, such as with another field of the same row (of these only “greater than”, “less than”, “greater than or equal to”, “less than or equal to” and “between” on a number field against a field outside the row, such as the customer’s credit limit, take effect already when loading), summaries such as sum or count, results of rules and custom variables.
- **Always once more:** After loading, printing checks the whole filter on every row. Anything loaded in excess drops out here; a row that matches is never missing. The only limit: Printing does not load more than 20,000 rows per query. If this limit is reached, printing cuts off there and reports it as a warning (see Data sources and relationships: What the canvas loads and what is printed).
- An additional source is always loaded in full; its filter only shortens the result (see Data sources and relationships: What the canvas loads and what is printed). The selection of a rule, such as “The first N”, also only shortens the result (see Rules: The “Selection” tab).

#### Conditions on child data

If each item has a list of batches, it matters in which rule the condition is:

- **In the filter of the rule on the batches**, such as “per item only batches above 100”: Only the batches are filtered (see Rules: The “Filter” tab). An item for which no batch matches is kept and then has no batches in this rule.
- **In the filter of the rule on the items** that needs the batches, such as “only items whose batches together are above 1,000”: Printing checks this condition only once all batches are loaded. Otherwise the sum would calculate over only a part and would be silently wrong.

### What changes in the document?

**On the canvas:** Fields appear as blue markers with their name. Visibility rules do not take effect; a hidden object stays visible. A dynamic text appears as a green pill with its label, without evaluation. Versions of a text and image rules follow the sample data. The filter of a rule takes effect on the sample data as soon as you save the rule, but only on the excerpt that the canvas loads; sums and counts in conditions also calculate with this excerpt (how large it is, is described under Data sources and relationships: What the canvas loads and what is printed).

**In the PDF:** Every condition is checked with the real data, summaries over all rows. Hidden objects are missing, images, versions and dynamic texts appear depending on the condition, rules keep only the matching rows, and variables and template settings take the value of their first branch that applies; if none applies, their value without a branch applies. The cases “Depending on a condition” of a button change nothing in the document.

---

## Rules

*For users · Data · Page en/regeln.html*

> **In short:** A rule turns a list into exactly what is to go on the document: It filters the rows, groups them, calculates sums, sorts them and, if you wish, selects particular records, such as the newest. Every data table sits on a rule. A rule has a name and appears in the “Data” area with the sign ƒ directly after its list. You edit it in the “Edit rule” window; its four tabs work in the same order as printing.

### Creating a rule

A rule comes into being in one of four ways. In all of them the “Edit rule” window opens right away.

- **With a data table:** Drag a list (1:N) from the “Data” area onto the page or into a table cell, or choose a relationship when creating a data table. The designer creates the rule for the rows of the table at the same time. It is named like the table in Dynamics, such as “Angebotsposition”. After “Save” the column selection opens. “Cancel” in the rule window removes the rule again, and no table is created; if you cancel the column selection, the designer also removes the rule again. The steps and all ways to the table are under Data tables: Creating a data table.
- **On a relationship:** In the “Data” area, click the sign ƒ on the right of a relationship. Its tooltip is “Add rule / view (filter, calculate, selection…)”. If the fields of the relationship have not been loaded yet, the designer fetches them first (“Loading fields...”). The rule is first called “Neue Regel”.
- **On a source:** The sign ƒ on the header of a source (“Create a rule / view on THIS data source (filter, calculate, selection…)”, with an ⓘ next to it) creates the rule on the source itself. It works with what the source delivers: for the main record with its one row, for an additional source with its whole list. This is typical for an additional source: With a filter and “Only the first” you get exactly one record from it, or you put a table on the rule (see Data sources and relationships: Additional sources).
- **When assigning:** If in the “Assign variables” window you confirm a list as the row source (see Data sources and relationships: The “Assign variables” window), the designer also creates a rule. Its name follows the list, if necessary with the suffix “(Regel)”. After “Save” it is taken over as the row source; “Cancel” removes it, and nothing is assigned.

[Image: Excerpt from the “Data” area. At the top is the row “Rechnungsposition · Rechnung” with the violet badge “1:N” and, on the right, the sign ƒ in a small box. Below it follow two rules, each with a violet ƒ badge and a gray gear at the right edge: “Rechnungsposition · Positionen” and “Rechnungsposition · Kennzahlen”. The second rule is expanded. Below a search box “Search in this relationship...” is the violet heading “Calculated fields”, below it the entries “Summe” and “Anzahl” with a green badge “123” and, on the right, the suffix “per row”. Then follow the sentence “(one summarized row)” and, in brown text, the sentence “Summarized — the individual fields no longer exist here, but the lists below still do.”]
Caption: The “Data” area: Rules sit directly after their list, their calculations below them.
- Image marker 1: The sign ƒ on a list creates a rule for exactly this list.
- Image marker 2: A rule appears as “Table · name of the rule” directly after its list.
- Image marker 3: The gear opens the “Edit rule” window.
- Image marker 4: The calculations of a rule appear as “Calculated fields” at the very top below it.

If a name already exists in the template, the designer keeps counting, such as “Neue Regel 2”. Counting is across the whole template, so that no two rules are ever named the same. A rule you have just created stays only if you close the window with “Save” (see Saving, canceling, deleting).

The sign ƒ is found not only in the “Data” area but also in the selection windows, such as in “Choose field” or in the “Edit text” window. If you create a rule there, the rule window opens over the selection window; after closing, the new rule is in its list. In the assistant for buttons, no rules are available to choose.

#### Reopening a rule

In the “Data” area each rule sits directly after its relationship, as “Table · name of the rule” with the sign ƒ, such as “Angebotsposition · Offene”. You can open it in three ways:

| Where | What you click | What happens |
|---|---|---|
| “Data” area and the windows “Choose field” and “Choose a field of this row” | ⚙ on the right of the rule entry (tooltip “Edit rule (filter, calculate, selection, variables)”) | Opens the rule. From a selection window the rule window opens over it; after closing, all open lists show the new state. |
| Properties of a data table, section “Data” | “⚙ Filter & sorting (rule)” | Directly opens the rule the table sits on (tooltip “Opens the rule »…« — filter, sorting, calculations, selection”). The button “Data source…” next to it opens the “Data source & sorting” window instead (tooltip “View or change the row source of this table”; see Data tables: The “Data source & sorting” window). When which button appears is described under Data tables: “General” tab: “Data” section. For a table in a table cell it says “⚙ Data source & sorting” there; you open its rule in the “Data” area with ⚙ on the rule below the list (see Cells, header row and page break: Table in a table cell). |
| Window “Data source & sorting” | “⚙ Edit rule” below the sentence “Filter, sorting, grouping and selection are in the rule …” | Opens the rule. This window deliberately does not offer filter and sorting again, so that filtering is not done in two places. |

### The “Edit rule” window

At the top is the “Rule name”, below it four tabs, at the bottom the buttons “Delete rule”, “Cancel” and “Save”, at the top right a ✕. The tabs follow the order in which printing works through a rule. A rule without settings lets all rows through.

| Tab | What you set there | When it takes effect in printing |
|---|---|---|
| “Filter” | Which rows come into the rule | first |
| “Calculate” | Group rows and calculate sum, count, average, minimum or maximum | after the filter |
| “Selection” | The order and, if you wish, particular records, such as the first or the top five | after grouping |
| “Variables” | Custom values that are calculated for each row of the rule | last |

When it opens, the “Filter” tab is always in front; the active tab is underlined in color. You can make the window larger or smaller on all four edges. If the content is longer than the window, it scrolls, and the buttons at the bottom stay in place. As long as the fields of the table have not been loaded yet, the tabs “Calculate”, “Selection” and “Variables” briefly show “Loading fields…” and then build themselves.

[Image: The “Edit rule” window on a white background above the grayed-out surroundings. At the top left the title, at the top right a ✕. Below it the field “Rule name” with the name “Große Posten”. Then four tabs: “Filter” (underlined, active), “Calculate”, “Selection” and “Variables”. Below the tabs the sentence “Only records that meet these conditions (AND/OR):” and below it a light gray box. At the top left in the box is the switch “AND” (blue, selected) next to “OR”. Below it two condition cards: In the first, at the top is the selection “Menge”, below it the comparison “greater than”, the switch “123” (blue, selected) next to “ƒx” and the value “0”. In the second are “Sum of Charge · Rechnungsposition · Wert”, below it “greater than”, “123” and the value “1000”. At the top right of each card is a ✕. Below the cards are the buttons “Condition” and “Subgroup”, below the box the button “Remove filter”. At the very bottom the bar with “Delete rule” (red, left), “Cancel” and “Save” (blue, right).]
Caption: The “Edit rule” window with the “Filter” tab: a filter of two conditions, joined with AND.
- Image marker 1: The name of the rule. Under this name tables and fields find the rule.
- Image marker 2: Four tabs, in the order in which printing works through the rule. When it opens, “Filter” is in front.
- Image marker 3: AND: All conditions must be met. OR: One is enough.
- Image marker 4: A condition: field of the row, comparison, value. With 123 | ƒx you compare with a fixed value or with a value from the data.
- Image marker 5: Here you add a further condition or a subgroup.
- Image marker 6: The bar stays in place when scrolling. A changed filter takes effect on the sample data only after “Save”.

#### The name and renaming

The “Rule name” (with ⓘ) is the display name in the “Data” area and at the same time the designation under which tables and fields find the rule. The default is the name the designer assigned when creating it. The “Data” area shows a new name while you type.

- **References move along:** As soon as you leave the field, the designer moves all references to the rule along: tables, fields, images, conditions and texts in the document, the custom variables, the conditional settings of the template and other rules. It reports how many there were: “Renamed: … reference(s) to this rule moved along …”.
- **Duplicate names:** If another rule of the template already has this name, the field jumps back to the old name, and the designer suggests a free one: “Another rule is already called »…«. The name was not accepted — … A free one would be, for example, »…«.” Names that are the same in the spelling used for references (see the next point) count as equal, such as “1. Mahnung” and “1 Mahnung”: Both become “1_Mahnung”. “Mahnung 1” and “Mahnung1”, by contrast, are different, as are “Offene” and “offene”.
- **Names on the same record:** Likewise the designer does not accept a name that a field or a relationship at the same place already has, also its own, for a rule on a source or on a relationship directly below the primary source also the list of an additional source. The result of the rule would replace it there: A rule “Positionen” on the relationship “Positionen” would make every table, count and sum under “Positionen” calculate only with the rows of the rule. The field jumps back to the old name, and the designer names who has the name and suggests a free one: “The name »…« is already taken at the same place: the relationship »…« is called that. The name was not accepted — … A free one would be, for example, »… 2«.” Comparison is made as for duplicate names in the spelling used for references; uppercase and lowercase count. Checking is done when renaming; a rule that is already called that, for example from an import, stays as it is, and the document reports it (see Problems and messages: Rules).
- **Spelling:** For references, spaces become underscores, punctuation and special characters are dropped; umlauts, accented letters and digits stay. “1. Mahnung” thus becomes “1_Mahnung”. If you leave the field empty, the rule is called “Regel”.
- **Taking back:** “Cancel” also reverses a renaming together with all references moved along.

#### Saving, canceling, deleting

What you change in the window is immediately in the opened template. When it becomes visible depends on the tab: Changes in the tabs “Calculate”, “Selection” and “Variables” recalculate the sample data immediately, and the “Data” area and the canvas follow. A changed filter takes effect on the sample data only when you click “Save”.

| Button | What it does |
|---|---|
| “Save” | First checks whether rules anywhere in the template read each other in a cycle (see When rules read each other in a cycle). If something has changed or the rule is new, it recalculates and creates an undo step of its own (Ctrl+Z, see Working on the canvas: Undo). Then it closes the window and continues a flow that was begun, such as the column selection of a new table. |
| “Cancel” | Tooltip “Don't apply anything — a rule that was just created is removed again”. If you changed something, the designer asks “Discard unsaved changes and close?”: “Cancel” stays in the window, “Discard” closes. A rule that was just created disappears completely. For an existing rule the designer restores the state from when it was opened, together with renamings and their references, and recalculates. Without a change the window closes immediately. |
| ✕ at the top right | Tooltip “Cancel / close”. Works like “Cancel”. |
| Esc key | Works like “Cancel”, with the same confirmation question. |
| “Delete rule” | Asks “Delete this rule?” (“Cancel” or “Delete”). After that the rule is gone, everything is recalculated, and the window closes. Ctrl+Z brings the rule back. If a table was just about to be created from the rule, it is no longer created. |

What merely opening changes does not count as a change, such as the empty first condition in the filter or older variables of the rule that the designer converts once to today’s form. A click next to the window is also meant as canceling; “Cancel” and ✕ are more reliable.

> **Good to know:** “Save” in the rule window closes the window with the new state in the opened template. The rule is stored in Dynamics only with “Save” of the template (see Managing templates: The template row).

> **Caution:** When deleting, the designer does not count what points to the rule. Tables and fields on it stay on the canvas; in the PDF such a table prints no row, and fields of the rule stay empty. Before deleting, check whether a table still sits on the rule.

> **Good to know:** As in every confirmation question, the Enter key triggers the right-hand button, here “Discard”, “Delete” or “Close anyway” (see Problems and messages: The windows).

### “Filter” tab: which rows come in

The filter determines which rows come into the rule, for example only items with a quantity above zero. Without a condition, all rows are included. The filter checks each row on its own; what does not match drops out before anything is grouped, counted or selected. Above the builder it says “Only records that meet these conditions (AND/OR):” with an ⓘ.

1. In the “Filter” tab there is already an empty condition. Click “Choose field …” and choose a field of the row, then the comparison and the value.
2. For each further condition click “Condition”. At the top you use “AND” or “OR” to set whether all conditions or only one of them must be met.
3. Click “Save”.
   → Only now does the designer calculate the sample data with the new filter.

The filter uses the same condition builder as visibility and variables. How it works, with AND and OR, with subgroups and with a condition without a value, is described under Conditions: The builder and Conditions: AND, OR and subgroups.

In the filter of a rule some things are different from other conditions:

- **Choosing fields per row:** “Choose field …” opens the “Choose a field of this row” window. It shows only the fields of the row, its relationships and lists together with their rules and your custom variables, no system variables (see Data tree and field picker: The “Choose a field of this row” window).
- **Fixed value or value from the data:** To the right of the comparison is the switch “123” | “ƒx” (see Comparing with a list, a variable or another rule).
- **Note lines:** Below a condition, gray or red lines explain how a custom variable works here or why a reference does not work.
- **Only its own list:** A filter takes effect only on the rows of its list. A rule on the batches of an item filters batches; the items above them all stay.

“🗑 Remove filter” below the builder (tooltip “Removes all conditions of this rule — the rule then lets all rows through again.”) takes out all conditions without a confirmation question, also a filter written by hand. The sample data is recalculated immediately, and the designer reports “Filter removed — the rule lets all rows through again.” “Cancel” brings the filter back.

A filter that was not built with the builder, for example from an import, is kept and continues to take effect; as soon as you create a condition here, the builder replaces it. How the designer shows it is described under Conditions: Conditions written by hand; how it checks it for typing errors is described under Conditions: Notes and warnings.

> **Good to know:** Printing checks the filter for each row after loading. Simple comparisons in the rule of a list, such as “Menge greater than 0”, it also passes on to Dynamics already when loading; fewer rows then arrive, and the result stays the same. Printing still loads the whole list if something else needs it unfiltered (see Data sources and relationships: How the document fetches the data). Which comparisons take effect already when loading and which only afterwards is described under Conditions: Conditions and loading the data. An additional source is always loaded in full, even with a filter (see Data sources and relationships: What the canvas loads and what is printed).

#### Which comparisons there are

Which comparisons are available and what each one checks depends on the kind of the field: text, number and amount, date or yes/no. The complete list is under Conditions: The comparisons.

#### Comparing with a list, a variable or another rule

In the filter of a rule more can be compared than in other conditions:

- **Over a list:** If a list (1:N) hangs on the row, in the “Choose a field of this row” window choose on the right of the field a summary such as “Sum” or “Count” and then click the field. The example with the batches and the rules of the summaries are under Conditions: Sum, count and so on over a list. In this, rounding is done first, then summing (see Round first, then sum).
- **With a custom variable:** A custom variable (“@Name”) has the same value in every row, because it is calculated once for the whole document before the first rule runs (see Variables: When a custom variable is calculated).
- **With a value from the data:** With the switch “123” | “ƒx” to the right of the comparison you compare with a field, the result of a rule below it or a custom variable instead of a fixed value; the switch exists only in the filter of a rule and in the condition branches of its variables (see Conditions: Fixed value or value from the data and What a rule may read).

**Against the result of a rule below:** If a rule of its own hangs on a list under the row, such as a sum only over certain batches, the field picker also offers its fields. For this the designer recommends setting the lower rule under “Selection” to “Only the first”. Whether such a comparison takes effect correctly in the document is currently not assured. Check the result in the full preview (see Full preview and PDF: The full preview) before you rely on it. For a sum over all rows of a list, the way through the summary above is the reliable one.

System variables such as page number and user are not available in the filter: The page number comes into being only when the document is distributed across the pages, long after it is settled which rows are printed. A condition on it would never apply.

### “Calculate” tab: grouping and calculating

In the “Calculate” tab the rule calculates one value from many rows, for example the sum of all amounts. Each calculation becomes a new field that you then drag into the template like any other field. Without grouping, the calculation covers all rows, with grouping once per group. The sentence at the top of the tab says the same.

1. Under “Calculated fields” (with ⓘ) click “Calculation” (tooltip “Create a new field that calculates one value from several rows”).
   → A new card appears: “is Sum of” with the first number or amount field; the name is still empty.
2. At the top of the card give the new field a name, such as “Nettobetrag”.
3. Choose the kind of calculation and the field: “is Sum of Betrag”. With “Count” you need no field.

A calculation without a name does not count: It is not calculated and groups nothing. As soon as the first calculation has a name, the rule groups. Without a characteristic under “Group rows by (optional)”, everything then becomes a single row, even if there are no rows at all.

| Setting | What it does | Default |
|---|---|---|
| “Group rows by (optional)” (with ⓘ) | The characteristics by which rows become groups (see Grouping rows). “Field” adds a characteristic, preset with the first field of the list. Each characteristic is a selection list with all fields of the table, sorted by their display name. If a saved characteristic no longer exists in the table, the list shows the first field; in the rule, however, the old characteristic is still there. Then choose the field you want again. The ✕ next to it (“Remove this field from the grouping”) takes a characteristic out without a confirmation question. | no characteristic |
| Name of the calculation (“Name of the new field, e.g. Net amount”) | The name of the new field. For references the same spelling applies as for the name of the rule. | empty |
| “is” … “of” … | The kind of calculation and the field (see The kinds of calculation). For “Count”, instead of the field there is “of the rows — needs no field”. | Sum of the first number or amount field |
| “rounded to” … “Decimal places” (with ⓘ) | Only for sum and average: to how many places each value is rounded before calculating (see Round first, then sum). | empty, so “as in the template” |
| ✕ at the top right of the card | Tooltip “Remove this calculation”. Deletes the calculation after a confirmation question that counts what points to it: “… place(s) are bound to it and print nothing afterwards.” or “Nothing is bound to it — nothing changes in the document.” | – |

[Image: The “Edit rule” window with the name “Umsatz je Einheit”; the “Calculate” tab is underlined. Below the tabs is a gray explanatory text (“Calculates one value from many rows …”). Below it a white-bordered box with the sentence “This calculation is not yet a single value: The result is a list with one row …” and the button “Make available as a single value”. Below it a box with a yellow background that begins with the bold sentence “As soon as you group, the individual fields no longer exist.” and explains in four paragraphs what happens when grouping with the individual fields, with the lists below and with two exceptions. Then “Group rows by (optional)” with a selection list in which “Einheit” appears, a ✕ next to it and below it the button “Field”. After that “Calculated fields”: a card with the name field “Umsatz” and a red ✕ next to it on the right, the row “is Sum of Gesamt” with two selection lists and the row “rounded to” with an input box in which “as in the template” appears in gray, and the word “Decimal places”. Below the card the button “Calculation”. At the very bottom the bar with “Delete rule”, “Cancel” and “Save”.]
Caption: The “Calculate” tab: a grouping by “Einheit” with the calculation “Umsatz” as a sum.
- Image marker 1: This box says: The result is still a list. For a table, such as a totals row, this is right; then do not click the button.
- Image marker 2: The yellow box explains what happens when grouping: The individual fields drop out, the lists below stay.
- Image marker 3: The characteristic by which groups are formed. Without a characteristic everything becomes a single row.
- Image marker 4: The name of the new field. A calculation without a name does not count.
- Image marker 5: The kind of calculation (sum, count, average, minimum, maximum) and the field that is calculated over.
- Image marker 6: Each value is first rounded to these places and then summed. Empty means: the places of the template.

The calculations then appear in the “Data” area under the rule in the section “Calculated fields”, at the very top.

- **Renaming:** If you change the name of a calculation and leave the field, the designer moves the references to it along: in the document, in the columns of tables on this rule, in conditions and in the variables of the rule. It reports “Renamed: … reference(s) to »…« moved along …”. If several tables have the same rule name and cannot be assigned unambiguously, it changes nothing there and says so: “Caution: … table(s) have the same rule name and could not be assigned unambiguously …”. Then check the columns of these tables by hand. “Cancel” takes the renaming back.
- **Duplicate names:** If another calculation or variable of this rule already has the new name, it jumps back: “A field »…« already exists in this rule. …”. This check exists only when renaming, not when naming for the first time. Therefore make sure yourself that each calculation has its own name: If two are named the same, only the later one counts in printing. If a calculation is named like a characteristic, it replaces its value; the document reports this.
- **Field no longer in the list:** If a calculation has a field that the list no longer offers, it appears as “… (not in the list)” and stays until you choose another.

#### The kinds of calculation

| Kind of calculation | Result | Empty values |
|---|---|---|
| “Sum” | all values added up; only numbers and amounts are available to choose | do not count |
| “Count” | how many rows there are; needs no field | count |
| “Average” | the mean; only numbers and amounts are available to choose | stay out, also from the denominator |
| “Minimum”, “Maximum” | the smallest or largest value; all fields are available to choose, also text and date, compared according to the kind of the value | are skipped; if there is no value at all, the result is 0 |

“Empty” means: nothing in it. If the cell contains a word such as “n/a”, it is not empty: It counts as 0 and, for the average, is included. If you change the kind of calculation and the chosen field no longer fits, the designer takes the first one that fits. “First” does not exist here: You choose the first record in the “Selection” tab with “Only the first”.

#### Round first, then sum

For sum and average, each individual value is rounded before calculating. That way the document adds up: Four rows with 0.005 each appear as currency four times as 0.01 EUR, and the sum is then 0.04 EUR, not 0.02 EUR. This applies in three places:

| Place | Rounded to | Own setting |
|---|---|---|
| Calculation in the “Calculate” tab of a rule (sum, average) | the places you set on the calculation under “rounded to” … “Decimal places”; 0 to 6 places are possible, a larger number counts as 6 | If the field stays empty, the “Decimal places (currency)” of the template apply (see Numbers, currency and dates: Currency & numbers), normally 2. If you empty the field, the template applies again. The setting applies only to this calculation. |
| Custom variable with “Sum of” or “Average of” | the decimal places of the variable | Without a setting of its own on the variable, the “Decimal places (currency)” of the template apply. |
| “Sum” or “Avg” in a condition, also in the filter of a rule, such as over the batches of an item | always the “Decimal places (currency)” of the template | none; there is no field there for places of your own |

In all three cases the decimal places of the template apply even if they come through a condition branch or from the record. Only a sum in the condition of a condition branch of the template itself calculates with the fixed places of the template, because which branch applies is only settled afterwards (see Numbers, currency and dates: Condition branches). Rounding also applies to quantities and weights: With two places, 1.234 + 1.234 therefore gives 2.46. You need a setting of your own only for exceptions, such as a quantity with three decimal places. For count, minimum and maximum the field does not exist: No new number is created there.

#### Grouping rows

Under “Group rows by (optional)” you choose a characteristic with “Field”. All rows with the same value in it become one row, and the calculations run per group. Example: three items, twice Apfel at 100 and 300, once Birne at 50. Grouped by product with the sum of the amount, this gives two rows: Apfel with 400 and Birne with 50.

- If you choose no characteristic but create a calculation, everything becomes a single row. This is the way to a grand total.
- With several characteristics, the rows that match in all characteristics form a group.
- Uppercase and lowercase count: “Apfel” and “apfel” give two groups. Rows without a value in the characteristic form a group of their own.
- Without sorting, the groups are in the order in which their first record occurs.
- If the characteristic is a choice or yes/no field, the grouped row also knows its value from Dynamics. A condition whose value you choose among the options (for a choice field “by option value”) therefore applies there as for every individual row, such as “Art is Ware” for a choice field or “Bezahlt is no” for a yes/no field: in a table on the rule as well as in the variables of the rule. The group of rows without a value in the characteristic counts as empty here.

> **Caution:** After grouping, the individual fields of the rows no longer exist; what is left are the characteristics and the calculations. A table on this rule can therefore show only these fields. For the table of the individual items and for their sum, use two different rules.

If the rule groups and further relationships or rules hang on its table, a yellow box in the tab explains what happens. For tables from Dynamics this is almost always the case, because even a lookup counts as a relationship. The box begins with “As soon as you group, the individual fields no longer exist.” and says four things:

- A new row is created per group; what is left are the characteristics and the calculations.
- The lists below stay: Under a group are the rows of all records of this group in a common list, sorted once across everything. If the list has no sorting of its own, it is ordered by its first column, and the designer says by which.
- Two exceptions stay empty and report themselves: a rule below it that itself groups, and a rule below it with “Only the first”, “Only the last” or “The one at a specific position”.
- This applies in the preview just as in the PDF.

#### A list with one row or a single value

Even if a rule groups everything into one row, its result is a list, just with one row. For a table this is right, for example for the totals row. As a single value, such as in a text, a rule on a source by contrast needs the selection “Only the first”. For a rule on a list, such as on the items, this currently does not help, although the box in the tab suggests it (see Using the result). A box in the tab points to the selection: “This calculation is not yet a single value: The result is a list with one row. …” It appears if the rule has a calculation and does not select a single record. Right after creating the first calculation it is still missing; it appears as soon as you switch to another tab and come back.

The button “Make available as a single value” in the box sets the selection to “Only the first” and recalculates. You achieve the same in the “Selection” tab via “Keep only specific records”. If a table already sits on the rule, the designer warns, because it would stay empty in the PDF afterwards. For a totals row, therefore, do not click the button.

### “Selection” tab: sorting and selecting

The tab sets the order and, if you wish, selects particular records: the first, the last, the one at a specific position or the top N. Without a selection, all rows remain, and sorting works even without a selection. Sorting and selecting are done after grouping.

[Image: The “Edit rule” window with the name “Größte Posten”; the “Selection” tab is underlined. Below the tabs is a gray explanatory text: The tab sets the order and, if you wish, selects particular records; without a selection all remain. Below it “Sort by” with two selection lists side by side: “Gesamt” and “descending”. One row further down “then by” with “— no second level —” and “ascending”. Further down a checked box “Keep only specific records”, below it “Mode” with the selection “The first N (e.g. the top 5)” and “Count (N)” with the number 3. At the very bottom the bar with “Delete rule”, “Cancel” and “Save”.]
Caption: The “Selection” tab: sort by “Gesamt” in descending order and keep the top three records.
- Image marker 1: Sort by: the field and the direction. The sorting also determines what “first” or “last” means.
- Image marker 2: A second level decides only for equal values in the first. There are no more than two levels.
- Image marker 3: Switches the selection on. The checkmark immediately sets “Only the first”; without the checkmark all rows remain.
- Image marker 4: Which records remain: the first, the last, the one at a position or the top N.
- Image marker 5: The number for the mode, counted from 1: 3 means the top three records.

#### Sorting

| Setting | What it does | Default |
|---|---|---|
| “Sort by” (with ⓘ), first row | The field and the direction, “ascending” or “descending”. Available to choose are the fields of the table, sorted by their display name. “— unsorted (database order) —” takes the sorting out; the second row then also drops out. | “— unsorted (database order) —”, ascending |
| “then by”, second row | Decides only for equal values in the first row, such as first by product and, for the same product, by date. Appears only once the first row has a field. There are no more than two levels. | “— no second level —”, ascending |

- Without sorting, the order in which Dynamics delivers the rows applies. It is random; anyone who needs a particular order sets it here. The sorting also determines what “first”, “last” or “position 3” means.
- The rule orders numbers by their size, 2 before 10. Whether, for example, “1,5” counts as a number depends on the “Number style (comma/period)” in the template settings (see Numbers, currency and dates: Currency & numbers).
- If a field contains different kinds of values, numbers come first, then dates, then text and last empty values; “descending” only reverses the order within these groups. Empty values are therefore always at the end, whichever the direction.
- If there is still a tie after the second row, the rows keep their original order.
- After grouping, only the characteristics and the calculations are available to choose, the calculations as “… (calculation)”. This is how, for example, “the 5 customers with the largest revenue” comes about: sort by the calculation “Umsatz” in descending order and choose “The first N (e.g. the top 5)” with 5. A field chosen earlier that no longer exists afterwards appears in the list as “⚠ … — does not exist after grouping”. It sorts by nothing; replace it. The document reports it too.
- The variables of the rule are not available to choose, because they only come into being after sorting.

#### Keeping specific records

| Setting | What it does | Default |
|---|---|---|
| “Keep only specific records” | Switches the selection on. The checkmark immediately sets the mode “Only the first”: One click is enough, and the list becomes a single record. Without the checkmark all rows remain again; a sorting stays. | off |
| “Mode” (with ⓘ) | Which records remain, see the table below. Appears only with the checkmark. | “Only the first” |
| “Position (n)” or “Count (N)” (with ⓘ) | The number for the mode, counted from 1: 3 is the third record or the top three. Appears only for “The one at a specific position” and “The first N (e.g. the top 5)”. Whole numbers from 1 to 2,147,483,647 are allowed. A smaller or empty input counts as 1, a larger one as the maximum number; the field itself does not show this correction. | 1 |

| Mode | Result |
|---|---|
| “Only the first” | exactly one record: the top one after sorting |
| “Only the last” | exactly one record: the bottom one |
| “The one at a specific position” | exactly one record, such as the third; the number is under “Position (n)”. If there are fewer rows, the record stays empty. |
| “The first N (e.g. the top 5)” | the top N records as a list; the number is under “Count (N)”. If there are fewer, all stay. |

Example: Sorted by date in descending order, “Only the first” gives the newest record. A record without a date is never “the newest”, because empty values are at the end. Sorted by revenue in descending order with “The first N (e.g. the top 5)” and 5, you get the five largest.

> **Caution:** **A rule with a single selection as a row source prints no row.** “Only the first”, “Only the last” and “The one at a specific position” deliver a single record, not a list. A table on such a rule prints no row in the PDF; on the canvas its sample row is still there. For a list, choose “The first N (e.g. the top 5)”. The designer warns if you switch a rule with tables on it to a single record (“This rule now returns only ONE record — …”), if you do so when creating a table, and if you choose such a rule as a row source (confirmation question “This rule returns only one record” with “Use it anyway”).

> **Good to know:** The selection shortens the result, not the loading: All rows are loaded, selecting is done afterwards. Less can be loaded only with a filter on a list, and only with comparisons that already take effect when loading (see Filter). If the template also uses the list itself, such as for a sum over all items in the text, printing additionally loads it in full for that. If the upper limit of 20,000 rows per query is reached, sums and selection are no longer correct; what the canvas loads and that an additional source is always loaded in full are described under Data sources and relationships: What the canvas loads and what is printed.

### “Variables” tab: values per row

In the “Variables” tab you create, under “Custom variables of this rule” (with ⓘ), values that are calculated separately for each row of the rule, such as a discount per item: a fixed value, a calculation or an if-then. Calculation is done last, after the rule has filtered, grouped and selected; a variable therefore sees only the rows the rule has kept. Afterwards the variables appear as new fields under the rule, in the section “Calculated fields”.

[Image: The “Edit rule” window with the name “Positionen”; the “Variables” tab is underlined. Below the tabs is the heading “Custom variables of this rule” with an info sign and a gray explanatory text (“Values you define yourself — a fixed value, a calculation or if-then …”). Below it two bordered rows: In the first, on the left is a green badge “€”, then the name “Rabatt”, on the right a pencil button and a ✕ button. In the second is a blue badge “Abc”, the name “Preisklasse” and the same two buttons. Below the list the button “Variable” with the @ symbol. At the very bottom the bar with “Delete rule”, “Cancel” and “Save”.]
Caption: The “Variables” tab of a rule with two variables.
- Image marker 1: The badge shows the type of the variable: 123 number, € currency, date, yes/no, otherwise Abc.
- Image marker 2: The name of the variable. If you point at it, you see the content, for condition branches for example “1 condition branch(es), otherwise: …”.
- Image marker 3: The pencil opens the “Edit variable” window over the rule window.
- Image marker 4: The ✕ deletes the variable after a confirmation question that counts what points to it.
- Image marker 5: The button opens the “New variable” window; you choose the type there yourself.

| Control | What it does |
|---|---|
| Badge | The type of the variable: “123” number, “€” currency, “Date”, “Yes/No”, otherwise “Abc”. |
| Name | The name of the variable; without a name it says “(no name)”. If you point at it, you see the content, for condition branches for example “2 condition branch(es), otherwise: …”. |
| ✎ (“Edit variable”) | Opens the “Edit variable” window over the rule window. After saving there, it is recalculated. |
| ✕ (“Remove variable”) | Deletes the variable after a confirmation question that, as for calculations, counts what points to it (wording under Preview, saving, renaming and deleting). |
| “Variable” | Opens the “New variable” window; you choose the type there yourself. |

#### What is different for a variable of the rule

“Variable” and ✎ open the same window as for a custom variable (see Variables: Creating a custom variable), with the row as the point of reference. Here too you choose the type yourself. Older rule variables that consist only of a formula are converted by the designer once to today’s form when the rule is opened. What is different:

| Point | Custom variable | Variable of a rule |
|---|---|---|
| Value | one for the whole document | one per row, calculated after the rule has filtered, grouped and selected |
| Name | unique in the template | unique in this rule; otherwise “A variable with this name already exists in this rule.” |
| Where to find it afterwards | under “Custom variables” as “@Name” | as a field under the rule, in the section “Calculated fields”; not under “Custom variables” |
| “What should it look like?” | for number and currency | missing; a note appears in its place (see What the value looks like) |
| Field picker for the value | “Choose field”, the whole data tree | “Choose a field for the variable”, only the row and what lies below it |
| Condition of a condition branch | on the printed record | per row |
| Type yes/no that takes over a yes/no field from Dynamics | is set to yes or no, like the field; with the label “Unbezahlt” it prints “No” | prints the label of the field, such as “Unbezahlt”; in conditions, as with the field, what counts is whether it is set to yes or no: “is no” applies to “Unbezahlt” (see Conditions: Yes/No) |
| Type yes/no with a fixed value or a yes/no result | prints “Yes” or “No” in the template language | likewise; in conditions what counts is whether it is set to yes or no (see Conditions: Yes/No) |
| Preview row | with the sample record | on the first row of the rule |
| Saving | applies immediately in the template | applies in the rule; final only with “Save” in the “Edit rule” window |
| Deleting | confirmation question without a count | confirmation question with a count |

#### Choosing fields in a variable of the rule

The button “Choose field …” opens the “Choose a field for the variable” window here, with a ✕, a search box “🔍 Search…” and the note “The variable is calculated for each row separately. Through a relationship you reach its fields; for a relationship to several records, choose the summary (sum, count, …) on the right of the field. A rule cannot see upwards.” The header says “Row from »…«”. Below it are the fields of the row, its relationships, lists with the summary on the right of the field and the rules below; nothing from further up. The type of the variable restricts the fields as for a custom variable (see Variables: The “Choose field …” button). After the choice the button shows, for example, “Produkt · Preis” or “Sum of …”.

This picker does not offer custom variables of the template and system variables. The variable can still use custom variables, today’s date and the user: Write them in via “ƒx as formula”, for example `{{@Rabattsatz}}`. Custom variables are also available to choose in the field picker of the condition of a condition branch. This picker is called “Choose a field of this row” here and is described under Data tree and field picker: The “Choose a field of this row” window.

#### What the value looks like

What the value looks like in the document is determined by the place where you insert it, together with the template settings. Instead of “What should it look like?” there is therefore a note:

- for currency: “How it looks — currency symbol, decimal places, country style — is decided by the template settings. For this one place it can also be done on the placeholder, e.g. in francs: `{{Currency:Name|CHF}}`.”
- for number: “How it looks — country style and thousands separator — is decided by the template settings. It shows as many decimal places as it needs (at most four); you set fixed places on the placeholder, e.g. two: `{{Number:Name|2}}`.”

[Image: The “New variable” window, opened from a rule. At the top, side by side, the field “Name” with “Rabatt” and the selection “Type” with “Currency”. Directly below it, instead of the fields for the appearance, a gray note sentence: “How it looks — currency symbol, decimal places, country style — is decided by the template settings. For this one place it can also be done on the placeholder, e.g. in francs:”, followed by the placeholder “{{Currency:Name|CHF}}” in typewriter font in a gray box. Below it “What should be in it?” and the box “CONTENT”: first row “= | Variable | Gesamt | ✕”, second row “times | Fixed amount | 0.1” with two buttons (enlarge and info sign) and ✕, below it the button “Calculation step” and “ƒx as formula”. Below the box the button “Condition branch” and the preview row with a blue stripe: It gives the value 116 for the first row of the rule and below it, in small gray text, that other rows may hit another branch and that the placeholder in the cell determines how the value looks in the document. At the very bottom “Cancel” and “Save”.]
Caption: A variable of a rule: a note instead of the settings for the appearance, the preview calculates on the first row.
- Image marker 1: Instead of “What should it look like?” there is a note here: The appearance is determined by the template settings or the placeholder at the place where you insert the value.
- Image marker 2: A click on the chosen field opens “Choose a field for the variable”. There are only the row of the rule and what lies below it, nothing from further up.
- Image marker 3: The preview calculates on the first row of the rule. Other rows may hit another condition branch.
- Image marker 4: “Save” writes the variable into the rule. It becomes final only with “Save” in the “Edit rule” window.

If you drag the variable from the “Data” area into the document, the designer sets the matching formatting itself for number, currency and date. If the display is to depend on a condition, such as a different currency symbol per country, set that in the template settings (see Numbers, currency and dates: Condition branches).

#### Preview, saving, renaming and deleting

- **Preview row:** “Results on the FIRST row of this rule: …”, below it “Other rows may hit a different branch. How the value LOOKS in the document (symbol, decimal places) is decided by the placeholder in the cell.” If the rule does not deliver a row yet, it says “No sample row for this rule yet — the preview can only calculate once the rule returns rows.” If the variable belongs to a cycle or reads a field that the row no longer has after grouping, the preview shows “(empty)” with the reason.
- **Saving:** “Save” in the variable window writes the variable into the rule and recalculates the sample data. “Cancel” in the “Edit rule” window with “Discard” also takes back new, changed and renamed variables (see Saving, canceling, deleting).
- **Renaming:** As for a calculation (see “Calculate” tab), the designer moves the references along and then reports in the window of the rule “Renamed: N reference(s) to »Alt« moved along (document, table columns, conditions, custom variables of the template and the other variables of this rule).” If several tables have the same rule name, the same “Caution” message is added: “Caution: N table(s) have the same rule name and could not be assigned unambiguously — NOTHING was changed there. Please check the columns of these tables by hand.” This message stays longer.
- **Deleting:** The confirmation question counts what points to the variable: “Really delete the variable »Name«? 2 place(s) are bound to it and print nothing afterwards.” or “… Nothing is bound to it — nothing changes in the document.”

#### What a variable of a rule can read

Number and currency are calculated, text stays text: “01069” keeps the leading zero.

- A variable sees only downwards, like every rule (see What a rule may read): its own row, linked data such as the product of an item and the rules below, plus the custom variables of the document and the system values date and user.
- If the rule has grouped, the row has only the characteristics and the calculations left. If a variable then reads fields of the individual rows or summarizes a list of the level above, it stays empty, and the document reports it. Use one of the calculations of the rule instead, for a sum over the whole document a custom variable.
- If a variable reads another variable of the same rule, printing calculates it in the right order. They must not read each other in a cycle, not even indirectly; otherwise all those involved stay empty, and the document reports the cycle.
- If a variable is named like a field of the row, its value replaces this field; the document reports it. If two variable names give the same spelling for the references, such as “Netto Betrag” and “Netto_Betrag”, only one of the two applies; the document also reports this.

### Using the result

In the “Data” area, under the rule there is first the section “Calculated fields” with its calculations and variables. Below it, without grouping, follow all fields of the table and its relationships. If the rule groups, there are only the characteristics, without a characteristic the sentence “(one summarized row)”, plus “Summarized — the individual fields no longer exist here, but the lists below still do.” and the lists. This gives these ways:

- **As a table:** Drag the rule from the “Data” area onto the page or choose it as the row source of a data table. No new rule is created in the process; you go straight to the column selection. The table shows one row per record of the rule.
- **As a single value:** For a rule on a source, such as on an additional source or on the main record, drag a field of the rule into a text. For it to show a value, the rule must deliver exactly one record: Under “Selection” it then says “Only the first”, “Only the last” or “The one at a specific position”.
- **For a rule on a list**, such as on the items, its fields in the “Data” area count as “per row”. If you drag one of them onto the page or into a text, the designer currently refuses it: “»…« applies per row and needs a table cell — …”. If you insert it in the “Edit text” window, it does appear as a marker in the text but currently delivers no reliable value; the same applies to a click into an input box. The place may stay empty in the PDF without the document reporting it. This also applies in a group. Fields of rules on the primary source or on an additional source are not affected.

You therefore show a sum over such a list in one of two ways:

- **As a one-row totals table:** A second rule on the same list groups all rows into one, and a table on it appears as a totals row below the items table. Step by step it is described under Example: the sum below the items table.
- **As a custom variable with “Sum of”:** For a sum in running text, such as “Gesamtbetrag: …”, use a custom variable of type currency that calculates “Sum of” over the items (see Variables: The kind of value). It calculates over all items, without a filter; if the table filters, this sum therefore differs from the totals row.

#### Where the result sits

The result of a rule belongs to the level to which its list is attached. A rule on the items of a quote has one result per quote. A rule on the batches of an item has one result per item; in a table of the items it therefore appears in every row, like a field of that row. The rule of a source, on the main record as on an additional source, belongs to the whole document.

#### Example: the sum below the items table

1. In the “Data” area, click the sign ƒ on the relationship of the items and name the new rule “Summen”.
2. If you filtered in the rule of the table, such as only items with a quantity above zero, create the same filter here too.
3. In the “Calculate” tab, create the calculation “Gesamt is Sum of Betrag”, without a characteristic under “Group rows by (optional)”.
   → The rule groups all items into a single row.
4. In the “Selection” tab, leave the checkmark at “Keep only specific records” unchecked, and do not click “Make available as a single value”. Click “Save”.
5. Drag the rule “Summen” from the “Data” area directly below the items table and in the column selection choose the column “Gesamt”.
   → A table with exactly one row is created: the sum. Even without items there is one row there, then with 0.
6. Design it as a totals row: Uncheck “Show header row” (see Data tables: The properties of the whole table). Give the column under “Width (mm)” the width of the amount column, right-align it and place the table with “X (mm)” exactly under this column. Place it below the items table with the positioning behavior “Flowing” so that it moves down with it (see Positioning behavior: Flowing).

[Image: Excerpt of the canvas. At the top left is the heading “Rechnung” followed by the blue field marker “Rechnungsnummer” in a dashed frame. Below it a table across the full width with a blue header row in which, in white, “Pos.”, “Bezeichnung”, “Menge”, “Einzelpreis” and “Gesamt” appear (the last three right-aligned), and a sample row with blue field markers “Pos.-Nr.”, “Bezeichnung”, “Menge”, “Einheit”, “Einzelpreis” and “Gesamt”. A little lower, under the right-hand column “Gesamt”, is a second, narrow table without a header row with only one cell and the field marker “Gesamt”. The right edge of this cell is flush with the right edge of the items table; the cell is as wide as the column “Gesamt”.]
Caption: The totals row below the items table. The canvas shows field markers instead of numbers; in the PDF the numbers appear there, in the totals row the sum.
- Image marker 1: The amount column of the items table.
- Image marker 2: The totals row: Width, alignment and position match the amount column above it.
- Image marker 3: On the canvas there is a sample row with field names. One row per record is printed; in the totals row the sum appears.

For a sum in running text, use a custom variable (see Using the result).

### What a rule may read

A rule sees only downwards. This is fixed so that the order of calculation is always unambiguous.

- **Allowed** are the fields of its own row, fields via relationships (also via a lookup upwards, such as from the item to the quote), sum, count and the like over the lists below the row, the results of rules below, on the same list and on a neighboring list (for a rule on a source also those of the rules on other sources) and the custom variables of the document.
- **Not allowed** are the results of rules further up, the rule itself and everything that closes a cycle: A reads B, and B reads A. Rules on a source, on the main record as on an additional source, also count as further up, because their result belongs to the whole document (see Where the result sits). A rule on a list must therefore not read it.

Calculation is therefore done first in depth and then upwards: first the rules on the lowest lists, last those on the top level. If a rule on a source reads the result of a rule on another source (or a rule on a list that of a neighboring list), the document calculates the one that is read first, regardless of the order in which the sources were created. Where the result of a rule sits is described under Where the result sits.

If a rule nevertheless has a reference upwards, such as from an older template, the designer removes it from the opened template the next time it recalculates and reports it: “Deleted: rule »…« — …. A rule may read only its own row and everything BELOW it, nothing from above. …” If you save the template afterwards, the reference is also gone in Dynamics. The document likewise leaves it out and reports it as a warning. The principle is: rather too many rows than too few.

- If the filter on the top level is joined with AND, the part concerned drops out: the single condition or the whole subgroup in which the reference sits, whether it contains AND or OR. In “paid AND (… OR …)” the bracket therefore drops out; “paid” stays.
- If the filter on the top level is joined with OR, the whole filter drops out, and the rule lets all rows through.
- A variable of the rule that reads upwards is emptied completely.

In the document the following also applies: If a sort level reads upwards, this level drops out. If a characteristic under “Group rows by (optional)” or the field of a calculation reads upwards, the whole grouping drops out: The rows stay individual, and the calculations are missing. The designer does not remove these two cases from the opened template; the canvas continues to show sorting and grouping.

Instead, create the key figure as a rule of its own on the same level and compare against it.

### Cycles and messages

#### When rules read each other in a cycle

If two rules read each other or a rule reads itself, there is no order in which they can be calculated. Then all rules of the template are skipped, not only those involved: Places with rule results stay empty, and tables on rules print no row until the cycle is resolved. The designer warns in three places:

- on “Save” in the rule window, as long as there is a cycle in the template, even if the rule just being edited is not involved: “The rules presuppose each other: A → B → A.” or “The rule »X« reads itself — but its result only comes into being through it.”, with “Back to the rule” or “Close anyway”;
- as a message on the canvas: “Cycle in the rule references: …”; the canvas then also calculates no rule;
- before the full preview and the PDF, with “Cancel” or “Generate anyway”.

If you generate the document anyway with a sample record, it also reports the cycle, as a warning. Without a sample record it does not name the cycle; a table on a rule then reports only that it did not find its row source and printed no row. Take out one of the two directions.

#### When there is no valid order without rules reading each other in a cycle

A rule on a list may read the rule of a neighboring list. If a rule deep in a list (such as on the batches of the items) reads the rule of a neighboring list, which in turn reads the rule above exactly this list (such as on the items), there is no order that satisfies everything: The rule above the list must calculate after the rule below it, and that one reads a result that only comes into being afterwards. There is no cycle between the rules here, so no rules are skipped. The document calculates them in the order in which they are loaded and reports it as a warning; one of the rules then calculates against a result that is still missing. The canvas shows the same message: “The rules »…«, »…«, »…« cannot be calculated in any valid order: …”. Take out one of the references, or read the value where it is already finished.

#### Messages at a glance

While you work, the designer reports in the language of its interface. Some notes at the top of the canvas are in English because they correspond word for word to the note in the document, such as the notes on typing errors in a filter written by hand, which begin with “condition '…':” (see Conditions: Notes and warnings), or “the aggregate '…' has no rows here” for a summary in a condition over an empty list (see Problems and messages: Variables and conditions). The messages about rules:

| Message | When | What you do |
|---|---|---|
| “Renamed: … reference(s) to this rule moved along …” | after renaming a rule | nothing |
| “Another rule is already called »…«. …” | the new rule name is already taken | choose another name, such as the suggested one |
| “The name »…« is already taken at the same place: the relationship »…« is called that. …”, likewise “… the field »…« is called that. …” and “… the list of the source »…« is called that. …” | the new rule name already belongs to a field, a relationship or a source list on the same record (see The name and renaming) | choose another name, such as the suggested one |
| “Renamed: … reference(s) to »…« moved along …”, plus “Caution: … table(s) have the same rule name …” | after renaming a calculation | for “Caution”, check the columns of the tables concerned |
| “A field »…« already exists in this rule. …” | the new name of a calculation is already taken in the rule | choose another name |
| “Filter removed — the rule lets all rows through again.” | after “🗑 Remove filter” | nothing; “Cancel” brings the filter back |
| “This rule now returns only ONE record — …”, “This rule returns only ONE record — the table you are just building from it therefore stays empty. …” or “The rule »…« has the selection »first/last/nth« and returns exactly ONE record. …” | a rule with a table is set to a single record | choose “The first N (e.g. the top 5)” |
| “Deleted: rule »…« — …” | a rule reads from above | create the key figure as a rule of its own on the same level |
| “Cycle in the rule references: …” | rules read each other in a cycle | resolve the cycle (see When rules read each other in a cycle) |
| “The rules »…«, »…« cannot be calculated in any valid order: …” | rules read each other across neighboring lists so that no order fits (no cycle) | take out one of the references (see When there is no valid order) |
| “»…« applies per row and needs a table cell — …” | a field of a rule on a list was dragged onto the page | build a totals row (see Using the result) |

The document itself reports in English after the full preview and the PDF. The messages about rules, with meaning and remedy, are under Problems and messages: Rules. The messages belonging to a table on a rule are under Problems and messages: Tables, those for a list with very many rows under Problems and messages: Loading data. Where the document shows them is described under Problems and messages: Notes and warnings.

### What changes in the document?

**On the canvas:** The canvas shows the fields of a rule as blue markers with their name, and a table on a rule shows a sample row, even if the rule delivers only one record. Filter, calculations and selection calculate with the sample data, but only with the excerpt that the canvas loads (see Data sources and relationships: What the canvas loads and what is printed). With a cycle, the canvas also calculates no rule.

**In the PDF:** Calculation is done afresh from all loaded data, in the order filter, group and calculate, sort, selection, variables. A rule that nothing in the template points to, no table, no field, no condition, no custom variable and no other rule, is not calculated by printing at all. Only a rule on a list whose filter already takes effect wholly or partly when loading gets a query of its own at Dynamics (see Filter), at most one per rule; the others calculate over the rows that are loaded anyway. Printing loads the whole list only if something needs it unfiltered (see Data sources and relationships: How the document fetches the data). Tables show exactly the rows of the rule in their order; calculated fields show the values over all rows the filter lets through, when grouping per group, first rounded, then summed. A table on a rule with a single record stays empty. With a cycle, all rules are dropped.

---

## Variables

*For users · Data · Page en/variablen.html*

> **In short:** A variable is a value that you define yourself or have calculated: a payment term as a date, a salutation depending on the country, a gross amount, a color that depends on the amount. It gets a name and a type. You click together its content step by step, with condition branches if you like. Then you insert the variable into texts, conditions and color fields like a field. In addition there are variables of a rule, which calculate individually for each row of their rule, and system variables such as today’s date and the page number.

### Three kinds of variables

| Kind | Where it is | Value |
|---|---|---|
| Custom variable | in the area “Data” under “Custom variables”, as “@Name” | one value for the whole document, calculated once on the printed record |
| Variable of a rule | in the window “Edit rule”, “Variables” tab; afterward as a field under the rule | a separate value for each row of the rule |
| System variable | in the area “Data” under “System variables” | filled in by the system when the document is created, such as date and page number |

You edit custom variables and variables of a rule in the same window. This page describes it for custom variables. What is different for a variable of a rule is described under Rules: What is different for a variable of the rule. You do not create system variables; they are already there (see System variables).

[Image: Excerpt of the area “Data”. The category “Custom variables” is expanded; in its header on the right is the symbol @. Below it a search box and six entries with a colored badge on the left and a small pencil on the right: “@Zahlungsziel” (violet, “Date”), “@Netto”, “@USt” and “@Brutto” (green, “123”) as well as “@Zahlungsstatus” and “@Akzentfarbe” (blue, “Abc”). Below that the likewise expanded category “System variables” with a search box and six entries: “Current page” and “Total pages” (green, “123”), “Current date” (violet, “Date”), “Current time” (blue, “Abc”), “Date & time” (violet, “Date”) and “User” (blue, “Abc”).]
Caption: Custom variables and system variables in the area “Data”.
- Image marker 1: The category “Custom variables”. The arrow expands and collapses it.
- Image marker 2: The button “+ New” opens the window “New variable”.
- Image marker 3: The badge names the type: Date, 123 (number or currency), Abc (text or color), Yes/No.
- Image marker 4: The pencil opens “Edit variable” without inserting the variable. A click on the name inserts it.
- Image marker 5: The system variables are directly below and are already there; you do not create them.

### Creating a custom variable

1. In the area “Data”, click “+ New” to the right of “Custom variables” (mouse pointer: “Create a new custom variable”).
   → The window “New variable” opens. Name and type are empty; below them there is only a note that you should choose the type first.
2. Under “Name”, enter a name, for example “Zahlungsziel”.
3. Under “Type”, choose what the variable contains, for example “Date”.
   → The window now shows “What should it contain?”, and for number and currency also “What should it look like?”.
4. Under “What should it contain?”, define the content, row by row.
   → At the bottom the window shows what comes out with the sample record: “Result with the current sample data: …”.
5. Click “Save”.
   → The window closes. The variable appears under “Custom variables” as “@Zahlungsziel” and can be inserted right away.

A custom variable needs no data source. Even in a new template without a primary source, the category “Custom variables” with the button “+ New” is ready.

#### Other ways into the window

- **In the window “Edit text”:** The list “Variables — drag or click to insert” has the same category “Custom variables” with “+ New” and ✎ (see The “Edit text” window: Inserting fields).
- **In a field picker:** Wherever the window “Choose field” shows the category “Custom variables”, for example in a condition, “+ New” and ✎ are there as well. After “Save” the field picker is visible again with the new variable in it; choose it with a click. The pickers of the e-invoice are an exception: there the custom variables are only available for selection, and you create a new one with “Create variable …” (see E-invoice: ZUGFeRD and XRechnung: Choosing a value).
- **From the color picker:** “ƒ Variable …” and then “New color variable …” opens the window with the type “Color” (see Using a variable as a color).
- **In a rule:** The button “Variable” in the “Variables” tab creates a variable of the rule (see Rules: “Variables” tab: Values per row).
- **Editing:** The ✎ at the end of an entry (mouse pointer: “Edit variable”) opens the window “Edit variable” without inserting the variable anywhere.

> **Tip:** Save the variable you are currently working on before you create another one. Then create the next one from the area “Data”. In a field picker that you opened from the open variable window (for the value or the condition of a condition branch), use neither “+ New” nor the ✎. As far as we know, the first window otherwise reacts neither to “Save” nor to “Cancel”.

#### Using the window

At the top, “Name” and “Type” are side by side. Below them follow, for number and currency, “What should it look like?”, then “What should it contain?” with the condition branches, and at the end the preview line. Next to the labels there is an ⓘ: when you point at it, an explanation appears; a click opens it in a window.

- **Footer:** On the left “Delete” (only for an existing variable), on the right “Cancel” and “Save”. The footer stays in place when you scroll the content.
- **Size:** If you drag an edge, the window becomes larger or smaller.
- **Above other windows:** The window lies over an open window, for example over “Edit rule” or a field picker. The window behind it stays as it is.
- **Closing without saving:** “Cancel”, the ✕ at the top right (mouse pointer: “Close”), the Esc key and a click next to the window all do the same: all changes are discarded. For an existing variable, the state from when it was opened returns, including the name.
- **Esc with several windows:** Esc usually closes the topmost window, for example a color picker, a field picker or the large text window above the variable window (see Keyboard shortcuts: Esc in detail). If you opened the window from a color picker or via “+ New” in a field picker, that picker is still underneath. As far as we know, Esc closes it first; then close the variable window with its buttons.

> **Caution:** A click next to the window discards your entries without asking. Always apply them with “Save”.

### Name and type

| Setting | What it does | Default |
|---|---|---|
| “Name” (with ⓘ) | You insert the variable under this name. Letters are allowed, including umlauts, ß and accented letters, plus digits, spaces and the underscore. The field removes other characters such as hyphen, period, parentheses or @ immediately while you type, without a message. “Save” removes spaces at the beginning and at the end. Upper and lower case count: “Netto” and “netto” are two different names. Each name may occur only once in the template. | empty (gray: “e.g. Payment term”) |
| “Type” (with ⓘ) | What the variable contains: “Text”, “Number”, “Currency”, “Yes/No”, “Date” or “Color”. The type is required. As long as none is chosen, “— please choose —” is shown in the selection with the colored outline, and instead of the entries there is only the note “First choose the type. It decides what you can enter: for number and currency there are sum, count and average; for date »later/earlier« with days, months or years; for yes/no exactly two states.” As soon as a type is chosen, “— please choose —” disappears from the list. | none; via “New color variable …” “Color” |

The type decides which steps there are, which fields the field picker offers, whether calculations are done and how the value is printed. You can change it at any time. The window then rebuilds itself, and the content is kept. If it cannot be split into steps in the new type, the window shows it as a formula (see The formula view). A variable from an older template that does not have a type yet gets a type when it is opened, which the window derives from its content. Check it before saving.

The following sections say for each type how the variable calculates and what appears in the PDF. Which steps and which fields there are for each type is collected under What should it contain?.

#### Type Text

The parts are joined together, not calculated: “2 + 3” stays “2 + 3”, and a postal code such as “01069” keeps its leading zero. From the second row on, “and then” appears on the left. The value is plain text, including line breaks. You set font, size and color where you insert the variable. In the PDF the text appears literally: line breaks become line changes, and whatever is in a field appears exactly as it is there.

#### Type Number

The variable is really calculated, with “plus”, “minus”, “times” and “divided by” (see Operators). A field that is missing counts as 0. Above it is “What should it look like?” with three fields.

- **In the PDF:** The number appears in the number style of the template or of the variable. Which decimal places and which thousands separators apply is described under What should it look like?.
- **Cannot be calculated:** If the calculation cannot be carried out, for example because of a comma in “1,19”, the PDF prints the calculation text itself, and the feedback on the document names the place.
- **Dividing by zero:** The place stays empty, and the feedback on the document says so.

#### Type Currency

The variable calculates like a number; the fixed step is called “Fixed amount” here. “What should it look like?” has four fields, including the “Currency symbol”. In the PDF the amount appears with the symbol after it, separated by a space at which the line never breaks. Without a number of decimal places of its own, the “Decimal places (currency)” of the template apply (see Numbers, currency and dates: Currency & numbers).

#### Type Yes/No

The variable has exactly one step; there are no further rows. The fixed value is a selection with “Yes” and “No”. In the PDF, “Ja” or “Nein” appears in the language of the template (see Numbers, currency and dates: Template language). An empty value stays empty; it does not become “No”. If the variable takes over a yes/no field from Dynamics, for example “Bezahlt”, what counts is whether the field is set to yes or no, not its label: with the label “Unbezahlt”, “Nein” appears, and in conditions the variable is No. A variable of a rule, by contrast, prints the label, that is, “Unbezahlt”; in conditions it is also No (see Rules: What is different for a variable of the rule).

#### Type Date

The first row is the date, each further row is a period that is added or subtracted. How this works is described under Calculating with dates. In the PDF the result appears in the date format of the template (see Numbers, currency and dates: Date & time).

#### Type Color

The variable supplies a color code such as #d13438. It has exactly one step: a fixed color or a value from a field or another variable. Instead of a text field there are a color swatch and a field for the color code (see A fixed color). With condition branches the color depends on a condition, as the image shows; how they are built is described under Condition branches.

[Image: The window “New variable” with the name “Betragsfarbe” and the type “Color”. Below it two boxes. The upper one with the blue heading “IF” and a red ✕ contains a condition box with “AND | OR” and a card “Rechnung › Summen › Gesamtbetrag”, “greater than”, value “1000”, plus the buttons “Condition” and “Subgroup”. Below it “THEN” with a row “= | Fixed color”, a red square color swatch and a field with the color code “#d13438”, below that on the right “ƒx as formula”. The second box “ELSE” contains “= | Fixed color”, a green color swatch and “#2e7d32”. Under the boxes the button “Condition branch” and the preview line “Result with the current sample data: #d13438”. At the very bottom “Cancel” and “Save”.]
Caption: A color variable with a condition branch: red if the total amount is above 1000, otherwise green.
- Image marker 1: The type “Color” supplies a color code such as #d13438.
- Image marker 2: Instead of a text field there are a color swatch and a field for the color code. The swatch opens the color picker.
- Image marker 3: ELSE: the color that applies if no branch matches.
- Image marker 4: The preview shows the color code that results for the sample record.

- **In the PDF:** Only a valid color code is drawn: #rgb, #rrggbb or #rrggbbaa, each with the hash sign. Anything else, such as “rot”, “red”, a typo or an empty value, results in no color and draws nothing; a colored passage of text then keeps the color of its surroundings. What is missing at each place is described under Border, background and colors: Invalid color. If the color comes from a field and the hash sign is missing there, it is not added (see Border, background and colors: Which notations apply).
- **One value for the document:** A custom color variable has one color in the whole document, including in every table row. In the color picker, only custom variables appear under “ƒ Variable …”, no variables of a rule.

### What should it look like?

For a custom variable of the type Number or Currency, you define under “What should it look like?” (with ⓘ) how it is printed. The default in each case is what the template settings say under “Numbers & date” (“From template”; for the decimal places of a number “Automatic (up to 4)”). You set it there once for all, also with if-then (see Numbers, currency and dates: Currency & numbers). Here you only set a fixed exception value for this one variable; if-then is deliberately not available here. For Number there are three fields side by side, for Currency four in two rows.

[Image: The window “New variable”. At the top, side by side, the field “Name” with “Brutto” and the selection “Type” with “Currency”. Below it the label “What should it look like?” with an info symbol and four fields in two rows: top left “Decimal places” with “From template (2)”, top right “Number style” with “From template (1.234,56)”, bottom left “Thousands separator” with “From template”, bottom right “Currency symbol” as an input field with the gray placeholder “From template (€)”. Below that “What should it contain?” and the gray box “CONTENT”. First row: equals sign, selection “Sum of”, field “Gesamt”, red ✕. Second row: selection “times”, selection “Fixed amount”, number field with “1.19”, a button with a frame symbol, an info symbol and a red ✕. Below it the button “Calculation step” with a calculator symbol and on the right “ƒx as formula”. Under the box the button “Condition branch” and the preview line “Result with the current sample data: 4.444,65 €”. At the very bottom “Cancel” and “Save”.]
Caption: A currency variable: the sum of the item amounts times 1.19, with the settings for its appearance above.
- Image marker 1: To how many places it is rounded (0 to 6). Default: the places of the template.
- Image marker 2: Comma or period, depending on the country.
- Image marker 3: Whether large numbers are separated in groups of three.
- Image marker 4: Empty means: the symbol from the template settings. In print it appears after or before the amount, depending on the number style.
- Image marker 5: From the second row on, the operator is on the left. Multiplication and division before addition and subtraction also applies when the rows are one below the other.
- Image marker 6: The result with the sample record, already with the settings above (places, number style, symbol).

| Setting | What it does | Default |
|---|---|---|
| “Decimal places” | To how many places it is rounded, commercially: from 5 upward. You can choose 0 to 6; where other ranges apply elsewhere is described under Numbers, currency and dates: How many decimal places are possible where. For a number, “Automatic (up to 4)” shows as many places as needed, at most four. With a fixed number, thousands separation is added; with “Automatic (up to 4)” it is not; the “Thousands separator” changes that (see below). The details are described under Numbers, currency and dates: How the document prints numbers and amounts. | Currency: “From template (…)” with the number of places of the template; Number: “Automatic (up to 4)” |
| “Number style” | Comma or period, depending on the country: “1.234,56”, “1,234.56”, “1 234,56”, “1'234.56” or “1234.56”. | “From template (…)” with an example of the style that applies |
| “Thousands separator” | Whether large numbers are separated in groups of three: “From template”, “Always separate” or “Never separate”. The two fixed choices take precedence over the rule for the decimal places: with them you also separate a number without a fixed number of places, or you leave one with a fixed number of places unseparated. | “From template” |
| “Currency symbol” (currency only) | Appears after the amount (“1.234,56 €”) or before it (“$1,234.56”, “CHF 1'234.56”; see Numbers, currency and dates: Where the currency symbol appears), depending on the number style. Empty means: the symbol from the template settings, including their if-then. The symbol may come from a field; to do so, enter the field name in double curly braces, for example `{{waehrungssymbol}}`. It is always read on the printed record, also in a table row. A field that exists only in the row therefore stays visible as a placeholder. The field removes spaces at the edges. | empty (gray: “From template (€)” with the symbol that applies) |

- **Where it applies:** The settings apply everywhere the variable is printed. If a placeholder of the variable itself carries a number of places, for example from an imported template, it replaces only the decimal places from here; number style and thousands separator remain those of the variable. In the window “Edit text”, such a number of places cannot be entered (see Numbers, currency and dates: Decimal places and symbol for a single field).
- **Round first, then sum:** If the variable summarizes a list (“Sum of”, “Average of”), each individual value is rounded to the decimal places of the variable before adding, otherwise to the “Decimal places (currency)” of the template, also for quantities and weights (see Rules: Round first, then sum).
- **Effective immediately:** Every choice applies right away, and the preview line recalculates. “Cancel” restores the old state.

For Yes/No, Text, Date and Color this section does not exist. For a variable of a rule, a note appears in its place (see Rules: What the value looks like).

### What should it contain?

Under “What should it contain?” (with ⓘ) you build the value row by row. Each row is a step and has four parts: on the left, what happens with the step, in the first row an =; then the kind of value; then the value itself; on the right a ✕ as soon as there is more than one row. As long as there are no condition branches, all of this is in the box “CONTENT”.

#### The kind of value

| Kind | What it supplies | For the types |
|---|---|---|
| “Variable” | a field, another custom variable or, depending on the type, a system variable, chosen with “Choose field …” | all |
| “Fixed text”, “Fixed number”, “Fixed amount”, “Fixed value”, “Fixed date”, “Fixed color” | a value that you enter (see Fixed values) | one of them per type |
| “Sum of”, “Average of”, “Smallest value of”, “Largest value of” | a summary over a list, for example the sum of all item amounts | Number, Currency |
| “Count of” | how many entries a list has | Text, Number, Currency |
| “First value of” | the value from the first row of a list, even if it is empty | Text, Number, Currency, Yes/No, Date |
| “Earliest of”, “Latest of” | the earliest or latest date of a list | Date, first row |

- A new row always starts with the fixed kind of the type. If you change the kind, the value of this row is cleared.
- For Date, from the second row on there are only “Fixed number” and “Variable”, because a count goes there (see Calculating with dates). For Color, only “Fixed color” and “Variable” are available.
- If, for “Variable”, you choose in the field picker a field of a list with a summary on the right of the field, such as “Sum”, the kind switches by itself, for example to “Sum of”. If a summary is already set as the kind, it stays, and only the field is taken over.

#### The button “Choose field …”

For “Variable” and for the summaries, the value is a button, initially labeled in gray with “Choose field …”. It opens the window “Choose field” with the data tree. How the window is built and operated, including the summary on the right of the field of a list, is described under Data tree and field picker: The “Choose field” window.

The type of the variable determines what the picker offers, including whether it shows the “System variables” in addition to the “Custom variables”:

| Type | What the field picker shows |
|---|---|
| Text | all fields, all custom variables and all six system variables, including the page numbers |
| Number, Currency | number and money fields and custom variables of the type Number or Currency; no system variables |
| Yes/No | Yes/No fields and Yes/No variables; no system variables |
| Date, first row | date fields, date variables and, of the system variables, “Current date” and “Date & time” |
| Date, from the second row on | number and money fields and custom variables of the type Number or Currency |
| Color | everything, without restriction, including the page numbers |

The type likewise restricts the calculated fields of a rule and their attributes: for Number and Currency, for example, all calculations except minimum and maximum of a date field are available, and of the variables of the rule only those of the type Number or Currency.

After the choice, the button shows the name of the field, for example “Betrag”, and a custom variable as “@Name”. You see the complete path when you point at the button with the mouse. A click opens the picker again.

#### Operators

From the second row on, the left side shows how the step is joined to the one before it:

- **Number and Currency:** a selection with “plus” (default), “minus”, “times” and “divided by”. Multiplication and division come before addition and subtraction: “times” and “divided by” are calculated first, even if the rows are one below the other. = 100, plus 50, times 2 therefore gives 200, not 300.
- **Date:** “later” (default) adds the period, “earlier” subtracts it.
- **Text:** the fixed label “and then”; the parts are joined together.
- **Yes/No and Color:** no second row.

Example for a gross amount (type Currency): in the first row “Sum of” with the field “Betrag” of the items, in the second “times” and “Fixed amount” 1.19. There are no parentheses in the rows. If you need, for example, (100 + 50) × 2, create a variable of its own for the parenthesis and keep calculating with it, or write the calculation in the formula view.

#### Fixed values

| Kind | Entry | Good to know |
|---|---|---|
| “Fixed text” (Text) | a field with the gray note “Text”, next to it ⛶ (mouse pointer: “Open a larger text window — line breaks allowed”) | Every entry applies immediately. If the text contains line breaks, the field is for viewing only: a line break appears as ⏎, and a click opens the large text window. |
| “Fixed number” (Number), “Fixed amount” (Currency) | a field with the gray note “e.g. 1.19”, next to it ⛶ (mouse pointer: “Open a larger window — line breaks are removed”) and an ⓘ | Write decimal numbers with a period. A comma is not converted: “1,19” cannot be calculated (see Type Number), and the next time it is opened the window shows the value as a formula. In a comparison in a condition, by contrast, the designer reads a comma as a period (see Numbers, currency and dates: Reading numbers: comma and period). |
| “Fixed value” (Yes/No) | a selection with “Yes” and “No” | Exactly two states. See the note under the table. |
| “Fixed date” (Date, first row only) | your browser’s date picker | The chosen day is stored. The picker shows it in your browser’s language, the PDF in the date format of the template. |
| “Fixed color” (Color) | a color swatch and a field with the gray note “#rrggbb” | See A fixed color. |

> **Good to know:** For a new fixed Yes/No value, the selection shows “No”. As far as we know, however, the window does not take over “No” until you have changed the selection once; otherwise the value stays empty and prints nothing. Watch the preview line: if it shows “(empty)”, choose “Yes” once and then “No” again.

#### A fixed color

- **With the mouse:** The color swatch opens the color picker “Choose a color” (see Border, background and colors: Color field and color picker). In this picker the entry “New color variable …” is missing, and the variable you are currently editing is not in its list.
- **Typed:** In the field next to it, type the color code. While you type, it is only marked, as with every color field (see Border, background and colors: Invalid color); the mouse pointer here says “That is not a hexadecimal code — something like #d13438 is expected. …” When you leave the field, the window completes what is unambiguous: “d13438” becomes “#d13438”, with the note “Color corrected to »#d13438« — a hexadecimal code starts with »#«.”
- **Valid** are #rgb, #rrggbb and #rrggbbaa. The variable does not accept the four-character short form (#rgba), unlike the color field on an object (see Border, background and colors: Which notations apply).
- **On saving**, every fixed value is checked strictly, in the “ELSE” and in every condition branch (see Saving). A color name such as “rot” is not guessed but rejected. A value from a field or another variable is not checked, because it only shows itself with the real data.

#### The buttons under the rows

| Button | What it does |
|---|---|
| “Calculation step” (Number, Currency; calculator symbol), “Period” (Date; calendar with arrow), “Text part” (Text; “T” with a text cursor) | Sits in the middle under the rows and appends an empty row: for the calculation step with “plus”, for the period with “later” and “Days”. “Save” leaves out empty rows. For Yes/No and Color the button does not exist. |
| ✕ on the right in the row (mouse pointer: “Remove this step”) | Removes the step together with its operator, without asking. Appears only if there is more than one row. |
| “ƒx as formula” on the right under the rows (mouse pointer: “Edit as formula (for parentheses and special cases)”) | Switches this one value to the formula view. The base value and each condition branch have their own “ƒx as formula”. Only the view changes; nothing about the value changes. |

#### The formula view

In the formula view, the value appears as a single line in typewriter type. You write it by hand, for example with parentheses. Every entry applies immediately, and the preview line recalculates. If the field is empty, it shows an example for each type:

- Number and Currency: `e.g. ({{amount}} + 5) * 1.19`
- Date: `e.g. {{dateadd(date, 14, day)}}`
- Yes/No: `e.g. true or {{paid}}`
- Color: `e.g. #d13438 or {{color}}`
- Text: `e.g. Invoice {{number}}`

These rules apply to the formula:

- **References:** Every reference to a field or a variable is in double curly braces `{{ }}`, for example `{{betrag}}`. A custom variable is called `{{@Name}}` there.
- **Calculating:** For Number and Currency, calculation happens when, after insertion, only numbers, the characters + - * / (plus, minus, times, divided by), parentheses and whitespace remain. If anything else remains, nothing is calculated; the text is assembled instead. A custom variable of the type Text or Date inserts its text: with “10-20” or “2026-03-20” the calculation stays text, and the document reports it. A Yes/No variable counts as 1 or 0. There are no further functions or characters such as `round`, `%` or `^`.
- **Decimal numbers with a period:** `{{netto}} * 1.19`. A comma as in “1,19” turns the formula into text (see Fixed values).
- **Missing field and dividing by zero:** A field that is missing counts as 0. Dividing by zero leaves the place empty (see Type Number).

The formula view also appears by itself when a value cannot be split into rows: for parentheses and other notations that the rows do not know, for a negative number at the beginning, for a comma in a number and for several parts in a Yes/No or color variable.

Under the field, “← guided” leads back to the rows (mouse pointer: “Back to the guided view”). If the value cannot be split, the button is gray, and the mouse pointer says “Cannot be split into steps (e.g. parentheses) — going back clears the expression.”

> **Caution:** If “← guided” is gray, a click on it deletes the whole formula, without asking. If you did that by accident, “Cancel” closes the window without any change.

It is better to change a multi-line text via ⛶ than in the formula view: there, line breaks appear as spaces, and as far as we know they are lost as soon as you change anything in the formula view.

#### The large text window

The ⛶ next to a fixed value opens a large text window with a text area that you can drag larger downward, and the buttons “Cancel” and “Apply”. “Apply” writes the text into the step; “Cancel”, Esc and a click next to the window discard it.

- **For fixed text:** heading “Text of the variable »Name«”, below it the note “Text and line breaks only. Set font, size and color where you use the variable — not here.” Line breaks are kept.
- **For a fixed number and a fixed amount:** heading “Fixed value of the variable »Name«”, below it the note “A fixed value of this calculation — for example a rate like 1.19 or a longer expression. Line breaks are removed when you apply: the value goes into the calculation unchanged, and a line break would sit in the middle of it.”

If the variable does not have a name yet, it is missing from the heading.

### Calculating with dates

For a variable of the type Date, the first row is the date. Every further row is a period that you add or subtract. The periods are applied one after the other from top to bottom. This turns “invoice date plus payment term” into a single variable.

- **First row:** “Variable” takes a date field, another date variable or the system variable “Current date” or “Date & time”. “Fixed date” opens a date picker. “First value of”, “Earliest of” and “Latest of” take a date from a list.
- **Every further row:** on the left “later” or “earlier”, then the count, and on the right the unit “Days” (default), “Months” or “Years”. For “Fixed number”, the count is a number field with the gray note “e.g. 30”; for “Variable”, it is a number field of the data or a custom variable of the type Number or Currency.
- “Save” leaves out a period row without a count. If the first row has no date, nothing at all results, even if periods are entered.

Three rules apply to the calculation. The mouse pointers on count and unit also state the first two.

- Calculation is in whole units; decimal places are dropped: 30.9 days are 30 days.
- For months and years, the result stays in the target month. If the day does not exist there, the last day of that month applies: January 31 plus one month is February 28.
- If, when the document is created, the count does not supply a number, for example because the chosen field is empty in the record or contains a Yes/No value, a text or a list instead of a number, no date results: the place stays empty, a condition using it does not apply, and the feedback on the document says so. As soon as sample data is loaded, the designer points this out as well. The only thing it does not detect is a field that has no value in the sample record; only the feedback on the document reports that.

1. Create a variable, name “Zahlungsziel”, type “Date”.
2. In the first row, choose the kind “Variable”, click “Choose field …” and choose the invoice date.
3. Click “Period”.
   → A second row appears with “later”, “Fixed number” and “Days”.
4. Enter 30 as the count.
   → The preview line shows the invoice date of the sample record plus 30 days.
5. Click “Save”.

[Image: The window “New variable”. At the top left the title, at the top right a ✕. Below it, side by side, the field “Name” with the word “Zahlungsziel” and the selection “Type” with the entry “Date”, each with an info symbol. Below that the label “What should it contain?” and a gray box with the heading “CONTENT”. The first row in the box reads: an equals sign, the selection “Variable”, a field with the word “Rechnungsdatum”, a red ✕. The second row: the selection “later”, the selection “Fixed number”, a number field with “30”, the selection “Days”, a red ✕. Under the rows in the middle the button “Period” with a calendar symbol, on the right the text “ƒx as formula”. Under the box the button “Condition branch” and below it, with a blue stripe on the left, the preview line “Result with the current sample data: 27.07.2026”. At the very bottom the bar with “Cancel” and “Save”.]
Caption: A date variable: invoice date plus 30 days gives the payment term.
- Image marker 1: The name under which you insert the variable. Letters, digits, spaces and the underscore are allowed.
- Image marker 2: The type is required and decides which steps there are.
- Image marker 3: The first row is the date, here the invoice date from the data.
- Image marker 4: Every further row is a period: later or earlier, the count and the unit (days, months, years).
- Image marker 5: The button appends a further period row.
- Image marker 6: The preview line immediately calculates with the sample record and shows the result.

For “today plus 14 days”, choose the system variable “Current date” in the first row.

> **Caution:** For “First value of”, “Earliest of” and “Latest of” in the first row, watch the preview line. As far as we know, the window currently does not keep the chosen field there, and the variable stays empty even though the button shows the field. The same applies if, for “Variable”, you choose a field of a list with a summary. If the preview line shows “(empty)” although the sample record has a date, nothing is saved. For a date field of the printed record itself, this does not occur. There is currently no guided way to the first, earliest or latest date of a list.

> **Tip:** If the count is to be a sum over a list, create the sum as a custom variable of the type Number (“Sum of”) and choose that variable as the count. As far as we know, the window does not take over a summary that you choose directly in the period; it then takes the list itself, and no date results from that.

### Condition branches

With condition branches you define exceptions: “IF” a condition applies, “THEN” this value applies. This works the same for every type, including variables of a rule. This section describes how condition branches are built and how they are checked. The settings of the template also have condition branches; what is different there is described under Numbers, currency and dates: Condition branches.

1. Under the box “CONTENT”, click “Condition branch” (symbol: diamond with a question mark).
   → Above the base value an empty box appears with the header “IF”. The box “CONTENT” is now called “ELSE”: its value applies if no branch matches.
2. In the box, build the condition as described under Conditions: The building kit: field, comparison and value. You append a second row with “Another condition”; only then do the AND/OR switch and “Subgroup” appear. For a choice field, you choose the value “by option value” among its options; the code of the chosen option appears next to it in small gray type (see Conditions: Choice fields: by option value).
3. Under “THEN”, define the value. The same rows and buttons are there as in the base value, with its own “ƒx as formula”.

[Image: The window “New variable” with the name “Anrede” and the type “Text”. Below it “What should it contain?” and two boxes one below the other. The upper one begins with the blue heading “IF” and a red ✕ on the right. In it a condition box with the switch “AND” (chosen) | “OR” and a condition card: at the top the field selection “Rechnung › Kunde › Land”, below it the comparison “is” and the field with the value “Österreich”; at the top right of the card is a ✕. Under the card the buttons “Condition” and “Subgroup”. Further down in the same box the blue heading “THEN” and a row with “= | Fixed text | Grüß Gott” and a button to enlarge; below it the button “Text part” and on the right “ƒx as formula”. The second box carries the gray heading “ELSE” and contains a row “= | Fixed text | Guten Tag” with the same buttons. Under the boxes the button “Condition branch”, then the preview line “Result with the current sample data: Guten Tag”. At the very bottom “Cancel” and “Save”.]
Caption: A text variable with a condition branch: Austria gets “Grüß Gott”, everyone else “Guten Tag”.
- Image marker 1: A condition branch. The red ✕ removes the whole branch without asking.
- Image marker 2: You build the condition as in the chapter “Conditions”: field, comparison, value, if needed several rows with AND or OR.
- Image marker 3: THEN: the value that applies if the condition applies. The rows and buttons are the same as in the base value.
- Image marker 4: ELSE: the base value. It applies if no branch matches.
- Image marker 5: Appends a further branch, directly above ELSE. The check runs from top to bottom; the first matching one wins.
- Image marker 6: The example has the country “Deutschland”; therefore the branch does not apply, and ELSE applies.

- **Order:** The branches are checked from top to bottom; the first matching one wins. A new branch always goes at the end, directly above “ELSE”. Branches cannot be moved. To change the order, remove branches and create them again.
- **Removing:** The red ✕ on the right in the header “IF” (mouse pointer: “Remove branch”) deletes the whole branch, without asking.
- **Incomplete branches:** A branch with neither a condition nor a value is discarded on saving. A branch with a condition but an empty value is kept and supplies an empty value when it applies. In the condition branches of the template settings this is different: there, with an empty “THEN”, the built-in default applies, neither an empty value nor the fixed value (see Numbers, currency and dates: Condition branches). A branch with a value but without a condition always applies and hides all branches below it. If, on the other hand, a field is chosen in a branch but the condition is still incomplete, for example still without a value, the red note “⚠ Value missing: without a value, this branch would always apply. Choose a value or remove the condition with ✕.” appears under the branch and next to the buttons “⚠ Condition incomplete: branch …”; “Save” stays disabled until you add the value or remove the condition with ✕. A branch that is always to apply is therefore one without a field. The condition branches of the template settings disable “Done” in the same way in this case (see Numbers, currency and dates: Condition branches). “Save” also stays disabled if a condition contains a field in “{{ }}”, for example from an imported template: under the branch it then says “⚠ Typo: »{{ }}« does not belong in a condition; as written the field is not read at all. Rebuild the condition.” (see Conditions: Fields in “{{ }}”).
- **What the condition can read:** For a custom variable, it is checked on the printed record and can read other custom variables. The field picker shows all fields and the custom variables; if you choose a Number variable, the comparisons for numbers are also available. It does not offer system variables here. For a variable of a rule, the condition is checked for each row (see Rules: What is different for a variable of the rule).
- **Condition written by hand:** If a stored condition cannot be shown in the building kit, for example from an older or imported template, the box only displays it. How to replace it is described under Conditions: Conditions written by hand.

Example salutation (type Text): IF “Land is Österreich” THEN “Grüß Gott”, ELSE “Guten Tag”. Example color: IF “Betrag greater than 1000” THEN #d13438 (red), ELSE #2e7d32 (green).

### The preview line

At the end of the window content, above the footer, a box with a colored stripe shows what the variable yields with the sample record (see The sample record). It recalculates after every change to the rows, to the branches and under “What should it look like?”.

- **Custom variable:** “Result with the current sample data: …” with the value in bold. Number and Currency appear with the settings under “What should it look like?”, Yes/No in the language of the template, a date in the date format of the template. If the result is empty, “(empty)” appears in gray. The preview also calculates other custom variables that this one reads.
- **Variable of a rule:** “Result on the FIRST row of this rule: …” (see Rules: Preview, saving, renaming and deleting).
- **Empty branches:** A condition branch with neither a condition nor a value, for example one you have just created, does not count in the preview. It therefore shows what applies after saving, because “Save” discards such branches.
- **When the variable fails:** The reason then appears in red with a warning sign in front, for example “The variable »Netto« uses itself.” or “The variables depend on each other: A → B → A.”, otherwise “The variable cannot be calculated.” Each is followed by “The value therefore stays empty — on the canvas and in the PDF alike.” If variables read each other in a circle, all of those involved stay empty.
- **When the variable reads a rule result:** A note then appears below in red that begins with “»@Name« reads the result of the rule »…«.” What this means is described under When a custom variable is calculated.

A variable of the type Text remains text everywhere, even if it consists only of digits: the preview line shows a postal code “01069” with the leading zero, and a condition that compares with the text (“starts with”, “contains”) sees the same characters as the PDF. “Is equal to” with a value in quotation marks also compares text with text: “0049” is not equal to “49”. Without quotation marks (`== 49`) and with “greater than” or “less than”, digits continue to be read as a number.

### Saving, renaming, deleting, messages

#### Saving

“Save” checks the variable in this order. If it finds something, a note appears at the top for a few seconds, and the window stays open:

1. “Please enter a name.”
2. “Please choose the type first.”
3. “Condition branch 3: the condition is not complete yet — the branch would always apply. Please add the value or remove the condition with ✕.” In this case “Save” is already disabled beforehand (see Condition branches).
4. Only for Color: “Not a valid color in ELSE: »…«. A hexadecimal code such as #d13438 is expected — or a field or a variable.” Instead of “in ELSE”, the note names the branch where applicable, for example “in condition branch 2”.
5. “A variable with this name already exists.”

If everything is in order, “Save” silently adds a missing hash sign to a color, discards empty condition branches and closes the window. The area “Data”, the list in the window “Edit text”, open field pickers, the canvas and the properties then show the new state. With Ctrl+Z you undo the saving of a custom variable. The variable is stored in Dynamics only when the template is saved.

#### Renaming

If you change the name and save, the designer also changes all places where the variable already appears: in texts, including with a number or currency format, in date calculations, in conditions, in the branches of a dynamic text and in color fields to which a color variable is bound. It then reports the count, for example “Renamed: 3 reference(s) to »@Netto« updated — in placeholders, formulas and conditions.” Only a text that is currently open in the window “Edit text” is left out; apply it first.

#### Deleting

“Delete” on the left in the footer exists only for an existing variable. It asks “Delete variable »Name«? References to it print nothing afterwards.” and offers “Cancel” and “Delete”; Esc and a click next to it cancel. Places that point to the deleted variable then print nothing; in a Number variable it counts as 0. With Ctrl+Z you bring the variable back.

#### The check before full preview and PDF

Before the full preview or a PDF is created, the designer checks all custom variables. If it finds something, it asks under “Something is wrong with the custom variables:” and names each finding with its consequence:

- Variables that depend on themselves or on each other; they stay empty.
- “There are several variables named »…« — only the first one is used.” This can happen after an import, for example.
- “1 variable has no name and is not used.”
- “The variable »@…« does not exist — used in: …” A condition using it does not apply, even with a leading “!”, and the document contains a warning about it; in a text the place stays empty, in a Number variable it counts as 0, and in a date calculation no date results.
- “In variable »…« there is a condition branch WITHOUT a condition before others — it always applies and switches off the branches below it.”

The same confirmation prompt also names condition branches without a condition in the template settings, for example “In template setting »Currency symbol« there is a condition branch WITHOUT a condition before others …”, custom variables in their conditions that do not exist, and a condition branch of the template settings whose own custom variable itself depends on the number format and would select a different branch when printed, likewise the value of a template setting, fixed or in a branch, that reads such a variable and would turn out differently when printed (“In template setting »Decimal places« the value reads the custom variable »@…«, … — a circle. …”; see Numbers, currency and dates: Condition branches).

You can go back into the designer with “Cancel” or continue with “Generate anyway”; “Generate anyway” is preselected (see Full preview and PDF: Confirmation prompt for rules and variables). Further messages are described under Problems and messages: Messages about variables and conditions.

### Inserting a variable

#### Into a text

- **Dragging:** Drag “@Name” from the area “Data” onto the page or into a text, like a field (see Data tree and field picker: The data tree).
- **Clicking in the area “Data”:** A click inserts the variable at the text cursor into the input field of the properties that you clicked into last. If there is none, the message “First click into a text field — or drag the item in with the mouse.” appears.
- **In the window “Edit text”:** A click on the variable in the list on the left inserts it at the text cursor, otherwise at the end of the text (see The “Edit text” window: Inserting fields).

On the canvas, the variable appears as a blue marker with its name, without the @ sign; point at it to see the placeholder. If the marker has received its own number, currency or date format, it is called “@Name”. The value is shown only by the full preview and the PDF. A custom variable has the same value everywhere, including in every row of a table.

#### Into a condition or another variable

- **Conditions:** In the field picker of a condition, all custom variables of any type are under “Custom variables”. If you choose one, the comparisons depend on its type, for Number and Currency, for example, “greater than”. When the variable is calculated and what a filter can read from it is described under When a custom variable is calculated. How it appears in the condition and where it does not take effect is described under Conditions: Custom variables in a condition.
- **In another variable:** Choose the kind “Variable” and, in the field picker under “Custom variables”, the one you want. This way you keep calculating with an intermediate result, for example “@Netto” times 1.19. For Date, a variable can be the first row or the count of a period.

#### Using a variable as a color

You insert a color variable into any color field: click the color swatch, then “ƒ Variable …” in the color picker and then choose the variable. This is described step by step under Border, background and colors: Color field and color picker, which also covers everything else about the color picker, for example about “unlink” and “No color”.

If the suitable variable does not exist yet, you create it in the same menu with “New color variable …”. The variable window opens with the type “Color”; the type can still be changed. What happens after “Save” or “Cancel” and why you close the window with its buttons, not with Esc, is described under Border, background and colors: Color from a variable (on Esc also Using the window).

In the window “Edit text”, you color a selected passage the same way via the color swatch of the toolbar (see The “Edit text” window: Color). If the variable currently yields no color, the passage keeps the color of its surroundings.

#### Custom variables in the area “Data”

The category “Custom variables” is in first place in the area “Data”, before “System variables”. The list in the window “Edit text” and every field picker that offers custom variables show the same category. Variables of a rule are not here but under their rule.

| Part | What it shows or does |
|---|---|
| Header “Custom variables” with ▸/▾ | Expands and collapses the category; in the area “Data” it is initially collapsed. Mouse pointer: “Values you define yourself — a fixed value, text or if-then.” |
| Button “+ New” on the right in the header | Opens “New variable” (mouse pointer: “Create a new custom variable”). |
| “None yet — create one above with »+ New«.” | Appears as long as the template has no custom variable. |
| Entry “@Name” | In front, a badge for the type: “Abc” for Text and Color, “123” for Number and Currency, “Date”, “Yes/No”. Mouse pointer: “Insert custom variable — edit with ✎”. Clicking or dragging inserts the variable; in a condition picker, the click chooses it for the condition. |
| ✎ at the end of the entry | Opens “Edit variable” without inserting (mouse pointer: “Edit variable”). |
| Search box “🔍 Search in »Custom variables«…” | Appears from six entries on and searches only this category. |

In a field picker that offers only certain types, only matching variables appear: a Currency variable counts there as a money field, Text and Color variables as text. If none matches, the category is missing entirely. If no data source has been set yet, the area “Data” shows only “Custom variables”, expanded, and below it “No data source yet. Click ‘⚙ Manage data sources’ above → set the primary source.”

If the template contains a building block, each one has a category of its own, “Building block ›Name‹”, with its variables, with the prefix in front of the name: “@Chancenkopf.Farbe”. Mouse pointer: “Insert the building block's variable — it is edited in the building block itself”. You insert them like a custom variable; there is no ✎, because they are edited in the building block. Only a building block brings the period in the name; the name field of a custom variable does not accept one. If a custom variable has the same name as the prefix of a building block, the designer warns, and the area of the building block stays empty (see Building blocks: The variables of the building block).

### When a custom variable is calculated

A custom variable is calculated once for the whole document: after all data has been loaded and before the first rule runs. It follows that:

- It has a value for the whole document, in the text as well as in every filter and in every table row.
- It can read the fields of the printed record and calculate over lists, for example the sum of all items. Such a sum has the same value in rule filters, in rule formulas and in the text.
- In a rule filter, its condition cannot read fields of the individual row, rule results or page numbers. If a filter compares only a variable with a fixed value, it therefore lets all rows through or none. Today’s date and the signed-in user, by contrast, can be used, the date also for calculations such as “today + 14 days”. Because the field picker of a condition does not offer system variables, create a further custom variable for this, for example “Heute” of the type Date with “Current date” in the first row, and choose it in the condition.
- It does not know the results of rules, because the rules run only afterward. The field picker does show the rules. If you choose a calculated field of a rule there, the variable has two values: in filters and calculations of rules it is empty or 0, also in its own if conditions; in the text the rule result appears. The preview line points this out. Its note says at the end that the field picker does not offer rule results; at the moment, however, it does show them. It is better to use “Sum of” over the list itself.
- Page numbers are not yet fixed during calculation; they appear correctly only in a variable of the type Text (see System variables).

This does not apply to a variable of a rule: it is calculated individually for each row of the rule, after the rule has filtered, summarized and selected (see Rules: What is different for a variable of the rule).

### System variables

The system fills in system variables when the document is created, independent of the data source. They are in the area “Data” under “System variables”, directly under “Custom variables”, as soon as a data source is set. Mouse pointer on the header: “Values the system fills in automatically — independent of the data source.” In the area “Data”, the search box “🔍 Search in »System variables«…” is always under the header. If you point at an entry, the mouse pointer explains it.

| System variable (badge) | Marker on the canvas | What appears in the PDF |
|---|---|---|
| “Current page” (123) | “Page #” | the number of the page, for example for “Page 1 of 5” in the footer |
| “Total pages” (123) | “Pages ∑” | the number of pages of the finished document |
| “Current date” (Date) | “Current date” | the date on which the document is created, in the date format of the template, for example “04.08.2026”; the format can be chosen per field by double-clicking (see Numbers, currency and dates: The date format of a single field) |
| “Current time” (Abc) | “Time” | the time of creation as ready-made text in the short form of the template language, for example “14:30”; not a date |
| “Date & time” (Date) | “Date & time” | both together, for example “04.08.2026 14:30”, in the format for date and time of the template |
| “User” (Abc) | “User” | the full name of the user who creates the document |

- **Inserting:** Drag or click a system variable in like a field, also in the window “Edit text”. On the canvas the marker always appears, never the value; only creating the document inserts the value. If you have given the marker its own name in the window “Edit text”, it shows that; the same is printed. In older templates the markers “Date” and “Date/Time” may also appear; they print the date or the date and time of creation.
- **Time:** Date and time apply in the time zone of the user who creates the document (see Numbers, currency and dates: Date & time).
- **Page numbers:** Where they apply, including in tables, and which number an object split across two pages shows, is described under Page numbers.
- **In custom variables:** Which system variables the field picker offers for each type is described under The button “Choose field …”. Page numbers make sense only in a variable of the type Text. Number, Currency and Date variables do not offer them and calculate without them; the picker of a color variable does show them, but they do not yield a color there. A Date variable is always printed in the date format of the template, the format for pure date values, that is, without time, even if it begins with “Date & time”. A time appears only if a pattern of its own with a time is entered there (see Numbers, currency and dates: Date & time and Numbers, currency and dates: Custom pattern). “Current time” is text and is not available for selection in a Date variable.
- **Not available:** system variables in the field pickers of conditions and rule filters and in the field picker of a variable of a rule. Without a data source, the category is missing entirely.

### What changes in the document?

**On the canvas:** A variable appears as a blue marker with its name: a custom variable without the @ sign, a system variable with its fixed name such as “Page #”. The value is shown only by the full preview and the PDF; a color variable, by contrast, already colors the page, with the value from the sample record, and if no color results, the canvas shows the color under “ELSE”, and the PDF then draws none (see Border, background and colors: Color from a variable). Visibility rules with a variable do not take effect on the canvas (see Visibility: What changes in the document?).

**In the PDF:** At every place the calculated value appears: for a custom variable the same one everywhere, for a variable of a rule the value of the respective row, for a system variable the value at the time of creation. Number, amount, date and Yes/No appear according to the template settings or according to the exception on the variable. Which condition branch applies is decided by the real data.

---

## Template settings

*For users · Template and pages · Page en/vorlageneinstellungen.html*

> **In short:** The template settings apply to the whole template: paper size and margins, the default font with line spacing and indent, the language and how date, amounts and numbers are printed, the default for tables, the e-invoice, keep-warm, the data sources and the sample record. What you set here applies wherever nothing of its own is entered on the individual object or field. The page shows every change immediately; it becomes valid with “Apply” and is stored in Dynamics with “Save”. How language, date, amounts and numbers are printed is described on the page Numbers, currency and dates. The fonts that apply to all templates in your environment are described on the page Image library and fonts. How the e-invoice works is described on the page E-invoice: ZUGFeRD and XRechnung.

### Opening, applying or discarding the window

You reach the window “Template settings” in two ways:

- through the button “Template settings” with the small gear in the template row, between the template selection and “New” (see Managing templates: The template row). If you point at it with the mouse, “Page size & margins” appears; the window, however, contains all settings of this page and those of the page Numbers, currency and dates;
- through the blue button “⚙ Template settings” on the right under “Properties” when nothing is selected (see The properties panel: When nothing is selected).

Both buttons exist as soon as a template from the list is open. After “Import” they are missing until you have stored the file as a template with “Duplicate” (see Managing templates: After opening). There is no keyboard shortcut for opening it. When you create a new template, step 2 is the same window (see As step 2 of “New template”).

At the top of the window there are five tabs: “Page”, “Font”, “Numbers & date”, “E-invoice” and “Data”. Each tab is divided into sections with a small heading that appears in capital letters on screen. When first opened, “Page” is active; after that the window opens on the tab you used last, until you reload the designer. Switching tabs applies and discards nothing. The window has a fixed size and cannot be dragged at the edges; if a tab is longer, its content scrolls, and the tab bar scrolls along. In a narrow browser window, fewer fields sit side by side. Next to many settings there is an ⓘ with a detailed explanation (see The properties panel: Sections, expandable areas and the ⓘ).

[Image: The window “Template settings” over the darkened designer. At the top left is the bold title, on the right the button “✕ Close”. Below it is the tab bar with the five tabs “Page” (active, underlined in blue), “Font”, “Numbers & date”, “E-invoice” and “Data”. In the “Page” tab there are four sections with a fine gray outline one below the other. “PAGE” contains the selection “Page size” with “A4 (210 × 297 mm)” and the pale, disabled fields “Width (mm)” with 210 and “Height (mm)” with 297. “MARGINS” contains the unchecked box “Ignore page margins (use the full page)” and four fields: top margin 18, right margin 15, bottom margin 18, left margin 20. “GUIDES” contains the checked box “Show guides in the designer — in the whole template”. “TABLES” contains the checked box “Repeat header row on following pages” with the gray sentence that it is the default for all tables of the template. Behind several labels there is a small gray “i” symbol. At the bottom right, set off by a fine line, are “Cancel” (white) and “Apply” (blue).]
Caption: The window “Template settings” with the “Page” tab.
- Image marker 1: “✕ Close”: works like “Cancel” and saves nothing.
- Image marker 2: The five tabs; here “Page” is active. Switching applies and discards nothing.
- Image marker 3: The ⓘ behind a label opens a detailed explanation of the setting.
- Image marker 4: Pale and disabled: width and height can only be changed with “Custom size (mm)”.
- Image marker 5: “Cancel” closes the window; if something was changed, a confirmation prompt comes first.
- Image marker 6: “Apply” keeps all changes in the open template. It is stored in Dynamics only with “Save”.

1. Open the window and click the tab you need.
2. Set what you need.
   → The page behind the window shows every change immediately. This is a preview; nothing has been applied yet.
3. At the bottom right, click “Apply”.
   → The window closes. The settings now apply in the open template. With Ctrl+Z you undo all changes from the window together in one step.
4. In the template row, click “Save” so that the settings are stored in Dynamics.

| Button or key | What happens |
|---|---|
| “Apply” (blue, bottom right) | Keeps all changes in the open template and closes the window. All changes from the window become a single undo step. Nothing is saved in Dynamics yet. |
| “Cancel” (left of “Apply”) | Closes without applying. If you have changed nothing, the window closes immediately; otherwise the confirmation prompt appears (see below). The whole template is compared with its state when the window was opened. |
| “✕ Close” (top right) | Like “Cancel”. The button saves nothing. |
| Esc key, click next to the window | Like “Cancel”. If an ⓘ help window, the window “Choose field”, “Manage fonts”, “New font family” or “Files for »…«”, the window “Manage data sources”, the window “Condition branches: …” or a confirmation prompt lies over it, the Esc key closes that first. In the window “Condition branches: …” it works like “Done” and, like it, is disabled as long as a branch has a chosen field without a value (see Numbers, currency and dates: Condition branches). You close the small list at currency symbol and decimal places with the mouse (see Numbers, currency and dates: Value or field). |

If you have changed something, the designer asks in the window “Please confirm”: “Discard changes that were not applied and close?”

- “Discard” (red) restores the state from when the window was opened and closes it. The undo steps from the window are dropped, and there is nothing to redo afterward either. If the data sources or the sample record changed in the window, the designer reloads the sample data of the old state.
- “Cancel”, the Esc key or a click next to the confirmation prompt close only the prompt; the template settings stay open.
- When the prompt opens, “Discard” is preselected. If you press the Enter key, it is therefore discarded.

> **Good to know:** Two buttons take effect immediately and cannot be undone with “Discard”: “⚙ Manage fonts” uploads fonts to Dynamics or deletes them (see Image library and fonts: The “Manage fonts” window), “🔧 Check keep-warm” sets up keep-warm (see Keep warm). Neither is part of the template. If, on the other hand, you open “⚙ Manage data sources” from this window, the work confirmed there belongs to the state of this window: “Apply” keeps it, “Cancel” and “Discard” take it back again.

#### As step 2 of “New template”

When you create a template with “New”, step 2 is this window (see Creating a new template). Tabs and fields are the same; only this is different:

- The window is called “New template”. Above the tabs there are “Step 2 of 2”, the name from step 1, which you can still change here, and “Data source: …” with the primary source.
- It always opens with the “Page” tab.
- At the bottom right there is “Create template” instead of “Apply”. The button creates the template with all settings in Dynamics and opens it.
- At the top right there is “✕ Cancel” instead of “✕ Close”. Here, canceling always asks whether the draft should be discarded; you cannot go back to step 1.
- If the primary source has a currency, “Take the currency from the record” is already checked; you can uncheck it.
- Under “PDF name” in the “Page” tab, the name field of the primary source is already entered; you can change or empty it (see PDF name).
- “⚙ Manage fonts” and “🔧 Check keep-warm” also take effect immediately in Dynamics here, even if you discard the draft afterward.

#### In a building block

If a building block is open, there is a yellow note with the building block symbol at the top of the window: “This is a building block. Language, number and currency format, date and font only apply to its preview — when printed, those of the template it is in apply. The page is the area of the building block (margins 0).” A building block does not create a document; that is why the “E-invoice” tab, in the “Data” tab the keep-warm and in the “Page” tab the PDF name are missing. More under Building blocks: What is different in a building block.

### “Page” tab

Here you set the paper size, the margins, the guides of the canvas, the default for tables and the name of the file. The tab has five sections: “Page”, “Margins”, “Guides”, “Tables” and “PDF name”; the margins and “Ignore page margins (use the full page)” are described under Margins. Everything except the guides takes effect in the PDF.

| Setting | What it does | Default |
|---|---|---|
| “Page size” | The paper size: A4, A3, A5, Letter, Legal or “Custom size (mm)” (see Page size and custom size). A fixed size immediately sets width and height to its dimensions. | A4 |
| “Width (mm)”, “Height (mm)” | The dimensions of the page. Changeable only with “Custom size (mm)”; with a fixed size the fields are disabled and pale; if you point at them with the mouse, “Can only be changed with a custom size” appears. | 210 and 297 mm |
| “Show guides in the designer — in the whole template” | Shows the dashed outlines of groups, areas and table cells on the canvas (see Guides). They never appear in the PDF. | on |
| “Repeat header row on following pages” | The default for all tables of the template that run over several pages (see Tables). | on |
| “File name (without .pdf)”, “Maximum characters” | What the file created from the template is called, and how long the name can be at most (see PDF name). | empty, for a new template the name field of the primary source |

#### Page size and custom size

| Entry in the list | Width × height |
|---|---|
| “A4 (210 × 297 mm)” | 210 × 297 mm, the usual letter format |
| “A3 (297 × 420 mm)” | 297 × 420 mm |
| “A5 (148 × 210 mm)” | 148 × 210 mm |
| “Letter (215.9 × 279.4 mm)” | 215.9 × 279.4 mm, the US letter format (8.5 × 11 inches) |
| “Legal (215.9 × 355.6 mm)” | 215.9 × 355.6 mm (8.5 × 14 inches) |
| “Custom size (mm)” | what is in “Width (mm)” and “Height (mm)” |

- **Fixed size:** Width and height jump immediately to its dimensions. If you had entered custom dimensions before, they are overwritten.
- **Custom size:** The existing numbers stay and can be changed. The arrow keys on the field change in steps of 0.5 mm; more than 5000 mm is not possible. Width and height must be above 0 mm. The field does not accept a 0 or a negative number: the designer reports for about three seconds “A page needs a width and a height above 0 mm — this value was not applied.”, and when you leave the field the old value is back in it. A field you have emptied immediately counts as 210 or 297 mm and shows that number when you leave it.
- **Letter and Legal** have the exact US dimensions so that a printer recognizes the page as Letter or Legal. An older template with 216 × 279 or 216 × 356 mm keeps its dimension and continues to be called “Letter” or “Legal” until you choose the page size again.
- **On the canvas** the pages change their size immediately. The objects keep their dimensions and their distance from the edge; on a smaller page, something can therefore protrude beyond the edge.
- **In the PDF** the page has exactly the set width and height. Whatever protrudes beyond the page edge is cut off, and the document reports it (see Position, size, rotation and arrangement: Where the PDF really cuts off). If no space is left between the margins, it reports that as well.

> **Tip:** There is no separate switch for landscape format. Choose “Custom size (mm)” and swap width and height, so for A4 landscape 297 × 210 mm.

#### Margins

The margins are the distance all around between the page edge and the printed area; the content of the document is in the printed area. What nevertheless reaches into a margin, such as a header or footer or an object with “Fixed position”, is printed there; what protrudes beyond the paper edge is missing in the PDF, and the document reports it (see Position, size, rotation and arrangement: Where the PDF really cuts off). The position of an object directly in the document counts from the left and the top margin (see Position, size, rotation and arrangement: Position directly in the document).

| Setting | What it does | Default |
|---|---|---|
| “Ignore page margins (use the full page)” | Sits as a row of its own above the four margin fields. With a check mark, 0 mm applies all around, good for colored bars across the full width. Positions then count from the page corner, including those of headers and footers. The margin fields are disabled and pale; when you point at them with the mouse, “No effect while »Ignore page margins« is on — the value stays saved” appears. Uncheck the box, and the entered values apply again. | off |
| “Top margin” | Distance between the top edge of the page and the content. Headers and footers also count their position from here. | 18 mm |
| “Right margin” | Distance to the right page edge. Together with the left margin it determines the usable width: page width minus both margins. | 15 mm |
| “Bottom margin” | Distance between the content and the bottom edge of the page. This is where the content of a page ends; if there is a footer at the bottom, it ends above it. What no longer fits usually goes onto the next page; the exceptions are described under At the page edge. | 18 mm |
| “Left margin” | Distance to the left page edge. All objects move along. | 20 mm |

- An empty margin field immediately counts as the default, on the canvas as well as in print; when you leave it, the default is in the field. For “no margin”, enter 0.
- The arrow keys change in steps of 0.5 mm, at most 5000 mm. The field accepts negative numbers; the document is then created anyway but reports the negative margin. Enter 0 or more.
- If no space is left between the left and right or the top and bottom margin, the document reports it.
- The page border that you set on the right under “Properties” when nothing is selected is independent of the margins (see Pages, header and footer: Page border).

> **Tip:** Many printers cannot print right up to the page edge. If a document should also look good printed out, keep important content a few millimeters away from the edge when “Ignore page margins” is on.

#### The footer moves along

A footer that ends exactly at the bottom edge of the printed area moves along if you choose a fixed size under “Page size” or change “Height (mm)”, “Top margin”, “Bottom margin” or “Ignore page margins”. It then ends at the new bottom edge again, that is, at the page edge if “Ignore page margins” is checked. “Width (mm)”, “Right margin”, “Left margin” and the mere switch to “Custom size (mm)” do not move it. On the canvas it jumps along immediately; in the PDF it is at the new place, and the remaining content ends above it.

- This refers to a group directly in the document with “🔁 Repeat on every page” and an entered height (see Groups: Repeat on every page and Pages, header and footer: Header and footer).
- Whether a footer moves along is decided by the designer when the window is opened: it must end exactly at the bottom edge to within half a millimeter and start below the top margin. A footer that reaches into the bottom margin, lies entirely in it or lies below the page stays where it is.
- If the footer, when moving along, would run into the top margin, it stays where it was. This happens, for example, at an intermediate state while you type a height; at the right value it moves along.
- Merely opening the window moves nothing. Moving along also applies in step 2 of “New template”.

#### Guides

“Show guides in the designer — in the whole template” shows or hides the dashed orientation lines of the canvas: the outlines of areas and groups, the outlines of the table cells and the dashed edges of tables without a printed line. Where there is a real border line, there is no guide anyway. What stays visible is the selection frame of selected objects, the outlines of selected groups, areas and table columns, and the snap lines when dragging. Guides never appear in the PDF.

You find the same check mark in the properties of a table; both always show the same state and apply to the whole template. How guides, gridlines and snap lines differ is described under Working on the canvas: Gridlines, snap lines and guides.

#### Tables

At the very bottom of the tab is the section “Tables” with a single check mark, the default for all tables of the template. It used to be in a tab of its own; its place is now taken by the “E-invoice” tab (see “E-invoice” tab).

| Setting | What it does | Default |
|---|---|---|
| “Repeat header row on following pages” | If a table runs over several pages, its header row appears once more at the top of every following page. Without a check mark it appears only once above the first row, and its place on the following pages becomes free. | on |

Below it says: “Default for all tables in this template. Each individual table can differ — the switch is there under »Show header row«.”

- **The individual table** has the same check mark in its properties under “Show header row”. It shows what currently applies for this table, including the default of the template. A click on it sets the value firmly on this table; it then no longer follows the default of the template, and there is no way back to “as in the template” in the designer (see Cells, header row and page break: Header on following pages and Free-form tables: The properties of the table).
- **In the PDF**, the setting of the table applies first, then the default here, otherwise it is repeated. Without repetition the rows on the following pages move up; the table then often needs one page less, sometimes also one more. Only tables directly in the document that really run beyond one page are affected. A table in a group or cell shows its header only once, no matter whether this check mark or the one on the table is set. If “Show header row” is off on a table, there is no header to repeat; its check mark “Repeat header row on following pages” is then grayed out. How header and first row move together to the next page is described under Cells, header row and page break: Header on following pages.
- **On the canvas** you see the effect only for tables with rows typed in by hand that run over several pages: on the following page there is a copy of the header (when you point at it with the mouse, “Repeated header row (continuation of the table)”). A table that takes its rows from the data shows only one sample row on the canvas; there you see the effect only in the full preview and in the PDF.
- Check mark off means the template carries “do not repeat”. If you set it again, nothing about it is stored in the template any more, and repeating applies again.

#### PDF name

At the very bottom of the tab is the section “PDF name”. It determines what the file created from this template is called.

| Setting | What it does | Default |
|---|---|---|
| “File name (without .pdf)” | The name as text with placeholders, for example `Rechnung {{invoicenumber}}`. The button on the right next to the field inserts a field or a variable at the text cursor. With “Condition branch” you define exceptions, for example `Invoice {{invoicenumber}}` for customers abroad; the window for this is the same as for “Currency & numbers” (see “Numbers & date” tab). | for a new template the name field of the primary source, otherwise empty |
| “Maximum characters” | Shortens the name to this many characters; `.pdf` does not count. 1 to 200 are possible; a larger number sets the field to 200. | empty: at most 200 |

Under the field, a blue line shows the name for the sample record, for example “With the sample record: Rechnung_R-2026-0042.pdf”. Below it says: “Empty: the file is named as before. Characters that are not allowed in file names, and spaces, become »_«; ».pdf« is added and does not count towards »Maximum characters«. An e-invoice »XML only« gets the same name, with ».xml«.”

- **Where the name applies:** for the PDF attachment of the emails that a button or an action creates, for the output `FileName` of the actions that a flow or custom code receives (see Actions and APIs: Outputs), for “PDF” and “Download PDF” in the designer and as the title of the PDF in its document properties. An e-invoice “XML only” gets the same name, with `.xml` (see E-invoice: The file name).
- **How the name is formed:** once per document on the main record, after the pages have been built; a placeholder supplies the same value as in the document. Characters that are not allowed in a file name (`\ / : * ? " < > |`), control characters and any whitespace, including the non-breaking space, become `_`; invisible characters are dropped. If it is shortened, `_` and periods at the end are dropped.
- **Without an entry**, the file is named as before: the email attachment like the template, the download in the designer like the template in lowercase (see Full preview and PDF: The file name). If the name yields nothing for a record, for example because the field is empty, the file is named like the template everywhere, with `-` instead of the characters that are not allowed in file names, as the email attachment has always been named (so in the designer not in lowercase); a note then appears in the feedback.
- For a template without an entry, the button “Insert the name field of the main source” is under the note. It enters the name field of the primary source, as a new template gets it. Which field that is, Dynamics says; for an invoice it is usually `{{name}}`, for custom tables, for example, `{{contoso_name}}`.
- Nothing changes on the canvas.

### “Font” tab

The section “Font” contains the defaults for all texts of the template. They take effect on the canvas and in the PDF; the only exception is “Minimum lines when text is split”, which you see only in the full preview and in the PDF.

[Image: The section “FONT” in the “Font” tab of the window “Template settings”, with a small “i” symbol after the heading. On the left is the selection “Default font” (set to “Default (Arimo)”), next to it the wide button “⚙ Manage fonts” with an “i” symbol on the right. Below it two number fields side by side, “Default line spacing (1 = single)” and “Indent per bullet level (mm)”, and a gray note: fonts are uploaded via “Manage fonts”, Arimo is always included. Further down is the field “Minimum lines when text is split” with an “i” symbol and a second gray note: empty = 2, 1 to 9 are possible. The three number fields show their defaults 1, 5 and 2 in gray.]
Caption: The “Font” tab in the template settings.
- Image marker 1: The default font of the template. Arimo is always included and does not need to be uploaded.
- Image marker 2: Opens the window in which you upload fonts; it applies to all templates in your environment.
- Image marker 3: Line spacing and indent: defaults for all texts without an entry of their own. Empty means 1 or 5 mm.
- Image marker 4: The note mentions once more how to upload fonts.
- Image marker 5: Minimum lines when text is split: Empty means 2. You see the effect only in the full preview and in the PDF.

| Setting | What it does | Default |
|---|---|---|
| “Default font” | The font for everything that has no font of its own: texts, tables, header and footer. The choice applies equally to body text and headings (see Default font). | “Default (Arimo)” |
| “⚙ Manage fonts” | Opens the window in which you upload, replace, download and delete fonts, for all templates in your environment (see Image library and fonts: The “Manage fonts” window). Takes effect immediately. | – |
| “Default line spacing (1 = single)” | The line spacing of every text that has nothing of its own: 1 single, 1.5 one and a half, 2 double, at most 5 (see Line spacing and indent). | empty = 1 |
| “Indent per bullet level (mm)” | How far bullets, numbering and indent are indented per level, at most 20 mm. A different value changes where the lines break. | empty = 5 mm |
| “Minimum lines when text is split” | If a text is split at the page edge, each page keeps at least this many lines of it. 1 to 9 are possible; 1 turns the protection off (see At the page edge: Minimum lines when text is split). | empty = 2 |

Under the fields there is a gray note that mentions uploading via “Manage fonts” and says that individual texts can differ from this font. If an older template carries a different font for headings than for body text, it says instead: “This template still has »…« saved for headings. As soon as you choose something here, your choice applies to both.”

#### Default font

The list “Default font” is divided into groups:

- **“Default (Arimo)”** at the very top: No font is entered, Arimo is printed. Arimo is supplied in all four styles (regular, bold, italic, bold italic); you do not need to upload it anywhere.
- **“Uploaded fonts”:** all font families that are in your Dynamics environment, sorted by name and each in its own typeface. In Dynamics, “Arimo” is always here as well. If you choose this entry, the name is in the template; printing works as with “Default (Arimo)”. A template created with “New” carries this entry. If you have uploaded a font named Arimo yourself, yours takes precedence over the supplied one.
- **“Old default”:** If an older template still carries an earlier default such as “Segoe UI”, it appears here as “… — old default, Arimo is used”. Arimo is printed, without a warning.
- **“Not uploaded”:** If the template names a font that is not in the list, it appears here as “… — missing under »Fonts«”.

Opening the window changes nothing about the entered font; something is written only when you choose yourself. If the template contains a name in a different spelling, such as “roboto”, the list shows the matching entry “Roboto” as chosen. Individual passages of text can carry a different font in the window “Edit text” (see The “Edit text” window: Size, font and line spacing).

- **On the canvas**, all texts without a font of their own are immediately drawn and measured in the chosen font; line breaks and page breaks are therefore already correct on the canvas.
- **If a font is not uploaded**, the canvas draws Arimo and reports: “The font »…« is not stored under »Fonts«. The canvas and the printout therefore use Arimo — upload the font so that the canvas and the PDF match.” If only the regular style is missing, it reports: “The font »…« has no regular style. The existing styles are used; where none fits, Arimo is used. …” After a brief network disruption, the designer tries again by itself after a pause; until then the canvas can differ from the PDF. If an uploaded font file cannot be read in the browser, the designer reports that too. Printing reads the file in its own way, and the canvas can then likewise differ from the PDF.
- **In the PDF** the chosen font is embedded. If it is missing, the document prints Arimo and reports the substitution as a warning. If the canvas was still built with the original font, line breaks and page breaks in the PDF can differ. If the canvas already draws Arimo, canvas and PDF match; only the desired font is missing. Text set to italic is then slanted, according to the designer’s help, because Arimo has all four styles. If only one style is missing, such as the italic one, it prints the regular style of the same family, and a warning appears under the created document (see Problems and messages: Notes and warnings). The warning belongs to the document: it appears in the full preview just as when printing via a button. An artificially slanted font is deliberately not provided.

What is printed in each case when something is missing from the chosen font:

| What is missing | What is printed |
|---|---|
| The whole font | Arimo; the document reports the substitution as a warning. |
| The style “Bold” | Bold text appears in normal stroke weight. |
| The style “Italic” | Italic text appears upright. |
| The style “Bold italic” | The text appears upright and in normal weight. |
| The regular style itself | The existing styles are used; where none fits, Arimo is used. |

#### Line spacing and indent

- **“Default line spacing (1 = single)”:** Values above 0 up to 5 are possible, the arrow keys change in steps of 0.05. Empty, 0 or a negative number means 1; nothing is then stored in the template. When this default applies and when a setting that sits closer to the text takes precedence is described under Texts: Line spacing. A new text object takes over the value of the template by itself; on an object, an empty field again means “from the template”.
- **What it covers in the PDF:** text objects and cells from the column designer. Simple column values and the header row of a data table appear single-spaced as long as the table has no line spacing of its own (see Data tables: The properties of the whole table). How the spacing is shown in the window “Edit text” and that printing is authoritative is described under Texts: Line spacing.
- **“Indent per bullet level (mm)”:** Values above 0 up to 20 mm are possible, the arrow keys change in steps of 0.5. Empty, 0 or a negative number means 5 mm, the value of all existing templates; a number larger than 20 counts as 20. The one value applies to all levels: the second level is indented twice as far, the third three times, at most five levels. It applies to bullets, numbering and the indent buttons “⇥” and “⇤” in the window “Edit text” (see The “Edit text” window: Lists and indent).
- **Consequence of a different indent:** The lines become narrower or wider and break at different words. A text can become one line longer, and in the borderline case a page is added. Canvas and PDF calculate the same way.

#### Minimum lines when text is split

The field “Minimum lines when text is split” determines how many lines of a text that is split at the page edge stay on each page (empty means 2, 1 to 9 are possible, and 1 turns the protection off); for which texts the protection applies, how the field treats entries and what is different for background and border is described under At the page edge: Minimum lines when text is split.

### “Numbers & date” tab

This tab determines in which language and number style the document prints date, time, numbers, amounts and Yes/No. It has four sections: “Template language”, “Date & time”, “Currency & numbers” and “Option label language”. How it works in detail is described on the page Numbers, currency and dates. That page also covers the condition branches with which five of the settings can be switched depending on the customer, and the question of which entry applies if a value is set in several places (see Numbers, currency and dates: “Numbers & date” tab). Here it only says which fields the tab has.

| Setting | What it does | Default |
|---|---|---|
| “Template language” | Determines how the document writes date, numbers and Yes/No as long as nothing of its own is set below it (see Numbers, currency and dates: Template language). | German (Germany); in the English designer English (United States) |
| “Date format” | The format of pure date values (see Numbers, currency and dates: Date & time); with “(custom pattern)” you type a pattern of your own (see Numbers, currency and dates: Custom pattern). | “Default (regional)” |
| “Date + time format” | The format of values with a time (see Numbers, currency and dates: Date & time). | “Default (regional)” |
| “Take the currency from the record” | Symbol and decimal places come from the currency of the printed record (see Numbers, currency and dates: Currency from the record). | off; for a new template on if the primary source has a currency |
| “Currency symbol” | The character on every amount, after or before it depending on the number style (see Numbers, currency and dates: Where the currency symbol appears). | empty = € |
| “Decimal places (currency)” | To how many decimal places money amounts are rounded and printed (see Numbers, currency and dates: Currency & numbers). | 2 |
| “Number style (comma/period)” | Which character separates the decimal places and which the thousands (see Numbers, currency and dates: Currency & numbers). | By template language |
| “Thousands separator” | Whether and when to separate (see Numbers, currency and dates: Currency & numbers). | As before |
| “Option label language” | In which language choice, Yes/No, status and status reason fields print their label from Dynamics; the languages installed in Dynamics are offered (see Numbers, currency and dates: Option label language). | By template language |
| Condition branch | Under each of the four fields from “Currency symbol” to “Thousands separator” and under “Option label language” there is a button for exceptions depending on the customer (see Numbers, currency and dates: Condition branches). | – |

### “E-invoice” tab

Here you switch the e-invoice on and set it up. At the very top there is always the box “The AI can fill in the assignment for you” with the buttons for the AI and the steps up to the finished e-invoice. Below it, as long as the e-invoice is switched on, are the sections “E-invoice” with the switch and the assignment, “Default”, “Output” and “Only if …”, and at the end the explanation “Standard EN 16931”. Without an e-invoice, it shows under the box only the switch and the explanation of the standard. How assigning, checking and delivering work is described on the page E-invoice: ZUGFeRD and XRechnung.

| Setting | What it does | Default |
|---|---|---|
| “Open AI assistant”, “Download AI package” (box “The AI can fill in the assignment for you”) | An AI assigns the entries for you. “Open AI assistant” exists only in Dynamics; template and task are then in the clipboard, for a new template only after “Create template”. “Download AI package” opens the window “AI package” with the check mark “Include the e-invoice standard” set. Below it are the steps up to the finished e-invoice; the third step counts like the bar (see E-invoice: Assigning with AI). | – |
| “This template creates an e-invoice” | With every document, an e-invoice according to the chosen standard is created in addition. Switching it off keeps all assignments; the template then prints as before. When first switched on, Smart Templates chooses ZUGFeRD 2.5.2 (EXTENDED) with the output “PDF with embedded e-invoice” (see E-invoice: Switching on and “Only if …”). | off |
| “Only if …” | A condition in the building kit of the visibility rule. The e-invoice is created only for documents to which it applies; otherwise the document is created as before, without e-invoice and without a message. It is best to name the exceptions, for example “Invoice type is not Reminder” (see E-invoice: “Only if …”). | for every document |
| “Default” | The selection between “XRechnung 3.0”, “ZUGFeRD 2.5.2 (EXTENDED)” and own standards. Below it are version, “valid from” and the origin: “supplied, cannot be changed” or a note that an own standard has not been checked by Smart Templates. “Manage standards …” opens the list of standards (see E-invoice: The standard and Own standards). | ZUGFeRD 2.5.2 (EXTENDED) |
| “PDF with embedded e-invoice”, “e-invoice only (XML)” | What comes out when creating. The PDF with embedded e-invoice exists only for ZUGFeRD; for XRechnung, “e-invoice only (XML)” is fixed. Button, email and flow deliver what is set here (see E-invoice: The output). | PDF with embedded e-invoice (ZUGFeRD) |
| “additionally a PDF for reading” | The reading copy: with “e-invoice only (XML)”, the PDF is additionally created, as the template prints it, without embedded data. The check mark is available only with “e-invoice only (XML)”. | off |
| “Assign entries …”, “Check with sample record” | The bar counts the mandatory entries to which something is already assigned (for example “1 of 14 mandatory entries assigned”). “Assign entries …” opens the assignment window, “Check with sample record” opens it right away with the check (see E-invoice: Assigning entries and Checking with the sample record). If a mandatory entry is missing when creating, or the amounts do not add up, no document is created, only a message. | – |
| “Standard EN 16931” | The explanation of which standard Smart Templates implements. It cannot be changed (see E-invoice: The standard EN 16931). | – |

- **The settings belong to the template.** “Apply” in the window applies them to the open template, “Cancel” discards them; they are stored in Dynamics with “Save”.
- **When saving**, the designer checks, if the e-invoice is switched on, whether all mandatory entries are assigned. If something is missing, the message “Warning: For the e-invoice … is still missing …” appears; the template is saved anyway.
- **In the new creation window** (step 2 of “New template”), the same tab is in the same place.

### “Data” tab

The tab has three sections: “Keep warm”, “Data sources” and “Sample record”.

[Image: The “Data” tab in the window “Template settings” with three sections with a fine gray outline one below the other. “KEEP WARM” with a small “i” symbol: the checked box “Keep this template warm”, below it in gray “On: a test document every 30 minutes, discarded immediately. Does not trigger a flow.” and the button “Check keep-warm” with a wrench. “DATA SOURCES”: in a light box on the left in gray “Primary source” and on the right in bold “Rechnung”, below it “Additional source” (on two lines) with “Eigene Firma (Absender)”; below that the button “Manage data sources” with a gear. “SAMPLE RECORD”: in a light box “Record” with “RE-2026-000142” and “from” with “Rechnung”; the gray labels in both boxes appear in capital letters on screen. Below it the button “Choose another sample record” (two lines) and, side by side, the wide buttons “Open in Dynamics” with an arrow and “Remove”.]
Caption: The “Data” tab: keep-warm, data sources and sample record. The image shows the button “Check keep-warm” as it looks in Dynamics.
- Image marker 1: Keeps this template warm; the sentence below says what currently applies.
- Image marker 2: Checks keep-warm and sets up what is missing again; only in Dynamics.
- Image marker 3: What the template prints from: primary source and additional sources.
- Image marker 4: Opens the window “Manage data sources”.
- Image marker 5: The stored sample record; the full preview, PDF and keep-warm calculate with it.
- Image marker 6: Open the record in Dynamics or take it out of the template without asking.

#### Keep warm

Keep-warm regularly creates a test document of this template so that the first document after a break does not take long: if nobody creates a document for a while, Dynamics puts the machine to sleep in the background, and the first document afterward takes ten to seventeen seconds, according to the designer’s help. How this is set up in the environment and how it works is described under Keep warm: How it works.

| Setting | What it does | Default |
|---|---|---|
| “Keep this template warm” | Every 30 minutes a test document of this template is created and immediately discarded: not saved, not sent, without a flow. The check mark applies per template; a warmed invoice template does not make a quote faster. It is saved with the template. | on |
| “🔧 Check keep-warm” | Checks whether keep-warm is still completely set up for all checked templates and restores missing parts. Takes effect immediately and does not belong to the template. | – |

- **Note under the check mark:** It says what currently applies: with a check mark “On: a test document every 30 minutes, discarded immediately. Does not trigger a flow.”, without one “Off: the first document after a break takes ten to seventeen seconds again.” If the template is inactive in Dynamics, it says “⚠ This template is INACTIVE — the checkbox does nothing here.”
- **The check mark** is set for every template as long as nobody has explicitly removed it. Switching it off costs only speed for the first document after a break. It changes nothing on the canvas and in the document. Which record is used for warming is described under Keep warm: How it works, which templates are warmed under Keep warm: Switching on and off per template.
- **“🔧 Check keep-warm”:** What the button displays during and after the check, also outside Dynamics, and why you normally do not need it is described under Keep warm: Checking. You can also set the check mark outside Dynamics, for example in a local preview; it can take effect only in Dynamics.

#### Data sources

The section shows what the template prints from: “Primary source” with the name of the primary source and, if present, “Additional source” or “Additional sources” with their names. Without a primary source it says “No primary source set yet”.

The button below it opens the window “Manage data sources” (see Data sources and relationships: The “Manage data sources” window). With a primary source it is called “⚙ Manage data sources”; without a primary source it is blue and called “★ Set primary source”; you then choose the primary source in this window. When you point at it with the mouse, it says “Opens the data source manager: primary source, additional sources, relationships and rules.”; you do not find relationships and rules there, however, but in the data tree: the designer fetches relationships from Dynamics itself, and you create rules there (see Data sources and relationships: Relationships and Rules: Creating a rule). The window lies over the template settings; if you close it, this section shows the new state. Confirmed work on sources belongs to the state of the template settings (see Opening, applying or discarding the window).

#### Sample record

What the sample record is, what it does and what the canvas uses it for is described under Data sources and relationships: The sample record; here the controls of the section are described.

Without a primary source, this section says only “Set the primary source first — then you can save a record here that the full preview and the PDF work with.” With a primary source, this applies:

| Control | What it shows or does |
|---|---|
| “Record” | The name of the stored record; when you point at it with the mouse, its identifier. Without a record, “None saved” in gray; if it has no name, “no name · ” with the first eight characters of the identifier. If it was deleted in Dynamics, “— no longer exists in Dynamics” follows; if it could not be read just now, “— could not be read (no read permission)” or “(loading failed)”. |
| “from” | The source the record comes from. |
| Notes below | Depending on the situation, a note appears below: without a stored record, the note that the designer asks about it before every full preview and every PDF (see Data sources and relationships: The sample record), and in red one of two notes if the record was deleted in Dynamics or Dynamics has just not delivered it. The wording of the two red notes and what happens in both cases is described under Data sources and relationships: When the sample record is missing or unreadable. |
| “Choose sample record” or “Choose another sample record” | Blue as long as none is stored. Opens the window “Choose sample record · …” (see Data sources and relationships: The “Choose sample record” window). After the choice, the designer shows “Loading sample data...”, reloads the sample data and reports “Sample record selected: …”. If you close the selection window without a choice or with “Continue without a sample record”, everything stays as it was. |
| “↗ Open in Dynamics” | Only with a stored record. Opens it as a form in Dynamics, in a new window or tab. |
| “Remove” | Only with a stored record. Takes it out of the template without asking and rebuilds the sample data (“Resetting sample data...”); the additional sources stay loaded. This changes nothing about the document that is printed in Dynamics. |

The sample record is saved with the template and counts as a change in the window: “Cancel” and “Discard” bring back the previous one and reload its sample data.

### What changes in the document?

**On the canvas:** You see page size, margins, default font, line spacing and indent immediately, even while the window is open; the guides exist only here. You see minimum lines and the repeated header row of tables from data only in the full preview. What language, date, amounts, numbers and condition branches change on the page is described on the page Numbers, currency and dates (see Numbers, currency and dates: What changes in the document?).

**In the PDF:** The page has exactly the set size and the margins; the font is embedded, a missing one is replaced by Arimo (see Default font). Tables directly in the document repeat their header according to the default if they have nothing else set themselves. With the e-invoice switched on, the e-invoice is created in addition; it does not change the appearance of the page (see E-invoice: What changes in the document?). Guides and keep-warm never appear in the document. How date, amount, number and Yes/No are printed without an entry of their own is described on the page Numbers, currency and dates (see Numbers, currency and dates: What changes in the document?).

---

## Numbers, currency and dates

*For users · Template and pages · Page en/zahlen-datum.html*

> **In short:** This page brings together everything that determines how the document writes date, time, numbers, amounts and Yes/No. The settings for the whole template are in the “Numbers & date” tab of the template settings: the template language, the date format, the currency symbol, the decimal places, the number style and the thousands separator. Currency symbol, decimal places, number style and thousands separator can be switched with condition branches depending on the customer, and the currency can come from the record. A single date field gets its format in the window “📅 Date format for this field”, a single number its own decimal places through a custom variable. Which kind of field is set where is shown right away by the first table.

### How fields are printed: formats

When inserting, the designer chooses the format according to the kind of field. In the editor you see only the marker with the name; how the value looks is shown by the full preview and the PDF with the sample record. The table says what is printed and where you set it; the details are in the sections it refers to.

| Kind of field | What is printed | Where you set it |
|---|---|---|
| Text and all other fields | The value as it is in the record. | – |
| Number | Without a fixed number of places, as many decimal places as the number needs, at most four, without a thousands separator. With a fixed number of places, it is rounded to those places, and the thousands separator is added. What the switch “Thousands separator” changes about this is described under Currency & numbers; how long digit sequences are printed, under How the document prints numbers and amounts; when the designer enters a number of places on insertion, under Decimal places and symbol for a single field. | Currency & numbers (“Number style (comma/period)”, “Thousands separator”) |
| Money amount | Amount with the symbol and decimal places of the template. The symbol appears after or before the amount, depending on the number style, for example “1.234,50 €”, “$1,234.50” or “CHF 1'234.50” (see Where the currency symbol appears). How rounding works and what a currency code of its own on the field does is described under How the document prints numbers and amounts. | Currency & numbers (also with condition branches) |
| Date | The date format of the template; if none is set there, the short format of the template language. Month names appear in the language of the field or the template. If the value is not a date, it appears unchanged. Without a year it is not one: “07.11.” or “3/4” appears as it is and counts as text in conditions, also with a time (“07.11. 10:30”). | Date & time; for a single field “📅 Format” (see The date format of a single field) |
| Date with time | Date and time in the “Date + time format” of the template; if none is set there, short date and short time of the template language. This is how, for example, the system variable “Date & time” prints. For a date field from Dynamics that also carries a time, a reservation applies, and there is a way to print the time after all (see Date & time). | Date & time (“Date + time format”) |
| Yes/No | For a Yes/No field from Dynamics, the label stored there, for example “Ja” and “Nein” or “Bezahlt” and “Unbezahlt”, in the option label language (see Option label language). A custom Yes/No variable, a variable of a rule of the type Yes/No with a fixed value or a Yes/No result, and a Yes/No value without a label from Dynamics, for example in sample data without Dynamics, appear as “Ja” or “Nein” in the template language (see Template language). For a Yes/No field, what counts is whether it is set to yes or no, not its label: for “Unbezahlt”, “Nein” appears. The designer’s previews with the sample record show it the same way, for example “Result with the current sample data” in the window of a dynamic text (see Texts: Dynamic text); they do not know labels per language. The canvas itself shows the field name at that place. A value that is not set stays empty. | Option label language, Template language |
| Choice, multi-select choice, status, status reason | The label from Dynamics in the option label language; for a multi-select choice all chosen ones, separated by “; ”, for example “Kreditor; Debitor”. | Option label language |
| Custom variable | With the settings of the variable under “What should it look like?” (decimal places, number style, thousands separator, for currency the symbol); if left empty, those of the template apply. A variable that does not exist stays empty, and the document reports it. | Variables: What should it look like? |

You set how numbers and amounts are written (“1.234,56”, “1,234.56”, “1 234,56”, “1'234.56” or “1234.56”) under Currency & numbers. How rounding works, when thousands separators appear and how a number is read from a text field is described under How the document prints numbers and amounts.

### “Numbers & date” tab

The basic settings for the whole template are in the window “Template settings”, “Numbers & date” tab. How you open, apply or discard the window is described under Template settings: Opening, applying or discarding the window. The tab determines in which language and number style the document prints date, time, numbers, amounts and Yes/No. It has four sections: “Template language”, “Date & time”, “Currency & numbers” and “Option label language”. On the canvas, fields appear as blue markers with their name, not with values; you see what these settings do in the blue “Example:” lines in the tab and then in the full preview and in the PDF.

[Image: The upper part of the “Numbers & date” tab in the window “Template settings”. At the very top the tab bar, “Numbers & date” is active. Below it two sections with a fine gray outline. “TEMPLATE LANGUAGE” with an “i” symbol shows the selection “German (Germany)” and a gray note: it determines how the document writes date, numbers and Yes/No as long as nothing of its own is set below. “DATE & TIME” shows two selection lists side by side. On the left “Date format” with the entry “(custom pattern)”; below it an input field with the pattern “dddd, d. MMMM yyyy” and, in bold blue type, the line “Example: Donnerstag, 31. Dezember 2026”. On the right “Date + time format” with the entry “31.12.2026 14:30” and the blue line “Example: 31.12.2026 14:30”. Under both lists is a gray note that the formats apply to all date fields without a format of their own.]
Caption: The “Numbers & date” tab: template language and date formats, each with a blue example line.
- Image marker 1: The template language determines date, numbers and Yes/No as long as nothing of its own is set below.
- Image marker 2: The presets for pure date values; “(custom pattern)” shows an input field.
- Image marker 3: The custom pattern: upper and lower case matter (MM is the month, mm the minute).
- Image marker 4: The blue example line calculates immediately with today’s date in the chosen format and in the template language.
- Image marker 5: A list of its own for values with a time.

If something is set for a value in several places, the strongest entry applies:

1. an entry on the individual field: a custom date format (see The date format of a single field), fixed decimal places on a number (see Decimal places and symbol for a single field) or a currency code of its own on a money field (see How the document prints numbers and amounts);
2. the setting of a custom variable, if the value is printed through it (see Variables: What should it look like?); there are no condition branches there;
3. the first matching condition branch of the template setting (see Condition branches);
4. the fixed value of the template setting, and with “Take the currency from the record” checked, for symbol and decimal places the currency of the record;
5. the built-in default: €, two decimal places, number style and date format according to the template language, thousands separator “As before”.

### Template language

The selection under the heading “Template language” offers five languages: “German (Germany)”, “German (Austria)”, “German (Switzerland)”, “English (United States)” and “English (United Kingdom)”. Below it says: “Determines how the document writes dates, numbers and yes/no, as long as nothing of your own is set below. It does not translate your own texts.”

- **Default:** A new template gets the language in which the designer is displayed: English (United States) in the English designer, otherwise German (Germany). An older template without an entered language counts as German (Germany); something is written only when you choose.
- **Other languages:** If the template contains another language, for example from an imported file, its code appears as an additional first entry, for example “fr-FR”. If you choose one of the five once, this entry disappears. If printing does not know a code, it prints in German and records this as a note.
- **After choosing**, the window rebuilds itself so that the example lines and the month names in the date formats follow the new language. Nothing visible changes on the page.

| Language | Date “Default (regional)” | Date and time “Default (regional)” | Number “By template language” | Yes/No |
|---|---|---|---|---|
| German (Germany) | 31.12.2026 | 31.12.2026 14:30 | 1.234,56 | Ja, Nein |
| German (Austria) | 31.12.2026 | 31.12.2026 14:30 | 1.234,56 | Ja, Nein |
| German (Switzerland) | 31.12.2026 | 31.12.2026 14:30 | 1'234.56 | Ja, Nein |
| English (United States) | 12/31/2026 | 12/31/2026 2:30 PM | 1,234.56 | Yes, No |
| English (United Kingdom) | 31/12/2026 | 31/12/2026 14:30 | 1,234.56 | Yes, No |

- Month and day names come from the template language: Dezember or December, in Austria “Jänner” for January. The time alone (system variable “Current time”) appears as 14:30, in English (United States) as 2:30 PM.
- The template language does not change the currency symbol; it stays € as long as you set nothing else under “Currency & numbers”. Through the number style, however, it determines where it appears: for English before the amount (“€1,234.56”), for German (Switzerland) before it with a space (“€ 1'234.56”), otherwise after it (see Where the currency symbol appears).
- What the designer inserts anew after choosing also follows the template language: default texts such as “Neuer Text” or “New text” or “Spalte 1” or “Column 1” and column headers from the field names in Dynamics. It never changes existing texts.
- A field that carries a language of its own in the text, for example from an imported template, keeps it.
- **Yes/No** appears in the template language: Ja and Nein, in English Yes and No. If the template carries another language, for example from an imported file, French shows Oui/Non, Spanish Sí/No, Italian Sì/No, Dutch Ja/Nee, Polish Tak/Nie, and every other language that printing knows Yes/No; a language code that printing does not know prints German. An empty value stays empty. This applies to a custom Yes/No variable and to a Yes/No value without a label from Dynamics. A Yes/No field from Dynamics, by contrast, prints its label, including one of its own such as “Zulassen” and “Nicht zulassen”, namely in the option label language (see Option label language).
- **Not to be confused:** the template language and the language of the interface. The language of the interface is not the language of the template; you choose it in the header bar (see The header bar: Language choice). In a condition, by contrast, the designer compares with the display texts of choice fields and Yes/No fields, and these come in the language of the user who creates the document, not in the template language (see Conditions: Text, choice field and lookup). These fields are printed in the option label language (see Option label language).

> **Good to know:** With German (Switzerland), numbers appear with a period before the decimal places (1'234.56), but the date still as 31.12.2026. If a template prints for customers in Germany and in Switzerland, leave the template language as it is and create under “Number style (comma/period)” a condition branch for Swiss customers with “1'234.56” (see Condition branches).

### Date & time

The section has two selection lists side by side: “Date format” for pure date values and “Date + time format” for values with a time. Below them it says: “Applies to all date fields without a format of their own. Date-only fields use the first format, date + time fields the second.”

| Entry under “Date format” | Printed (example) | Note |
|---|---|---|
| “Default (regional)” | 31.12.2026 | Default. The short date of the template language; nothing is stored in the template. |
| “Same as the printing user (Dynamics)” | depending on the user | See below. |
| “31.12.2026” | 31.12.2026 | Day and month two-digit, year four-digit. |
| “2026-12-31” | 2026-12-31 | Year, month, day. |
| “31. Dezember 2026” | 31. Dezember 2026 | Month name in the template language; in an English template the entry is called “31. December 2026”. |
| “31.12.26” | 31.12.26 | Year two-digit. |
| “12/31/2026 (US)” | 12/31/2026 | Month first; the slashes stay slashes in every language. |
| “(custom pattern)” | as typed | See Custom pattern. |

| Entry under “Date + time format” | Printed (example) | Note |
|---|---|---|
| “Default (regional)” | 31.12.2026 14:30 | Default. Short date and short time of the template language. |
| “Same as the printing user (Dynamics)” | depending on the user | See below. |
| “31.12.2026 14:30” | 31.12.2026 14:30 |   |
| “2026-12-31 14:30” | 2026-12-31 14:30 |   |
| “31.12.2026 14:30:00” | 31.12.2026 14:30:00 | with seconds |
| “31. Dezember 2026, 14:30” | 31. Dezember 2026, 14:30 | Month name in the template language. |
| “(custom pattern)” | as typed | See Custom pattern. |

- **Choosing:** A preset applies immediately; “Default (regional)” takes the setting out again. Under each list, a blue line “Example: …” shows today’s date in the chosen format and in the template language.
- **“(custom pattern)”** shows an input field under the list (gray in the empty field: “e.g. dd.MM.yyyy” or “e.g. dd.MM.yyyy HH:mm”). If you come from a fixed preset, its pattern is in it as a starting point; from “Default (regional)” or “Same as the printing user (Dynamics)” it is empty, and the previous setting continues to apply until you type. Every keystroke applies immediately, and the example follows. If you empty the field, “Default (regional)” applies again, even if the list continues to show “(custom pattern)”. If your pattern equals a preset, the list shows that preset the next time it is opened.
- **What “Date format” applies to:** every date field without a format of its own, in text as in tables, the system variable “Current date” and variables of the type Date (see Variables: System variables).
- **What “Date + time format” applies to:** values with a time, certainly the system variable “Date & time”. Whether a date field from Dynamics that also carries a time follows this format is not certain; as far as we know, the designer inserts it as a pure date, and then the “Date format” applies. Check it in the full preview. If such a field is to show the time, give it its own pattern such as `dd.MM.yyyy HH:mm` under “📅 Format” (see The date format of a single field).
- **The time alone** (system variable “Current time”) has no setting of its own; it always appears in the short time format of the template language.
- **In the PDF:** A point in time from Dynamics is converted to the time zone that is set in the Dynamics settings of the person who creates the document. The calendar day and, if the format shows it, the time follow from that. A value that cannot be read as a date is printed unchanged.

**“Same as the printing user (Dynamics)”** prints dates in the personal format of the person who creates the document: date, time, separators and AM/PM from their settings in Dynamics (“Personalization Settings › Formats”). Month and day names still come from the template language. For a flow, according to the designer’s help, the format of the account under which the flow runs applies. The example line shows your own format and after it “· in print: format of the printing user”. If the settings cannot be read when printing, “Default (regional)” applies, and the document records this as a note. Existing templates do not change because of this; the entry applies only when you choose it. A custom pattern cannot be edited further from it.

> **Tip:** If you want to calculate with today’s date or compare a date with it, create a custom variable of the type Date and choose the system variable “Current date” in its first row. In the field pickers of conditions, the system variable itself is not available for selection; in the filter of a rule you therefore compare a date via “ƒx” with such a variable (see Conditions: Fixed value or value from the data). How to calculate with dates, for example a payment term 30 days after the invoice date, is described under Variables: Calculating with dates.

#### Custom pattern

You write a custom pattern with letters that stand for parts of the date. Upper and lower case matter: `MM` is the month, `mm` the minute. The examples show 31.12.2026, a Thursday, at 14:30:05 in a German template, in parentheses in an English one.

| Character | Meaning | Example |
|---|---|---|
| `d`, `dd` | day without or with a leading zero | 31; on the 5th of a month 5 or 05 |
| `ddd`, `dddd` | short or full day name | Do, Donnerstag (Thu, Thursday) |
| `M`, `MM` | month as a number without or with a leading zero | 12; in March 3 or 03 |
| `MMM`, `MMMM` | short or full month name | Dez, Dezember (Dec, December) |
| `yy`, `yyyy` | year two-digit or four-digit | 26, 2026 |
| `H`, `HH` | hour from 0 to 23 | 14 |
| `h`, `hh` | hour from 1 to 12 | 2 or 02 |
| `m`, `mm` | minute | 30 |
| `s`, `ss` | second | 5 or 05 |
| `tt` | AM or PM | (PM); do not use in a German template |
| `/` | date separator of the template language | . (/) |
| `:` | time separator | : |
| `'Text'` | text in apostrophes appears literally | `HH:mm 'Uhr'` gives 14:30 Uhr |
| `\` before a character | this one character appears literally | `HH\h` gives 14h |
| `%d` | only the day (a single letter alone would be a finished format, see below) | 31 |

- If the pattern consists of only one letter, it is a finished format of the language, for example `d` for the short and `D` for the long date. So for the day alone, write `%d`.
- The short month name `MMM` turns out differently depending on the language, in a German template for example “Dez” for December, in German (Austria) “Jän” for January. Check a pattern with `MMM` in the full preview.
- AM and PM (`t`, `tt`) exist only in an English template; do not use them in a German one.
- If a pattern cannot be evaluated, for example because of an apostrophe that is not closed, the document prints the default format of the language without a message. The example line shows this already while you type.

### The date format of a single field

A single date field can get a format of its own, independent of the template settings, wherever you edit it in the window “Edit text”: in a text, also in a table cell or column header that you design there (see The “Edit text” window: Markers in the text). A simple column value of a data table always follows the date format of the template.

1. Open the text with a double-click and, in the window “Edit text”, click once on the date marker.
   → “📅 Format” appears in the toolbar (when you point at it with the mouse: “Change the date format of this field (click the date chip, then here)”).
2. Click “📅 Format”, or double-click the date marker right away.
   → The window “📅 Date format for this field” opens.
3. Choose “Custom format” and below it a preset, or “(custom pattern)” with your pattern. Click “Apply”.
4. Then, in the window “Edit text”, click “Apply”.
   → Only this one field shows the date in the new format. If you point at the marker with the mouse, it says “Format: …”.

When you point at it with the mouse, the date marker shows its name, “Data source: …” and “Format: …” (without a format of its own “template default”), plus “Double-click: change”.

[Image: The window “Date format for this field” with a calendar symbol before the title and an “i” symbol after it. Under the title a gray sentence: “How THIS inserted field displays its date — independent of the template default.” Two option buttons one below the other: “Use template format (default)” and “Custom format” (chosen). Below it a light box with the selection “(custom pattern)” and an input field with “dddd, d. MMMM yyyy”. Then in bold blue type “Example: Samstag, 27. Juni 2026” and in gray “dd=day, MM=month, MMMM=month name, yyyy=year · upper and lower case matter.” At the bottom right “Cancel” and the blue button “Apply”.]
Caption: The window “Date format for this field” with a custom pattern.
- Image marker 1: Either follow the format of the template or use a custom format for this field only.
- Image marker 2: Presets or “(custom pattern)”.
- Image marker 3: The pattern field appears only with “(custom pattern)”; the same characters apply as in the template settings.
- Image marker 4: The example takes the value of the field from the sample record.
- Image marker 5: Writes the format to the marker; it becomes valid only with “Apply” in the window “Edit text”.

| In the window | What it does |
|---|---|
| Subtitle | “How THIS inserted field displays its date — independent of the template default.” If the field carries a language of its own, “The language of this field (…) is kept.” follows. |
| “Use template format (default)” | Default as long as the field has no format of its own. The field follows the “Date format” or “Date + time format” of the template settings, also after later changes. The box below is pale and cannot be operated; for information, the list shows the format of the template, for example “Default (regional)” or “Template pattern: …”. If the template is set to “Same as the printing user (Dynamics)”, the item is called “Use template format (format of the printing user)”. |
| “Custom format” | Enables the box. The format applies only at this place. If you choose or type nothing, the template format stays. |
| List in the box | For a date: “31.12.2026”, “2026-12-31”, “31. Dezember 2026”, “31.12.26”, “12/31/2026 (US)” and “(custom pattern)”. For date and time: “31.12.2026 14:30”, “2026-12-31 14:30”, “31.12.2026 14:30:00”, “31. Dezember 2026, 14:30” and “(custom pattern)”. Month names appear in the language of the field or the template. “Default (regional)” and “Same as the printing user (Dynamics)” do not exist here; “Use template format (default)” is there instead. |
| Pattern field | Appears only with “(custom pattern)” (gray in the empty field: “e.g. dd.MM.yyyy” or “e.g. dd.MM.yyyy HH:mm”). The same characters apply as under Custom pattern. The character “\|” is not possible here. If a custom pattern is already saved, the cursor is in it when opened, and the text is selected. |
| “Example: …” (blue) | Shows the result in the chosen mode, in the language of the field or the template. As the value it takes the value of the field from the sample record, otherwise today’s date. If “\|” is in the pattern, “⚠ The character »\|« is not possible in a custom format (it separates the details in the placeholder). Only the part before it is printed — please use a different separator, e.g. »·« or »–«.” follows. |
| Gray note | “dd=day, MM=month, MMMM=month name, yyyy=year · upper and lower case matter.”, for date and time with “HH=hour, mm=minute”. Pale in the mode “Use template format (default)”. |
| “Apply” (blue) | Writes the format to the marker; with “Use template format (default)” it removes a custom format again. A language of the field is kept. |
| “Cancel”, Esc key, click next to the window | Close the window without any change; the window “Edit text” stays open. |

- The change belongs to the text: it applies only when you apply in the window “Edit text”. If you cancel there and confirm “Discard the changed text?” with “Discard”, it is gone.
- In the PDF, the field prints with its own pattern in the language of the field or the template. Without a pattern of its own, the format of the template settings applies, and if none is set there, the short format of the template language.
- There is no such window for number, money and Yes/No fields (see Decimal places and symbol for a single field). A custom variable of the type Date does not have one either: its marker does not offer “📅 Format”, and it always prints in the “Date format” of the template (see Variables: Type Date).

### Currency & numbers

These settings apply to all amounts and numbers of the template for which nothing of their own is set. Under each of the four fields “Currency symbol”, “Decimal places (currency)”, “Number style (comma/period)” and “Thousands separator” there is a button of its own, “Condition branch”, for exceptions (see Condition branches).

[Image: The section “CURRENCY & NUMBERS” in the “Numbers & date” tab, with an “i” symbol after the heading. At the top the unchecked box “Take the currency from the record” with an “i” symbol. Below it four fields side by side: “Currency symbol” with the entry €, “Decimal places (currency)” with “2 (default)” and a small arrow, “Number style (comma/period)” with “By template language” and “Thousands separator” with “As before (default)”. Under “Currency symbol” and under “Number style” there is in each case a small white button “Condition branches (1) …” with a gray short version below it (“if Kunde › Land is »USA« → $” or “… → en”); under “Decimal places” and “Thousands separator” there is in each case a button “Condition branch”. Below it, in bold blue type, the example line “Example: 1.234,50 € · 1234,5 (number without fixed decimal places)” and a gray note text with {{Number:menge|2}} and an “i” symbol.]
Caption: The section “Currency & numbers” with two condition branches (currency symbol and number style).
- Image marker 1: The check mark: symbol and decimal places then come from the currency of the printed record (a section of its own further below).
- Image marker 2: The fixed value if no condition branch applies. A click into the field opens a small list (see “Value or field”).
- Image marker 3: “Condition branches (1) …”: There is one branch. A click opens the condition branches of this setting in a window of its own.
- Image marker 4: The short version of the branch: at most two branches. If a branch does not fit on one line, the value (“→ …”) appears on a second line, and only the condition is shortened with …. Here $ applies if the country is USA.
- Image marker 5: Each of the four settings has its own condition branch button; here still without a branch.
- Image marker 6: A shared example line for all four fields; it calculates the condition branches against the sample record.

| Setting | What it does | Default |
|---|---|---|
| “Take the currency from the record” | Symbol and decimal places come from the currency of the printed record: an order in dollars shows $ and two places, one in yen ¥ and none. Both fields are then disabled (see Currency from the record). | off; for a new template on if the primary source has a currency |
| “Currency symbol” | The character on every amount, after or before it depending on the number style: “1.234,50 €”, “$1,234.50”, “CHF 1'234.50” (see Where the currency symbol appears). Free text without a length limit; a click into the field also offers a field or a variable (see Value or field). | empty = € |
| “Decimal places (currency)” | To how many decimal places money amounts are commercially rounded and printed. The list offers 0 to 4, plus a field or a variable. The same number applies when summing in variables and rules (see How the document prints numbers and amounts). Which values apply if the number comes from a field, a variable or an imported template is described under How many decimal places are possible where. A value that is not in the list is shown by the button as it is stored. | “2 (default)” |
| “Number style (comma/period)” | Which character separates the decimal places and which the thousands: “1.234,56” (German), “1,234.56” (English), “1 234,56” (French, with a narrow space that does not break), “1'234.56” (Switzerland) or “1234.56” (without thousands separator). “By template language” follows the selection above under “Template language”. The number style also determines where the currency symbol appears (see Where the currency symbol appears). | “By template language” |
| “Thousands separator” | “As before (default)”: separation happens only with a fixed number of places, that is, for amounts and numbers with fixed decimal places. “Always separate”: also numbers without a fixed number of places; this changes the printed document. “Never separate”: no separator even with a fixed number of places. Takes precedence over the number style: “1234.56” with “Always separate” prints 1,234.56. | “As before (default)” |

Under the four fields there is a shared blue example line, without further settings “Example: 1.234,50 € · 1234,5 (number without fixed decimal places)”. It shows the amount 1234.5 with symbol and decimal places and the same number without fixed places, as they apply for the sample record; condition branches are checked against it for this. Without a sample record, the line calculates with empty data, and a condition can then turn out differently than in print. If the symbol comes from the data and has not been loaded yet, “‹currency symbol of the record›” appears there.

Below it is the note “Applies to all amounts and numbers without a setting of their own. Any variable can differ — there with a fixed value. Fixed decimal places for a single number: `{{Number:menge|2}}`.” with an ⓘ. How you set fixed decimal places for a single number and what the designer enters when inserting a number field is described under Decimal places and symbol for a single field.

#### Where the currency symbol appears

Whether the symbol is before or after the amount depends on the number style that applies to the amount: on “Number style (comma/period)” with its condition branches, for “By template language” on the template language, for a variable with its own number style on that. There is no switch of its own for this; this applies to all templates, including existing ones.

| Number style | Amount | Negative amount |
|---|---|---|
| 1.234,56 (German) | 1.234,56 € | -1.234,56 € |
| 1 234,56 (French) | 1 234,56 € | -1 234,56 € |
| 1234.56 (without thousands separator) | 1234.56 € | -1234.56 € |
| 1,234.56 (English) | $1,234.56 | -$1,234.56 |
| 1,234.56 (English), code such as CHF | CHF 1,234.56 | -CHF 1,234.56 |
| 1'234.56 (Switzerland) | CHF 1'234.56 | CHF -1'234.56 |

- For English, a character such as $, € or £ appears directly before the amount without a space, also with letters before it: “$1,234.56”, “R$1,234.56”. A code that ends in a letter or period, such as CHF, USD, kr or Fr., gets a space there as well: “CHF 1,234.56”. That is how the Unicode standard has it, which, for example, browsers follow when writing amounts. For the other number styles, a space always separates amount and symbol. The line never breaks at this space.
- If the symbol comes from the data, for example with “Take the currency from the record”, the inserted symbol counts.
- A code in the placeholder such as `{{Currency:Betrag|USD}}` changes only the character, not the side: in a template with German number style it appears as “1.234,56 $”, with English as “$1,234.56”.

#### Currency from the record

Every record in Dynamics has a currency, and it knows its character and its decimal places. With the check mark “Take the currency from the record”, the template takes both from there, without you having to change anything for each currency.

[Image: The section “CURRENCY & NUMBERS” with the box “Take the currency from the record” checked. Below it a gray note: “Currency symbol and decimal places now come from the currency of the respective record and are therefore locked. For exceptions there is still »Condition branch«. Clear the checkbox and your previous values apply again.” The fields “Currency symbol” and “Decimal places (currency)” show, instead of an input, a dashed-outlined, gray-filled box with a lock symbol and the text “From the record”. “Number style (comma/period)” and “Thousands separator” are unchanged. Under “Currency symbol” is the button “Condition branches (1) …” with the gray short version on two lines, “if Kunde › Land is »Schweiz«” and “→ CHF”, and below it “otherwise → from the record”. At the very bottom are the blue example line and the gray note text.]
Caption: With the check mark “Take the currency from the record”, symbol and decimal places are disabled; condition branches remain possible.
- Image marker 1: The check mark switches symbol and decimal places to the currency of the printed record.
- Image marker 2: Disabled: To change it, uncheck the box.
- Image marker 3: The decimal places also come from the record.
- Image marker 4: The note explains the lock and names the way to exceptions.
- Image marker 5: Exceptions continue to exist; if none applies, the currency of the record applies (“otherwise → from the record”).

- **Prerequisite:** a primary source. Without one, the check mark jumps back, and the designer reports for about four seconds “There is no primary source yet — first set one under »Manage data sources«.”
- **What the check mark creates:** If there is no relationship to the currency under the primary source yet, it creates one; it is called “Währung” and appears in the data tree. It uses an existing relationship to the currency, whatever it is called. This costs no additional query.
- **With the check mark**, “Currency symbol” and “Decimal places (currency)” show a dashed box “🔒 From the record” instead of the input (when you point at it with the mouse: “Comes from the currency of the record as long as »Take the currency from the record« is on. Add exceptions with »Condition branch«; to change it, clear the checkbox above.”). Above it says: “Currency symbol and decimal places now come from the currency of the respective record and are therefore locked. For exceptions there is still »Condition branch«. Clear the checkbox and your previous values apply again.”
- **After checking**, the designer loads the currency of the sample record in the background; until then the example line shows “‹currency symbol of the record›”.
- **Check mark removed:** Symbol and decimal places get their previous values back, empty if there were none. The relationship and existing condition branches stay.
- **Exceptions:** you continue to create them with “Condition branch”. If none applies, the currency of the record applies. An applying branch with an empty value does, however, give € or two places, not the currency of the record.
- **In the PDF**, symbol and places of the currency of the printed record of the primary source appear; they apply in the whole document, also in table rows, and not the currency of an individual row. If the symbol of the currency is missing in Dynamics, the field reference in curly braces appears instead of the symbol; if the number of places is not readable, two places apply. The number of places from the record also applies to rounding before summing.
- **For a new template**, the check mark is already set in step 2 if the primary source has a currency. Existing templates stay as they are.

#### Value or field: the small list at symbol and decimal places

“Currency symbol” and “Decimal places (currency)” accept a fixed value or a value from the data. The same applies in the window “Condition branches” for “THEN” and “ELSE” of these two settings.

[Image: Excerpt of the section “Currency & numbers”: at the top the label “Decimal places (currency)” with an “i” symbol, below it a button with the entry “2 (default)” and a small arrow pointing down. Below that a white list with a border and shadow is open. The entries from the top: “2 (default)” (bold because chosen), “0”, “1”, “2”, “3”, “4”, then a fine dividing line, then “From the record's currency” and “Choose a field or variable …”, both with a small symbol before the text.]
Caption: The list at “Decimal places (currency)”: fixed values, the currency of the record or a field.
- Image marker 1: A click on the button opens the list.
- Image marker 2: Bold: the currently chosen value.
- Image marker 3: Fixed values from 0 to 4.
- Image marker 4: Appears only if the primary source has a relationship to the currency.
- Image marker 5: Opens the window “Choose field”; for the decimal places only number fields.

- **“Currency symbol”** is a text field (gray in the empty field: “€”). A click into it or tabbing into it opens a small list; you can still just keep typing, and every keystroke applies immediately.
- **“Decimal places (currency)”** is a button with ▾ that shows the chosen number. A click opens the list with “2 (default)”, “0”, “1”, “2”, “3” and “4”.
- **“From the record's currency”** appears in the list if the primary source has a relationship to the currency. If you want symbol and places from the record at the same time, use the check mark “Take the currency from the record” instead.
- **“Choose a field or variable …”** opens the window “Choose field” (see Data tree and field picker: The “Choose field” window). For the symbol, all fields, the system variables and your custom variables are there; for the decimal places only number fields. A field from the data is read on the printed record.
- **A chosen field** appears as a marker with its name in the field, a custom variable as “@Name”. A click on the marker opens the list again; the ✕ next to it (“Remove field”) removes the field, after which the default applies again. A mixed text such as a field with a character after it remains ordinary text.
- **The list closes** as soon as you choose something, click next to it or the field scrolls out of view; in the symbol field also with the Enter key. Do not use the Esc key for this (see Template settings: Opening, applying or discarding the window).

For “Number style (comma/period)” and “Thousands separator” there is no such list; you choose from the fixed entries. If there is another value there from an imported template, it appears as an additional first entry, a value from the data as “From the data: …”. Printing replaces a number style it does not know, without a message, with the number style of the template language.

#### Decimal places and symbol for a single field

For number, money and Yes/No fields there is no format window of their own in the editor; the marker shows only name and source, and you do not see the number of places there. Decimal places, symbol, number style and thousands separator for the whole template are in the section Currency & numbers. An ordinary number, such as a quantity, shows as many decimal places as it needs, at most four.

If you need something different for a single value of the printed record, for example always two decimal places or a different currency symbol, create a custom variable that takes over the field, and set its decimal places, number style, thousands separator and currency symbol (see Variables: What should it look like?). This helps only for a value that occurs once in the whole document, such as a field of the printed record. For a field of a table row, such as the quantity of an item, this way does not work: a custom variable would have the same value in every row (see Variables: When a custom variable is calculated). For these settings a variable has no if-then branches; those exist only in the template settings.

- **Number field:** If you drag a number field newly into a text, the designer also enters the number of places stored in Dynamics; it is then rounded to these places, and the thousands separator is added, except with “Never separate”.
- **Money field:** For money fields the designer enters no number of places, no matter whether their precision in Dynamics depends on the field, the organization or the currency; their places come from the settings in the section Currency & numbers.
- **Placeholder:** The gray note under the four fields names the notation that is in the placeholder for this, `{{Number:menge|2}}`; the window “Edit text” has no button of its own for it.

### Option label language

Choice fields, multi-select choices, Yes/No fields, status and status reason from Dynamics print the label stored in Dynamics for their value, for example “Bezahlt” and “Unbezahlt” on a Yes/No field or “Offen” on a status. The last section of the tab, “Option label language”, determines in which language. It is built like a field under Currency & numbers: a selection list, below it the button “Condition branch” and a blue example line.

[Image: The section “OPTION LABEL LANGUAGE” in the “Numbers & date” tab, with an “i” symbol after the heading. Below it the label “Option label language” with an “i” symbol and a selection list with the entry “By template language”. Under the list is a small white button “Condition branches (1) …” with a gray short version on two lines below it: “if Kunde › Land is »USA«” and “→ English”. Below that, in bold blue type, the example line “For the sample record: Deutsch” and a gray note text: The setting applies to choice, multi-select choice, Yes/No, status and status reason from Dynamics; if a label is missing in the chosen language, the base language of the environment is printed.]
Caption: The section “Option label language” with a condition branch.
- Image marker 1: The language that applies if no condition branch applies. “By template language” is the default; the list names the languages installed in Dynamics.
- Image marker 2: “Condition branches (1) …”: There is one branch. A click opens the condition branches of this setting in a window of its own.
- Image marker 3: The short version of the branch: for customers in the USA, English applies. If it does not fit on one line, the value appears on a second line; only the condition is shortened.
- Image marker 4: The example line names the language that applies for the sample record. The branch does not apply here; the template language Deutsch applies.

- **Offered:** the languages installed in Dynamics, with their names. In the designer without a connection to Dynamics, Deutsch and English are available.
- **Default:** “By template language” takes the language set under Template language. German (Austria) and German (Switzerland) count as German, English (United Kingdom) as English, because Dynamics lists languages, not countries.
- **If a label is missing** in the chosen language, or the language is not installed in Dynamics, the base language of the environment is printed.
- **Different per record:** With “Condition branch” you choose, for example, English for customers abroad (see Condition branches). The short form under the button gives the language by its name, for example “if Kunde › Land is »USA« → English”.
- **Example line:** “For the sample record: …” names the language that applies for the sample record, calculated with condition branches. If Dynamics does not have this language, “(not installed in Dynamics, the base language is printed)” and its name follow.

Before this setting existed, a document printed the label in the language of the user who created it: someone who uses Dynamics in English got “Paid” instead of “Bezahlt” in a German template. With the default, the document looks the same no matter who creates it. A Yes/No field with its own label now also prints it through the format Yes/No; previously “Ja” appeared there, also for “Unbezahlt”.

> **Good to know:** Conditions continue to compare with the label in the language of the user who creates the document (see Conditions: Text, choice field and lookup). Their result does not change because of this setting: “Status is Offen” applies for a user with a German interface, even if the document prints the status in English as “Open”. If you choose the value “by option value” in the building kit, the condition compares via the code and applies in every language (see Conditions: Choice fields).

- The setting affects values that Smart Templates loads from Dynamics itself: with the button, in the flow and in the full preview in Dynamics. In the designer without a connection to Dynamics and with sample data sent along, there are no labels per language: choice values appear as they are in the data, Yes/No fields as “Ja” and “Nein” in the template language.
- A custom variable of the type Text that inserts a choice field prints the chosen language; in conditions it has the text of the data. A rule variable from the “Calculate” tab, by contrast, is a value of the data and shows the label in the language of the user. A custom variable of the type Yes/No writes “Ja” or “Nein” in the template language; if it takes over a Yes/No field, it goes by the field’s value, not by its label (see Variables: Type Yes/No).
- For every language that the setting can yield, printing fetches the labels once per document from the table definitions of Dynamics, not per record. The feedback names this separately, for example “(+1 metadata query for option labels)”. The same addition also appears with the query plan (`Mode` = `plan`) in `Message` after the line “PLAN: …” (see Actions and APIs: st_GenerateDocument: all inputs and outputs); it does not count there among the queries of the template. How many such queries are really made is stated only in the feedback after printing; if the document reads no choice field, they do not apply. If fetching the labels fails, every choice field prints in the language of the user, and the document reports it as a warning (see Problems and messages: Loading data).

### How the document prints numbers and amounts

- **Rounding:** Rounding is commercial, from 5 upward, and exactly as the number is written decimally: 1.005 becomes 1.01, not 1.00. Negative numbers are rounded by their absolute value; what rounds to 0.00 appears without a minus.
- **Round first, then sum:** For sum and average, each individual value is rounded before adding so that the sum matches the printed rows; where this applies and to which places is described under Rules: Round first, then sum.
- **Amounts** appear with the symbol and the set decimal places, with a thousands separator, except with “Never separate”: 1.234,50 €, $1,234.50 or CHF 1'234.50; where the symbol appears is determined by the number style (see Where the currency symbol appears). If a value cannot be read as a number, it appears unchanged, without a symbol.
- **Currency code on the field:** If a money field in the template carries a currency code of its own, for example from an imported template, it takes precedence: EUR becomes €, USD $, GBP £, CHF stays CHF.
- **Numbers without a fixed number of places** show as many decimal places as needed, at most four, without a thousands separator, except with “Always separate”: 1234,5678. The decimal places (currency) do not change this. Numbers with more than 15 digits, such as EAN or serial numbers, appear unchanged, and the document reports it.
- **Thousands separators** appear only from four places before the decimal separator.
- **Yes/No** appears in the template language; the words per language and the behavior with own labels are described under Template language.

#### Reading numbers: comma and period

Wherever the designer reads a text as a number, it treats comma and period differently depending on the place. The table sets the three cases side by side.

| Where | How it is read |
|---|---|
| In print: a number that is a text in the data, for example “1.234,56” in a text field | The document first reads it as a number with a period as the decimal separator, for example “1234.5”, and only if that does not work, in the set number style. A text such as “1.234” is therefore read as 1.234 and not as 1234; check such values in the full preview. |
| In a condition: comparison with a number | A period always counts as the decimal separator: “1.000” is 1, not a thousand. A comma as the decimal separator is taken by the designer as a period: 1,5 is 1.5 (see Conditions: Numbers and amounts). |
| In a fixed value of a variable and in a formula | Write decimal numbers with a period. A comma is not converted: “1,19” cannot be calculated, and in a formula a comma turns the formula into text (see Variables: Fixed values and Template format: Formulas). |

#### How many decimal places are possible where

The template, the variables and the rules allow different numbers of decimal places. The table sets the ranges side by side.

| Where set | Possible values | What else applies |
|---|---|---|
| The list at “Decimal places (currency)” in the template settings | 0 to 4 places | In addition, the list offers a field or a variable. |
| “Decimal places (currency)” of the template, if the number comes from a field, a variable or an imported template | 0 to 10 places | More counts as 10; a negative, fractional or unreadable entry counts as 2. |
| A custom variable of the type Number or Currency, “What should it look like?” | 0 to 6 places | Default: for a currency “From template” with the number of places of the template, for a number “Automatic (up to 4)”, that is, as many places as needed, at most four. More under Variables: What should it look like?. |
| The calculation of a rule, “rounded to” … “Decimal places” | 0 to 6 places; a larger number that you type in or that an imported template brings counts as 6 | If the field stays empty, the “Decimal places (currency)” of the template apply. A negative number or an entry that is not a number (such as “abc”) counts in an imported template like an empty field; the check on import names it as a notice (see Managing templates: The report windows). If you type in a negative number, the designer deletes the entry. For count, minimum and maximum the field does not exist. More under Rules: Round first, then sum. |
| A number without a fixed number of places in the document | as many as needed, at most four | Printed without a thousands separator, except with “Always separate”. |

### Condition branches: different per customer

Each of the four settings under “Currency & numbers” has its own condition branches: if the condition applies, its value applies in the whole document. For customers in the USA, for example, you create under “Currency symbol” a branch “Land is USA → $” and under “Number style (comma/period)” a second one with the same condition and “1,234.56”. By the same pattern, the option label language also has condition branches. For template language and date formats there are no condition branches. How condition branches are built in principle and how they are checked is described under Variables: Condition branches; here the particularities in the template are described.

1. Under the setting, click “Condition branch”.
   → The window “Condition branches: …” with the name of the setting opens, with a new, empty branch.
2. Under “IF”, build the condition, and under “THEN” enter the value. You create further branches with “Condition branch” under the branches.
3. Click “Done”.
   → Under the setting there is now “Condition branches (1) …” with a short summary, and the example line includes the branch in its calculation.
4. Click “Apply” and save the template.

The button under each setting is called “Condition branch” as long as there is no branch, otherwise “Condition branches (2) …” with the count. It also exists if the field is disabled by “Take the currency from the record”. Below it there are at most two branches in short form, for example “if Kunde › Land is »USA« → $”; from the third on, “… and 1 more” follows, and with the check mark at the currency from the record additionally “otherwise → from the record”. If a branch does not fit on one line, the value (“→ …”) appears on a second line, and only the condition is shortened with …; the tooltip shows the whole branch. A still empty condition is called “(no condition yet)” there, an empty value “(empty)”. In the short form, the value appears as it is stored: for the number style as a code (de, en, fr, ch, plain), for the thousands separator as “an” or “aus”, a field as a reference in curly braces. Only the option label language appears with its name (“English”), an empty value there as “By template language”.

[Image: The window “Condition branches: Currency symbol” as a white card over the darkened designer. Under the title is a gray sentence: “If a condition is met, its value applies to the whole document. The first matching branch wins — if none matches, the fixed value applies.” Below it are two light gray boxes, one branch each. In the upper one, on the left in blue “IF” and on the right a red ✕; below it the building kit for the condition with the switch “AND | OR”, an “i” symbol and a row made of the field “Rechnung › Kunde › Land”, the comparison “is” and the value “USA”, plus the buttons “Condition” and “Subgroup”. Below that are, in blue, “THEN” and a field with “$”. The second box is built the same way, with the value “Schweiz” and “CHF”. Under the branches is the button “Condition branch”, below it a box with the blue word “ELSE” and the field “€”. At the bottom right is the blue button “Done”.]
Caption: The window “Condition branches: Currency symbol” with two branches and the fixed value under “ELSE”.
- Image marker 1: The condition of the branch, built with the building kit.
- Image marker 2: AND or OR: Must all conditions apply or only one?
- Image marker 3: The red ✕ removes the branch immediately, without asking.
- Image marker 4: The value that applies in the whole document if the condition applies.
- Image marker 5: The fixed value: It applies if no branch matches. The branches are checked from top to bottom.
- Image marker 6: Closes the window; a completely empty new branch is dropped in the process.

| In the window “Condition branches: …” | What it does |
|---|---|
| Subtitle | “If a condition is met, its value applies to the whole document. The first matching branch wins — if none matches, the fixed value applies.” With the check mark at the currency from the record, for symbol and decimal places it ends with “… the value from the record applies.” |
| “IF” | The condition of the branch, built with the building kit (see Conditions: The building kit). Unlike in the filter of a rule, there is no “123” / “ƒx” switch here; on the right there is always a fixed value. The field picker offers all fields of the data sources, fields from lists only summarized, for example as a sum, plus results of rules. If a field is chosen but no value yet, the red note “⚠ Value missing: without a value, this branch would always apply. Choose a value or remove the condition with ✕.” appears under the branch and, to the left of “Done”, “⚠ Condition incomplete: branch …”. If a field in “{{ }}” is in a condition, the note says “⚠ Typo: »{{ }}« does not belong in a condition; as written the field is not read at all. Rebuild the condition.”, to the left of “Done” “⚠ Typo in the condition: branch …”, and “Done” stays disabled. Under the condition there is then “Rebuild with the condition builder”: after a confirmation prompt the condition is empty, the value of the branch stays, and “Done” stays disabled (“⚠ Condition incomplete: branch …”) until the new condition is complete, even if you remove the chosen field again. This way a branch that applies to every document is never created silently here. Or you remove the branch with ✕ (see Conditions: Fields in “{{ }}”). |
| Gray box instead of the building kit | A condition from an imported or hand-written template that the building kit cannot show appears as an expression, with the sentence “Hand-written condition …” (see Conditions: Conditions written by hand). It cannot be changed here, only removed together with the whole branch. It is printed unchanged. |
| “✕” (red) on the right in the branch | “Remove branch”: Deletes the branch immediately, without asking, as with the variables (see Variables: Condition branches). |
| “THEN” | The value that applies if the condition applies. The input is the same as in the tab: for the symbol a text field, for the decimal places a selection button, both with the small list (see Value or field); for number style, thousands separator and option label language a list with the same entries. It can be set freely even with the check mark at the currency from the record. If “THEN” stays empty and the condition applies, the built-in default applies (€, two places, number style of the language, thousands separator as before, option labels by template language), not the fixed value. For a custom variable it is different: a branch with a condition but an empty value supplies an empty value there if it applies (see Variables: Condition branches). |
| “ELSE” | Under the branches: the fixed value of the setting, the same as in the tab and changeable here as well. With the check mark at the currency from the record, for symbol and decimal places “🔒 From the record” is fixed there. |
| “Condition branch” under the branches | Appends a new, empty branch at the bottom. |
| “Done” (blue), click next to the window, Esc key | Closes the window; the template settings below stay open. A branch created in this window that is completely empty, without condition and without value, is dropped in the process. A branch with a value but without a condition stays and always applies. Branches that were there before stay untouched. As long as a branch has a chosen field without a value, “Done” is disabled, and a click next to the window and the Esc key do not close it either: add the value, remove the condition with ✕ (then the branch explicitly always applies) or remove the branch. This way a half-built branch never silently becomes one that applies to every document. |

- The condition is checked once for the whole document, on the printed record of the primary source. The number style therefore never changes in the middle of a table, and the value of the branch applies to all amounts and numbers of the document.
- Order, rearranging and a branch without a condition behave as with the variables (see Variables: Condition branches). A faulty condition counts as “does not apply”.
- If a condition contains a sum, for example over the item amounts, or a custom variable, it is calculated with the fixed decimal places and the fixed number style of the template: which branch applies in the end is only decided afterward (see Rules: Round first, then sum).
- Every entry in the window is immediately in the template. The window has no “Cancel” of its own; you take your changes back with “Cancel” and “Discard” of the template settings. Merely opening this window can count as a change, even if you enter nothing; “Cancel” of the template settings then asks. If you have changed nothing else, “Discard” is safe in this case; nothing changes in the document.
- To close, use “Done” or a click next to the window, not the Esc key. If after the Esc key the confirmation prompt “Discard changes that were not applied and close?” appears, choose “Cancel”: with “Discard” all changes from the template settings are lost.

> **Good to know:** Custom variables may appear in these conditions; the field picker offers them. Because the number format of the template is only determined by these branches, the condition calculates a variable with the decimal places and the number style that apply without a condition branch. For a variable such as the country or the customer type, this changes nothing. If the variable itself depends on the number format, for example a sum of amounts, and would choose a different branch when printed, the branch from the calculation with the fixed values applies. The same applies if the value of a setting, fixed or in a branch, reads such a variable, for example the decimal places from a variable that calculates with a sum of amounts: the value from the calculation with the fixed values is printed. The check before full preview and PDF names both cases, and the PDF reports them as a warning (see Problems and messages: Variables and conditions).

Before every full preview and every PDF, the designer also checks these condition branches (see Full preview and PDF: What is checked before creating). If it finds something, it asks in the window “Please confirm” with the text “Something is wrong with the custom variables:”, even if it concerns the template settings; the findings and the choice between “Cancel” and “Generate anyway” are described under Variables: The check before full preview and PDF and Full preview and PDF: Confirmation prompt for rules and variables. The confirmation prompt names the template settings “Currency symbol”, “Decimal places”, “Number style” (meaning “Number style (comma/period)”), “Thousands separator” and “Option label language”. Four findings occur for these settings. The first reports a branch without a condition before other branches; only branches with a value are counted, and a branch without a condition as the last one is not reported. The second reports a condition with a custom variable that does not exist; a branch with such a condition does not apply. The third reports a condition branch that reads a custom variable whose value itself depends on the number format and that would turn out differently when printed: “In template setting »Decimal places« a condition branch reads a custom variable whose value itself depends on the number format of the template — a circle. …” The fourth reports the same for the value of a setting, fixed or in a condition branch: “In template setting »Decimal places« the value reads the custom variable »@…«, whose value itself depends on the number format of the template — a circle. …” In both cases the value from the calculation with the fixed settings is printed.

### What changes in the document?

**On the canvas:** Fields appear on the page as blue markers with their name, not with values. How a date, an amount or a number is printed is shown in advance by the blue “Example:” lines in the template settings and in the window “📅 Date format for this field”, for a custom variable also by the preview line in its window; the example line calculates condition branches in advance with the sample record. Choosing the template language changes nothing visible on the page; you see the effect in the document only in the full preview.

**In the PDF:** Every date, amount, number and Yes/No without an entry of its own appears in the format of the template, with condition branches depending on the printed record. Choice and Yes/No fields from Dynamics appear with their label in the option label language. A date field with its own pattern and a custom variable with its own settings print as set there. Which entry wins is described under “Numbers & date” tab.

---

## Image library and fonts

*For users · Template and pages · Page en/ablage-schriften.html*

> **In short:** Images and fonts do not belong to a single template. They are stored in your Dynamics environment and are available in every template there. You choose fixed images in the image library; that is also where you upload new images, and every image has a short name under which the template finds it again. You manage fonts in the “⚙ Manage fonts” window of the template settings. The font Arimo is always included and does not need to be uploaded.

### What applies to all templates

Images and fonts are not a setting of the individual template. They are stored in your Dynamics environment and apply to all templates there; the template names the short name of the image or the name of the font. Whatever you upload is therefore available in every template.

| Topic | Images | Fonts |
|---|---|---|
| What is stored in Dynamics | One entry per image in the images table, with name, short name and image file. | One entry per font family with up to four styles: regular, bold, italic and bold italic. |
| What the designer can do | Add images. Deleting and renaming are only possible in Dynamics; how to replace an image is described under Fonts and images: Uploading a logo and images. | Upload, replace, download and delete fonts, including individual styles. |
| Where to find it in the designer | In the image chooser: “Fixed image”, then “Upload new image” (see The image library). | In the template settings, “Font” tab: “⚙ Manage fonts” (see The “Manage fonts” window). |
| What is accepted | The formats that printing can read (see Images: Formats). | TTF and OTF files. |

### The image library

If you choose “Fixed image” in the image chooser, the image library opens. It carries the line “Images that look the same in every document. Type to search.” and shows all images stored in Dynamics, each with its short name. The image chooser is described under Images: Where the image comes from: the image chooser; how to insert a fixed image is described under Images: Inserting a fixed image, such as the logo.

[Image: Excerpt of a window with the heading “Image library”. Below it is the gray note “Images that look the same in every document. Type to search.” and a wide search box with a magnifying glass and the placeholder “Search images…”. Below that are three tiles in a row, each with a thumbnail on a light gray background and the short name underneath: “logo_full” (the document symbol with the lettering “Dyn365 Smart Templates”), “stamp_paid” (a slanted green stamp with the word BEZAHLT) and “symbol_dokument” (just the blue-violet document symbol). Below the tiles there is free space. At the bottom edge are two wide buttons one below the other: the bold button “Upload new image” with a small image symbol and below it “◀ Back”.]
Caption: The image library in an example with three images.
- Image marker 1: The search box: As you type, only the tiles whose short name matches remain.
- Image marker 2: A tile with thumbnail and short name, here “logo_full”. One click chooses the image and closes the window.
- Image marker 3: “Upload new image” switches to the upload form in the same window.
- Image marker 4: “◀ Back” returns to the question “Where does the image come from?”.

| Element | What it does |
|---|---|
| Tile with thumbnail and short name | The tiles are sorted by short name; the mouse pointer shows the short name as a tooltip. A click on a tile chooses the image, closes the window and inserts the fixed image. |
| “🔍 Search images…” | Filters the tiles by short name as you type. A partial word is enough, upper and lower case do not matter, and the order stays the same. If nothing matches, “No image found.” appears; if the library is empty, “No image in the library yet — upload one below.” appears. |
| Green message “… is now in the library — selected below.” (with the short name in front) | Appears only after uploading. The tile of the new image has a blue outline and is scrolled into view, but it is not inserted automatically: you choose it deliberately with a click. |
| “Upload new image” (bold button at the bottom, with image symbol) | Switches to the form in the same card; no second window opens. See Uploading a new image. |
| “◀ Back” | Returns to the question “Where does the image come from?”. |

- **Several images with the same short name:** If Dynamics has several records with the same short name, the one changed last applies, in the library as well as in printing. Printing reports this (see Problems and messages: Images and fonts).
- **Loading the tiles:** In Dynamics, the images are loaded one by one in the background after the start, or on demand. A tile that has not been loaded yet and an entry without a file show only the symbol 🖼; open the library again to see what has been loaded in the meantime.
- **Images that cannot be printed:** An image in the library that printing can never print, such as a GIF or WebP, appears as a box “not printable” (see Images: What the canvas shows).
- **Only the short name:** The library shows only the short name. You do not see the name you assign when uploading in the image chooser, but you do in the AI package window (see Working with an external AI).

> **Good to know:** In the designer you can only add images. Deleting, renaming or replacing an image is not possible here. How to do that in Dynamics, and why the logo `logo_full` is at the top of the header in every new template, is described under Fonts and images: Uploading a logo and images.

### Uploading a new image

You reach the form through the image chooser: “Fixed image”, then “Upload new image” in the library. The same form appears in the AI package window under “Add image …”. The image is then stored in the images table of Dynamics and is available in every template.

1. In the designer, open a template and click “Image” in the ribbon, or select an existing image and click “Choose image…” on the right.
   → The image chooser opens (see Images: Where the image comes from: the image chooser).
2. If the question “Where does the image come from?” appears, choose “Fixed image”. For an existing image the question does not appear: a fixed image opens the image library right away, an image from the data opens the data tree; there “◀ Back” leads to the question (see Images: Step 1: Where does the image come from?).
   → The image library opens.
3. In the image library, click “Upload new image”.
   → The form “Upload new image” replaces the library in the same card. Under the title it says “PNG, JPEG or BMP. The image is then in the library and available in every template.”
4. Choose the image file.
   → The preview box shows the image reduced in size; before that it says “No image chosen yet”. If “Name” or “Short name (in templates)” is still empty, the designer fills it in from the file name.
5. Check the name and short name and change them if necessary.
   → A red message shows what is still missing. As long as it is displayed, “Upload” stays disabled.
6. Click “Upload”.
   → For a moment it says “Uploading…”. Then the note “Image »short name« is now in the library.” appears and you are back in the library. The tile of the new image is highlighted; a click on it chooses it for the image. In the AI package window, the image is checked there instead.

#### The fields of the form

[Image: Excerpt of a window with the heading “Upload new image” and the gray note “PNG, JPEG or BMP. The image is then in the library and available in every template.” Below it is the button “Choose file” with the chosen file name “Unterschrift.png”. Below that is a light gray preview box in which the chosen image can be seen reduced in size: a signature slanting to the right in dark blue ink that shows “M. Muster”, with a flourish under the name. Two input fields follow: “Name” with the value “Unterschrift” and “Short name (in templates)” with the value “unterschrift”, below them the gray note “Lowercase letters, digits and underscore — the template finds the image again under this short name.” The line for red messages below is empty. At the bottom edge are the bold button “Upload” and the button “◀ Back to the library”.]
Caption: The upload form after a file has been chosen. The designer has suggested the name and short name from the file name.
- Image marker 1: The file chooser with the chosen file name. Its label comes from the browser and may read differently on your computer.
- Image marker 2: The preview box shows the chosen image reduced in size. Before that it says “No image chosen yet”.
- Image marker 3: Name: the readable name of the image in Dynamics. If the field is empty, the designer fills it with the file name without the extension.
- Image marker 4: Short name: the key under which templates address the image. The designer suggests it from the file name.
- Image marker 5: “Upload” creates the image in Dynamics. The button stays disabled as long as a red message is displayed.

| Setting | What it does | Default |
|---|---|---|
| File chooser (labeled by the browser) | Chooses the image file. The file dialog initially shows only PNG, JPEG and BMP; by selecting all files in the file dialog you can also choose other files, but they are rejected. The format is checked against the content of the file, not the name (see Images: Formats). A renamed WebP or GIF file is rejected. The form has no size limit; if the upload fails, the designer states the reason that Dynamics reports. A second file choice does not overwrite fields that are already filled in. | no file |
| Preview box | Display only. Shows the chosen image reduced in size. | “No image chosen yet” |
| “Name” (placeholder “Name, e.g. Account logo”) | The readable name of the image in Dynamics. It is required. It does not appear in the image chooser, but it does in the AI package window next to the short name. | the file name without the extension, spelled unchanged |
| “Short name (in templates)” (placeholder “e.g. companylogo”) | The key under which templates address the image. Below it says: “Lowercase letters, digits and underscore — the template finds the image again under this short name.” Only a to z, 0 to 9 and the underscore are allowed; spaces at the edges are ignored. The short name must still be free in the library; the short name of an entry without a file also counts as taken. There is no length limit while typing. | a suggestion from the file name, see below |
| Red message line | Names what is still missing, see The check messages. | when opened: “Please choose an image first.” |
| “Upload” (bold button) | Creates the image in Dynamics, see What happens during the upload. The button stays disabled until all entries are correct. | disabled |
| “◀ Back to the library” | Returns to the image library without uploading. In the AI package window it returns to the image list. | – |

#### How the short name is suggested

If the field is empty when you choose a file, the designer forms the short name from the file name:

- Everything becomes lowercase, and the extension is dropped.
- ä, ö, ü and ß become ae, oe, ue and ss.
- Every run of other characters becomes a single underscore; underscores at the beginning and at the end are dropped.
- The suggestion has at most 40 characters.

“Firmen Logo 2026.png” thus becomes `firmen_logo_2026`.

#### The check messages

The red line under the note applies as soon as the form opens and changes with every entry. “Upload” stays disabled as long as a message is displayed. The checks run in this order:

| Message | What is missing |
|---|---|
| “Please choose an image first.” | No file has been chosen yet. |
| “This file is not a PNG, JPEG or BMP — printing can only read these formats. Please save it as PNG or JPEG and choose it again.” | The file has another format, such as GIF, WebP or TIFF. |
| “Please enter a name.” | The field “Name” is empty. |
| “Please enter a short name.” | The field “Short name (in templates)” is empty. |
| “The short name may only contain lowercase letters, digits and underscore.” | The short name contains another character, such as an uppercase letter, a space in the middle or an umlaut. |
| “This short name already exists — please choose another one.” | An entry with this short name is already in the library, even one without a file. |

During the upload it says “Uploading…” (not red). If it fails, it says “Upload failed:” with the reason there, and “Upload” is enabled again.

#### What happens during the upload

The designer first creates an image record with name and short name in Dynamics and then uploads the file. If the second step fails, it deletes the half-created record again so that no duplicate with the same short name remains. If the deletion also fails, the reason is followed by the addition “An entry »…« without an image has been left in the library (can only be removed in Dynamics). Please choose a different short name.” Uploading requires write permissions on the images table; the designer does not check them in advance, and a lack of permissions shows up as “Upload failed” (see Rights and roles).

> **Caution:** Only what printing can read can be uploaded (see Images: Formats). Before uploading, save an image in another format, such as GIF or WebP, as PNG or JPEG; a renamed image does not help (see The fields of the form).

> **Tip:** Think about the short name before uploading: it appears in every template that uses the image and can no longer be changed in the designer (see The image library).

#### Images in the AI package and on import

In the AI package window, images of the library can be checked; the list shows name and short name. With “Add image …” you create new images there using the same form (see Working with an external AI). An imported template can bring images with it, as can a change list that you fetch with “Upload AI changes”; the designer takes these images into the library (see Managing templates: Images that come with a template). If you insert an image from the data of another template, or set the primary source of a template that already has content, the window “Assign variables” also brings along the origin of the image, that is, table and key field (see Data sources and relationships: The “Assign variables” window).

### The “Manage fonts” window

Fonts apply to all templates in your environment (see What applies to all templates). “⚙ Manage fonts” in the “Font” tab is the only way to upload fonts in the designer; the font list in the window “Edit text” also points to it (see The “Edit text” window: Size, font and line spacing). Everything you do in this window happens immediately in Dynamics, and “Discard” in the template settings does not undo it. This is how you upload a new font:

1. In the designer, open the “Template settings”, “Font” tab, and click “⚙ Manage fonts” (see Template settings: Opening, applying or discarding the window).
   → The window “Manage fonts” opens over the template settings.
2. Click “Upload new font family”.
   → The window “New font family” opens.
3. Enter the name of the family and choose one file per style: regular, bold, italic and bold italic, up to four files in one go. You do not need to have all four styles. TTF and OTF files are accepted.
   → If the name field is still empty, the first file you choose suggests a name. A line under the files says what is still missing; as long as something is missing, “Upload” stays disabled.
4. Click “Upload”.
   → If all files work, the window closes, and the designer reports how many styles have been uploaded and whether the family is now complete or what it still lacks.

The window sits in the middle over the template settings; you can drag its edges to make it larger. At the top is the note “Each row is a font family with its four styles. A check mark means: this file is stored in Dynamics. If a style is missing, text in that style is printed in the regular style — text set to italic then appears upright.” Below it follows the list, with “loading…” until it has loaded. If no font of your own has been uploaded yet, it says “No font of your own has been uploaded yet. Smart Templates then prints with Arimo.”; the supplied Arimo does not appear in the list. If the list cannot be loaded, it says in red “The font list could not be loaded: …”. Outside Dynamics, for example in a local preview, it says “Managing fonts only works in Dynamics 365 — the local preview has no font storage.”

[Image: The window “Manage fonts” with three made-up example families. At the top the title and a gray note: “Each row is a font family with its four styles. A check mark means: this file is stored in Dynamics. If a style is missing, text in that style is printed in the regular style — text set to italic then appears upright.” Below it a table with the columns “Font family”, “Regular”, “Bold”, “Italic” and “Bold italic” (in capital letters on screen) and a column without a heading. Row “Lato”: in all four columns a green check mark with two small buttons (arrow down, cross). Row “Open Sans”: check mark under “Regular” and “Bold”; under “Italic” and “Bold italic” a pale dash with an arrow up; below the name in small type “missing: italic, bold italic”. Row “Roboto Slab”: in all columns a dash with an arrow up, below the name “no file stored”. On the right in each row the buttons “Files…” and “Delete” (red). At the bottom the wide blue button “Upload new font family” and next to it “Close”.]
Caption: The window “Manage fonts” with three example families. The names are shown here in a default font; in Dynamics, each name is shown in the family’s own font as soon as its regular style is stored.
- Image marker 1: The family name; a click on it opens the window “Files for …”.
- Image marker 2: Check mark: This file is stored in Dynamics. The arrow ↓ downloads it, the ✕ removes only this style.
- Image marker 3: Dash: The style is missing. The arrow ↑ uploads it right here.
- Image marker 4: The line names the missing styles.
- Image marker 5: “Files…” uploads several styles at once; “Delete” removes the whole family after a confirmation prompt.
- Image marker 6: Creates a new family, up to four files in one go.

| Control | What it does |
|---|---|
| Column “Font family” | One row per family, sorted by name. If the regular style is stored, the name appears in its own font. Below it, in small type, “no file stored” or “missing: …” with the missing styles. A family record without a name appears as “(no name)”. A click on the name opens the window “Files for »…«”. |
| Columns “Regular”, “Bold”, “Italic”, “Bold italic” | ✓ means: This file is stored in Dynamics. — means: The style is missing. |
| “↓” next to a ✓ | Downloads the file of this style. The designer reports “»…« is being fetched…” and then “»…« downloaded.” or, in red, “Download failed: …”. |
| “✕” (red) next to a ✓ | Removes this style after the confirmation prompt “Remove style?” (“Remove »…« from the family »…«? The other styles remain.”) with “Cancel” and “Remove”. Afterward “Removing…” and “»…« removed.”. The family remains; text in this style is then shown in the regular style. If you remove the regular style itself, the rule for a missing regular style applies (see Template settings: Default font). |
| “↑” next to a — | Uploads the missing style. The browser’s file selection for TTF and OTF files opens. If the style does exist after all in the meantime, the designer asks “Replace?”; with “Cancel”, everything stays as it was (“Nothing changed.”). Afterward it reports “»…« uploaded for »…«.” and what the family still lacks, or, in red, why the file does not work. |
| “Files…” | Opens the window “Files for »…«”, in which you upload or replace several styles at once. |
| “Delete” (red) | Deletes the whole family with all styles after the confirmation prompt “Delete font family?” with “Cancel” and “Delete”. If the font is used in the open template, the prompt additionally says “⚠ This template is using it right now. It will print in Arimo afterwards.”, and after the deletion the note “The template uses »…« — from now on the canvas and the printout use Arimo.” appears. |
| “Upload new font family” (blue) | Opens the window “New font family”. Outside Dynamics the button is disabled. |
| “Close” | Closes the window, as do the Esc key and a click next to it, without a confirmation prompt. There is no ✕ here. |
| Line under the buttons | Shows what the last action resulted in, in red for an error. |

- **Missing styles:** What happens on the canvas and in print when a style or a whole font is missing, and what is reported then, is described under Template settings: Default font.
- **After every action** the designer redraws the page, and the template settings behind the window are rebuilt, so that the list “Default font” shows the new state.
- **In print**, a replaced, newly uploaded or removed style applies from the next document, according to the designer’s help; a document never changes its font in the middle of printing.

> **Caution:** The confirmation prompt when deleting checks only the open template and warns only about it. Other templates in your environment that use the same font will also print in Arimo afterward; the prompt does not warn about that. Printing, however, does warn: if a document sets the deleted font, the document reports a warning that a substitute was used (see Problems and messages: Notes and warnings). If the canvas was still built with the original font, line breaks and page breaks in the PDF can differ. If the canvas already draws Arimo, canvas and PDF match; only the desired font is missing. Still, check before deleting where the font is still needed. When you “Export” a template, the fonts do not travel with it; upload them in another environment there as well.

#### The windows “New font family” and “Files for …”

“Upload new font family” opens the window for a new family; a click on a family name or on “Files…” opens the same window for an existing family. In it you upload up to four files under one name in one go; this way a typo does not create a second family.

[Image: The window “Files for »Open Sans«”. At the top the pale, disabled field “Font family” with “Open Sans”, below it a gray note: “Choose the files for the styles you have — you do not have to provide all four. Anything you do not choose here stays unchanged.” Below that four rows: “Regular ✓”, “Bold ✓”, “Italic” and “Bold italic”. In each row is the button “Choose file…” and next to it, in gray, “TTF or OTF”. Under the rows, in gray, “Please choose at least one font file.”; at the very bottom the wide, pale (disabled) blue button “Upload” and next to it “Cancel”.]
Caption: The window “Files for …”: one file per style, ✓ after the existing ones.
- Image marker 1: The name of an existing family is not changed here.
- Image marker 2: ✓: This file is already stored in Dynamics; a new one replaces it.
- Image marker 3: One file per style; which style it is follows from the row.
- Image marker 4: Stays disabled as long as nothing is chosen.

| Control | What it does |
|---|---|
| “Font family” | The name under which the font appears in the lists (gray in the empty field: “Name of the font family, e.g. Roboto”). For a new family the field is free; if it is still empty, the first file you choose suggests a name, without additions such as Bold, Italic, Oblique, Regular or Book. Quotation marks, commas, semicolons, angle brackets and backslashes are not allowed; an apostrophe is fine. For an existing family the field is disabled: “The name of an existing family cannot be changed here — otherwise a second family with a new name would be created.” The same name in different upper and lower case hits the existing family. |
| Note | “Choose the files for the styles you have — you do not have to provide all four. Anything you do not choose here stays unchanged.” |
| Rows “Regular”, “Bold”, “Italic”, “Bold italic” with “Choose file…” | One file per style. Which style it is follows from the row, not from the file name. A ✓ after the label means: “Already stored in Dynamics — a new file replaces it.” Next to the button it says “TTF or OTF”, then “reading…”, then, in green, the file name or, in red, why the file does not work, for example “This is WOFF (web font) — printing needs TTF or OTF.”, “»…« is a collection (TTC) …”, “This is not a font file …” or “File cannot be read.” |
| Line under the files | Says what is still missing: “Please enter the name of the font family.”, the naming rule or “Please choose at least one font file.” Gray until your first entry, red afterward. As long as something is missing, “Upload” is disabled. |
| “Upload” or “Upload — 2 files” (blue) | If one of the chosen styles already exists, the designer asks “Replace?” once for all; with “Cancel”, everything stays as it was (“Nothing changed.”). Then it uploads the files one after the other (“Uploading… (1 of 2)”). An error stops the process: in the line under the files it says in red “»…« failed: …”; if files worked before, their number follows, for example “(1 successful before)”. The window then stays open. If all files work, the window closes, and the designer reports how many styles have been uploaded and whether the family is now complete or what it still lacks. |
| “Cancel” | Closes without uploading, as do the Esc key and a click next to the window. |

Only font files in the TTF and OTF formats are accepted. The designer rejects web fonts (WOFF, WOFF2) and font collections (TTC) because PDF printing cannot read them; use the TTF or OTF file of the same font. The file itself is checked, not its extension. Outside Dynamics, “Upload” reports in red “Uploading only works in Dynamics 365 — the local preview has no font storage.”

### What changes in the document?

**On the canvas:** A fixed image from the library appears with its content; if printing can never print it, the box “not printable” appears. All texts without a font of their own are drawn and measured in the chosen font; if it is not uploaded, the canvas draws Arimo and reports this.

**In the PDF:** A fixed image is looked up in the library by its short name; if it is missing or printing cannot read it, the place stays empty and keeps its space, and the document reports it. The chosen font is embedded; if it is missing, the document prints Arimo, and if only one style is missing, the regular style of the family, each with a warning. An uploaded, replaced or removed style applies from the next document.

---

## Pages, header and footer

*For users · Template and pages · Page en/seiten.html*

> **In short:** On the canvas, the sheets of your template sit one below the other. In the document there are often more: a long line-item table runs over several pages, and what is below it moves along; how is determined by the positioning behavior. What happens at the page edge is described under At the page edge. You force a new page with a page break, and you append a blank page with “Blank page”. Header and footer are groups that repeat on every page; on which pages exactly, you set on the group. If you like, a page border surrounds every page.

### Sheets on the canvas and in the document

Above each sheet of the canvas there is a label such as “Page 1 / 2”: the number of the sheet and the number of sheets on the canvas. A click on this label works like a click into empty space. The selection disappears, and on the right you see the settings of the whole document, including the page border (see The properties panel: When nothing is selected). You set the size and margins of the sheets under Template settings: “Page” tab.

[Image: Reduced canvas with two white sheets one below the other. Above the first sheet it says “Page 1 / 2”, above the second “Page 2 / 2”. At the top of each sheet there is a blue dashed area with the logo and field markers (the header) and at the bottom a narrow blue dashed area with field markers (the footer). On sheet 1 there is the invoice content with address, heading, table, totals block, a green stamp “BEZAHLT” and bank details. Below it, across the sheet, lies a strip labeled “✂ Page break · new page starts here” with a round ✕ button at the right end; below the strip, the area down to the lower end of the printed area is hatched in gray, also behind the footer. Sheet 2 carries the heading “Allgemeine Geschäftsbedingungen” and a short text. To the right of sheet 2 is the button “🗑 Remove page”, below sheet 2 in the middle the button “Add page”.]
Caption: The canvas with two sheets: a page break starts sheet 2, header and footer appear on both sheets.
- Image marker 1: The label of each sheet: number and count of the sheets on the canvas.
- Image marker 2: Header: a group that repeats on every page (blue dashed). The footer appears on every sheet in the same way.
- Image marker 3: The strip of the page break: from here a new sheet begins.
- Image marker 4: The hatched area: the sheet ends here.
- Image marker 5: “🗑 Remove page”: deletes the break that starts this sheet.
- Image marker 6: “Add page”: appends a blank sheet.

Every object directly in the document belongs to a sheet. You decide which one by dragging: if you release it on a sheet, it belongs to that sheet. How “X (mm)” and “Y (mm)” count on this sheet is described under Position, size, rotation and arrangement: Position directly in the document. If a page break has pushed an object onto the next sheet, its “Y (mm)” continues to count from the sheet on which the break is (see Page break: What it does). An object in a group belongs to the sheet of its group.

New sheets are created in three ways:

- A page break starts a new sheet.
- “Blank page” in the ribbon and “Add page” below the last sheet append a blank sheet (see Blank pages).
- The designer appends a sheet itself when an object moves to the next sheet because of the page edge or a free-form table continues there (see At the page edge).

How many pages the document really has depends on the data. The canvas shows fields as blue markers with the field name, not the values; it does not see how long a table becomes with real data. The real pages are shown only by the “Full preview” and the PDF, both with the sample record (see Full preview and PDF: The full preview).

> **Good to know:** A sheet that is already empty on the canvas, such as one from “Blank page”, is not dropped in the document; when appended blank pages appear in the PDF is described under Appending blank pages and removing pages. It is different for a sheet on which visibility rules have hidden everything: it is dropped in the document, and the canvas continues to show it (see Visibility: What happens in the PDF).

### Page break

A page break forces a new sheet at one place, for example before the general terms and conditions. It exists only directly in the document. It cannot be placed in a group or table cell; in the group designer the button is missing, and a copied break cannot be pasted there.

#### Inserting a page break

1. In the ribbon, in the section “Page”, click “Page break”.
   → Below the content of the last occupied sheet there is a strip “✂ Page break · new page starts here”. It is selected, the canvas scrolls to it, and a new sheet begins after it.
2. Drag the strip to the height at which the new page should begin.
   → While you drag, a blue dashed line shows where the break lands. It cuts exactly where you release it; what is below it begins on the next sheet.

It is quicker if you drag the button “Page break” straight from the ribbon to the desired place on the sheet (see The ribbon: Dropping by dragging). The tooltip of the button is given in The ribbon.

#### What it looks like on the canvas

[Image: Excerpt of the canvas. At the top the end of the invoice content: on the left the table “Bankverbindung” with the rows “Kontoinhaber”, “IBAN” and “Verwendungszweck” and the field markers “Firmenname”, “IBAN” and “Rechnungsnummer”, on the right the text “Mit freundlichen Grüßen” with the field marker “Firmenname”. Below it, across the whole sheet width, lies a strip with blue dashed edges and light diagonal hatching. Above the strip, on the left, is the label “✂ Page break · new page starts here”; at the right end of the strip is a round button with ✕. Below the strip begins an area hatched in gray that extends to the end of the excerpt.]
Caption: An effective page break: the strip with label and ✕, below it the area hatched in gray in which the sheet has ended.
- Image marker 1: The label: a new page begins here.
- Image marker 2: The round ✕ button removes the break.
- Image marker 3: The hatched area: below the break the sheet has ended; what you drop there appears on the next sheet.

| What you see | What it means |
|---|---|
| Strip “✂ Page break · new page starts here” across the whole sheet width, below it, down to the lower end of the printed area, an area hatched in gray (it is dropped if there is less than 2 mm of space) | The break takes effect. Below it the sheet has ended: what you drop in the hatched area appears on the next sheet. |
| Strip “✂ Page break · no effect here (no content above)”, without hatching | There is nothing above the break on this sheet yet. It does not start a new page, not in the PDF either. The tooltip explains: “This page break does not start a new page: there is no content above it on this page yet. At the very top of a page or directly below another break, a break does not create a blank page — the same in the PDF. It takes effect as soon as something is above it.” |
| “✕” in the round button at the right of the strip | Removes the break (see Selecting, moving, removing). |
| “✂ Page break” in the “Structure” | A click on the row selects the break (see Working on the canvas: The structure). |

[Image: Excerpt from the top of a sheet of the canvas. At the top the header in a blue dashed area: on the left the logo, on the right the field markers “Firmenname”, “Straße” and “PLZ Ort”, a blue line at the bottom. Below it lies a strip with a blue dashed edge and the label “✂ Page break · no effect here (no content above)” and a round ✕ button on the right. Below the strip there is no gray hatching; the content begins there: on the left the address with field markers, on the right a box with labels and field markers (“Rechnungsnummer”, “Rechnungsdatum” and more).]
Caption: A page break without content above it: the label says that it has no effect, and the gray hatching is missing.
- Image marker 1: The strip: its label gives the reason. On this sheet there is no content above the break yet.

#### What it does

- **New page:** Everything that is below the break on the sheet begins on the next sheet. The top edge of the strip becomes the start of the content there: an object that is 30 mm below the top edge of the strip is, on the new sheet, 30 mm below the start of the content, that is, below the top margin or, if there is a header there, below the header. The strip is 8 mm high; an object directly below it therefore begins on the new sheet 8 mm below the start of the content. This is how the canvas and the PDF show it. In the field “Y (mm)” such an object keeps its previous number, in the example the position of the break plus 30. If you enter a small number such as 30 there, the object moves over the break onto the sheet before.
- **Only with content above:** At the very top of a sheet or directly below another break, a break does not create a blank page.
- **Only hidden things above:** If there is only hidden content above the break on the sheet, that sheet is dropped when printing (see Visibility: What happens in the PDF). What is below the break keeps its position. The canvas does not know the data and continues to show the sheet.
- **Nothing below:** If there is nothing after the break, the sheet after it stays empty. It is printed as a blank page and counts in “Page … of …”.
- **In the PDF** nothing of the break itself appears, neither the strip nor the hatching.
- A page break has no visibility rule, no layer order and no positioning behavior.

#### Selecting, moving, removing

A click on the strip selects the break. On the right you then see the marker “Page break”, a note that summarizes the rules of this section, and “🗑 Delete block”. There are no tabs or further settings.

- **Moving:** Drag the strip up or down; it does not move sideways. As soon as you move the mouse a little, it follows, and a blue dashed line shows where it lands. The arrow keys do not move a break that is selected on its own; in a multiple selection it moves along.
- **Special case when dragging:** If you drag the break that starts a sheet onto that same sheet, it may not land at the release point. Then everything that was above the release point on this sheet moves to the sheet before, and the break sits there below it. The sheet on which you released then begins with what was below the release point.

| Way to remove | What happens | Confirmation |
|---|---|---|
| “✕” on the strip (tooltip “Remove page break”) | Removes only the break and reports “Page break removed.” What was on the next sheet only because of the break moves back. Objects that you yourself placed on the following sheet stay there, and the sheet remains. | none |
| Del key with the break selected | Like “✕”, but without a message. | none |
| “🗑 Delete block” on the right in the properties | Like the Del key, but only after the confirmation prompt “Delete this block?”. | yes |
| “🗑 Remove page” on the sheet that the break starts | Deletes the break and moves everything on this sheet back by one sheet (see Appending blank pages and removing pages). | none |

If you removed something by mistake, bring it back with Ctrl+Z (see Working on the canvas: Undo and redo).

### Appending blank pages and removing pages

You append a blank page without setting a page break. Four buttons belong to it; there is none of them in the group designer.

| Button | Where it is | What it does |
|---|---|---|
| “Blank page” | Ribbon, section “Page”, before “Page break” (see The ribbon). | Appends a blank sheet after the last sheet, and the canvas scrolls to the end. No page break is created in the process. |
| “Add page” | Below the last sheet, in the middle. | The same as “Blank page”. The tooltip names the way back: “🗑 Blank page” on the sheet. |
| “🗑 Blank page” | At the top right of every appended blank sheet; if there is enough room next to the sheet, to the right of it. Tooltip: “Remove the blank following page”. | Removes an appended blank sheet, without a confirmation prompt. It is always the last blank sheet that disappears, no matter which one you click. |
| “🗑 Remove page” | At the top right of a sheet that a page break has started, if there is enough room to the right of it. Tooltip: “Remove this page (delete the page break – content moves up)”. | Deletes the break that starts this sheet and moves everything on this sheet back by one sheet. Without a confirmation prompt. |

- **At most 200:** If there are already 200 sheets, “Blank page” and “Add page” no longer create a sheet and report: “No more blank pages can be added — blank pages are only possible up to page 200, as in the document.”
- **Filling a blank sheet:** If you place an object on an appended blank sheet, it then belongs to the content, and “🗑 Blank page” disappears there.
- **Sheets without a delete button:** Sheets that the designer appends itself because content moves over the page edge have no button; they disappear on their own when the content fits again. A blank sheet between two occupied sheets does not have one either, and it is printed. If it should not stay empty, drag the objects from the sheet after it onto it.
- **Undo:** With Ctrl+Z you bring back a removed sheet.

**In the PDF**, appended blank pages are printed, with page border and with header and footer, as far as “Show on pages” and “Exclude these pages” allow them there (see On which pages). They count in “Page … of …”. If the content alone already has more pages, no blank ones are added: the appended pages only ensure a minimum number of pages.

### Header and footer

There is no object of its own called “Header”. Header and footer are groups with the checkbox “🔁 Repeat on every page”. Such a group sits at the same place on every sheet and does not take part in the flow of the remaining content. Whether it is a header, a footer or a free-standing area, such as a margin note, results from its position alone (see Header, footer or free-standing). You edit the content as with any group by double-clicking (see Groups: Editing the content).

A new template comes with three groups: a header and a footer that repeat on every page, and between them an ordinary group with the text “Group”. The content and dimensions of these groups are given in Creating a new template: What is on the sheet afterward. How “Page … of …” gets into the footer is described under Page numbers.

Older templates with their own header and footer are converted into such groups by the designer when it opens them. Their settings, including the page rules, are kept.

#### Building your own header or footer

1. Create a group with “Group” in the ribbon (see Groups: Creating a group).
2. On the right, in the “Position & size” tab, in the section “Behavior”, check the box “🔁 Repeat on every page”.
   → At the top of the properties, next to the marker “Group”, it now says “repeats on every page”. The group appears on every sheet, with a blue dashed outline when guides are turned on, and in the “Structure” it appears at the very top as “🔁 Group”.
3. Under “Position”, use “X (mm)” and “Y (mm)” to set where it appears on every page. For a header, set Y to 0. For a footer, its bottom edge should lie at the lower end of the printed area: Y is then the height of the printed area minus the height of the group. For A4 with top and bottom margins of 18 mm each and a 12 mm high footer, that is 297 − 18 − 18 − 12 = 249 mm.
   → A header pushes the remaining content of every sheet below it, a footer lets it end above it.
4. Double-click the group and insert its content, such as a logo, a line or the page number.

The checkbox appears only for groups directly in the document, also in the group designer of such a group. A group in a group cannot repeat, and a repeated group can be neither dragged nor pasted into another group (see Selecting, moving, copying).

#### The settings field by field

With the checkbox, the window “Properties” of the group changes. Everything that is not listed here applies as for any group (see Groups: Settings of the group).

[Image: Excerpt of the right column “Properties” with the header selected, “Position & size” tab. At the top the blue marker “Group” with the addition “repeats on every page”. Section “Arrangement” with “Layer order” 0 and four buttons. Section “Position” with “X (mm)” 0 and “Y (mm)” 0. Section “Size & spacing” with the unchecked “Automatic height (fit to content)”, “Width (mm) — empty = full width” 175, “Height (mm)” 24 and an empty “Spacing between objects (mm)”. Section “Behavior” with the sentence that “Keep together at page break” does not exist here, the checked field with the symbol “Repeat on every page”, two gray notes (“Fixed position on every page (X/Y above) – this is how you build header/footer, but also freely placed repeating areas.” and “Content always flows below / around this area (like a page break) — never over it.”), the selection list “Show on pages” with the entry “All pages”, the empty text field “Exclude these pages” with the placeholder “e.g. 1, 3-5” and an explanatory gray sentence. At the very bottom the section “Actions” with the button “Delete block”.]
Caption: The settings of a header: with the checkbox “Repeat on every page” the page rules are added.
- Image marker 1: The marker shows: this group repeats on every page.
- Image marker 2: X and Y: position from the corner of the printed area, the same on every sheet.
- Image marker 3: The checkbox “Repeat on every page” turns the group into a header or footer.
- Image marker 4: Two gray notes: fixed position on every page, the remaining content flows below.
- Image marker 5: “Show on pages”: seven options.
- Image marker 6: “Exclude these pages”: individual pages without the group, such as “1, 3-5”.

| Setting | What it does | Default |
|---|---|---|
| “🔁 Repeat on every page” (“Position & size” tab, section “Behavior”, without ⓘ) | Turns the group into a header or footer or into a free-standing area. If you clear the checkbox, it becomes an ordinary group again; “Show on pages” and “Exclude these pages” stay saved in the template, but no longer take effect. | off |
| Two gray notes below the checkbox | “Fixed position on every page (X/Y above) – this is how you build header/footer, but also freely placed repeating areas.” and “Content always flows below / around this area (like a page break) — never over it.” This applies to flowing objects; an object with “Fixed position” may lie over the area (see Positioning behavior: Fixed position). | — |
| “X (mm)”, “Y (mm)” (section “Position”) | Position from the top left corner of the printed area, the same on every sheet; for the fields see Position, size, rotation and arrangement: Position directly in the document. If you check the box, the Y number stays, but now counts from the top edge of the printed area instead of from the start of the content below a header. Depending on its position it is then a header, a footer or a free-standing area (see Header, footer or free-standing). A group in the middle of the sheet becomes a free-standing area this way. | the previous position |
| “Arrangement” with “Layer order” | The positioning behavior is dropped, with “Move along” and “Minimum gap above (mm)”: the group stays fixed. The arrangement remains; without its own order, header and footer lie on top (see Position, size, rotation and arrangement: The layer order). | empty (0) |
| Instead of “Keep together at page break” | The checkbox is missing; a gray note gives the reason: an object that appears on every page is never split (see At the page edge: The note instead of the checkbox). | — |
| “Show on pages” (ⓘ) | On which pages the group is drawn (see On which pages). | “All pages” |
| “Exclude these pages” (ⓘ) | Individual pages without the group (see On which pages). | empty |
| “Automatic height (fit to content)”, “Width (mm) — empty = full width”, “Height (mm)” | As for any group (see Position, size, rotation and arrangement: Width and height for each type of object). The height determines how much space the group keeps free on every page; a group whose height comes out as 0 in print keeps none free. A fixed height cuts off what does not fit in (see Position, size, rotation and arrangement: The fixed bottom edge and where the PDF cuts off). | as for any group |
| “Background”, “Turn on border”, “Corner radius (mm)” | As for any group (see Border, background and colors: Border and background). | as for any group |
| Visibility (“General” tab) | As for any object (see Visibility). Difference: if the rule does not apply, the group is missing on all pages and does not keep any space free either. | always visible |

#### Header, footer or free-standing

What a repeated group is, is decided by its position in the printed area:

| Position | The group is | The remaining content |
|---|---|---|
| “Y (mm)” at most 0.5 mm | a header, docked at the top | begins below it on every sheet on which it appears |
| Bottom edge at most 0.5 mm above the lower end of the printed area or lower | a footer, docked at the bottom | ends above it on every sheet on which it appears |
| in between | a free-standing area, such as a margin note | continues below the area if it would otherwise run into it. This applies across the whole width, also to objects that would stand next to it, and to the rows of a table. |

- **Always space:** Every repeated group with a height keeps its space free; there is no setting for that. Where it does not appear because of “Show on pages” or “Exclude these pages”, its space becomes free, with one exception (see On which pages).
- **On the canvas**, header and footer keep their space free by the same rules as in print: the content of every sheet begins below the header. If you drag a header lower, the content moves along. The canvas does not make way for free-standing areas, however. Only the rows of a free-form table directly on the sheet already leave a gap there on the canvas (see Free-form tables: Beyond the end of the page). How the other objects make way for such an area is shown only by the “Full preview”.
- **Fixed position:** An object with “Fixed position” is also printed where a header or footer is (see Positioning behavior: Fixed position). If you drag a flowing object onto a header or footer or type a Y there, the designer places it above or below it (see Position, size, rotation and arrangement: Position directly in the document).
- **In the page margin:** Header and footer may extend into the page margin and are printed there. What extends beyond the paper edge is missing from the PDF, and the document reports it.
- **The footer moves along:** A footer with an entered height that ends exactly at the lower end of the printed area moves along when you change, for example, the sheet height or the top or bottom margin in the template settings. Exactly when is described under Template settings: The footer moves along.

#### Selecting, moving, copying

- **Selecting:** On any sheet, click a free spot of the group, or click “🔁 Group” in the “Structure”. Repeated groups appear at the very top there (see Working on the canvas: The structure).
- **Moving:** Drag the group on any sheet; the new position applies on all of them. It stays horizontally within the printed area and does not go beyond its top edge. Snap lines show the edges of the neighbors (see Working on the canvas: Moving, snapping, hooking in and out). A docked header or footer does not detach from its edge just because a neighboring edge is nearby; even with the grid turned on, it snaps to the edge first.
- **Arrow keys:** as with any object (see Working on the canvas: Keys for the selected object). The group stays horizontally within the printed area, and Y does not go below 0.
- **Size:** with the handles on the right, bottom, bottom right and left, as with any group (see Groups: Moving, size, deleting).
- **Not into a group:** Over the middle of another group, the mouse pointer shows that dropping there does not work. If you release anyway, the designer warns: “Repeating groups (»on every page«) cannot be placed inside another group – they stay a level of their own above the content.” The new position on the sheet is kept.
- **Multiple selection:** If you drag several selected objects together with the mouse, headers and footers stay where they are; the message for this is described under Working on the canvas: Aligning, distributing, copying, deleting. With the arrow keys, however, they move along; remove them from the selection beforehand with Ctrl+click.
- **Copying:** With Ctrl+C and Ctrl+V or with Ctrl+D you create a copy, offset by 5 mm to the right and down. A copied header is thus at X 5 and Y 5. It is a free-standing area, and without a width of its own it extends 5 mm beyond the printed area on the right. If it should be a header again, set “X (mm)” and “Y (mm)” to 0. For a copied footer, set “X (mm)” to 0 and Y as described under Building your own header or footer. The copy cannot be pasted into a group or cell; the message for this is described under Working on the canvas: Copying and pasting.
- **Deleting:** like any group, with “🗑 Delete block” after a confirmation prompt or with the Del key without a confirmation prompt (see Working on the canvas: Copying, pasting and deleting).

#### On which pages

Below the checkbox “🔁 Repeat on every page” there are two settings. Both apply at the same time: the group is drawn only on pages that “Show on pages” allows and that are not listed under “Exclude these pages”.

**“Show on pages”** is a list with seven options:

| Option | Drawn on | Space on the other pages |
|---|---|---|
| “All pages” (default) | every page | — |
| “First page only” | page 1 | free for the content |
| “All except the first page” | page 2 and following | free for the content |
| “Last page only” | the last page | stays free on every page |
| “All except the last page” | all pages except the last | stays free on the last page too |
| “Even pages only” | page 2, 4, 6 … | free for the content |
| “Odd pages only” | page 1, 3, 5 … | free for the content |

> **Good to know:** With “Last page only” and “All except the last page”, the space of the area stays free on every page, even where it is not drawn. This is intentional: which page is the last is only known once everything has been laid out. If the space were calculated differently beforehand, the text would shift and with it the page number.

A typical case is a large letterhead on the first page only and a slim header for the following pages:

1. Build the large letterhead as a repeated group at Y 0 and set “Show on pages” to “First page only”.
2. Build the slim header as a second repeated group, also at Y 0, and set it to “All except the first page”.
   → The two headers take turns. On page 1 the content begins below the large letterhead, from page 2 on below the slim one.

[Image: Reduced canvas with two white sheets one below the other, labeled “Page 1 / 2” and “Page 2 / 2”. Sheet 1 carries the large letterhead at the top: the logo on the left and field markers on the right in a blue dashed area above a blue line, below it the invoice content; the footer at the bottom. Sheet 2 carries only a slim blue dashed header at the top with the text “Rechnung” and the field marker “Rechnungsnummer” above a blue line; below it begins the heading “Allgemeine Geschäftsbedingungen”, and the same footer is at the bottom.]
Caption: Two headers take turns: the large letterhead on page 1 only, the slim header from page 2 on.
- Image marker 1: The large letterhead: “Show on pages” is set to “First page only”.
- Image marker 2: The slim header: “Show on pages” is set to “All except the first page”.

What such a letterhead does at the page edge is described under At the page edge: When the first object moves or is split after all.

**“Exclude these pages”** is a text field with ⓘ and the placeholder “e.g. 1, 3-5”. A gray sentence below it explains the notation: page numbers or ranges on which the group is not drawn, separated by a comma, semicolon or space. Enter the pages on which the group should be missing. The entry is accepted when you leave the field or press the Enter key.

- **Notation:** individual page numbers such as “1” and ranges such as “2-5”, without spaces around the dash: the field reads “2 - 5” as page 2 and page 5, and a red line below the field reports the dash; on pages 3 and 4 the group then continues to appear. “0” is not a page number. Swapped limits such as “5-2” count as 2 to 5. You can separate with a comma, semicolon or space; “2, 4”, “2; 4” and “2 4” mean the same. An empty field excludes nothing.
- **Always from the front:** Counting starts at page 1. “-1” for the last page does not work here; for that there is “All except the last page”.
- **Check while typing:** Whatever is not a page number is skipped, and a red line below the field says so while you type, such as “The page exclusion »2a« contains »2a« — that is not a page number and is ignored. Page numbers counted from the start, separated by a comma, semicolon or space, e.g. »1, 3-5«.” For a negative number it says: “… counting from the end (negative numbers) does not work here — this part is ignored. Use page numbers counted from the start, or »Show on pages → All except the last page« above.” The generated document also reports such a part.
- **Space:** On excluded pages, the space of the area becomes free, and the content may flow into it.
- **Older templates** may have “-1” saved. It continues to take effect, on the canvas as in the PDF. The field then stays empty, and a gray line below it names the old entry: “ℹ This template currently excludes »-1« — counted from the end …”. If you enter something, it replaces the old entry, and the designer warns: “The previous entry »-1« counted from the end (− 1 = last page). This field can no longer do that - you get the same effect above with »Show on pages → All except the last page«.”

**On the canvas** the group appears only on the sheets that both settings allow. The calculation uses the sheets of the canvas: a footer set to “Last page only” appears on the canvas on the last sheet, in the PDF on the last real page.

### Page numbers

The page numbers are in the area “Data” under “System variables”: “Current page” and “Total pages”. The system variables appear there as soon as a primary source is set (see Data sources and relationships: The primary source). Drag them into a text, or insert them in the window “Edit text” from the list of variables (see The “Edit text” window: Inserting fields). A typical use is “Page … of …” in the footer.

- **On the canvas** they appear as the markers “Page #” and “Pages ∑”. The numbers are filled in only by the “Full preview” and the PDF.
- **Where they work:** in any text, also in table cells, column headers and extra rows. A column header that is repeated on every page shows the number of its page each time.
- **Where they do not:** In conditions, rules and visibility rules they are not available to choose, because the page number only arises once everything else has been settled. In a custom variable they work only for the type Text; number, currency and date variables do not offer them (see Variables: System variables).
- **Which number:** What is split across two pages, such as a table row or a group together with a table, shows the page on which it begins. If an object moves as a whole to the next sheet at a page change, the number in it shows the new sheet, for whatever reason: because it is kept together, because not even its first row fits into the rest, because less than 6 mm remain free there, or because otherwise a sheet would carry fewer rows than set under “Minimum lines when text is split” (see At the page edge: Minimum lines when text is split).

If a header or footer contains page numbers, the program re-measures it with the real numbers. If it becomes taller as a result, for example because “Page 10 of 12” wraps in a narrow field, it lays out the document once more with the larger space; the content then begins correspondingly lower on all pages. A footer at the bottom edge, in contrast, grows downward into the page margin, with a note. If the group has a fixed height, its edge cuts off the overhang (see Position, size, rotation and arrangement: The fixed bottom edge and where the PDF cuts off). If the page count changes when laying out again and even the larger space is not enough, the document reports a warning: the area then overprints the content below it.

> **Tip:** Make the text box with the page number wide enough for two-digit numbers. Then “Page 10 of 12” does not wrap, and header and footer keep their height.

### Page border

A page border is a border around every page, at a fixed distance from the page edge. It applies to the whole template. You find it when nothing is selected: on the right under “Properties”, below the button “⚙ Template settings”, in the section “Page border”. The ⓘ at the heading explains the whole section. In the group designer the section does not exist.

[Image: Excerpt of the right column “Properties” when nothing is selected. At the top the note “Nothing selected. Click an object to edit it — or open the template settings (page size & margins).” and the wide blue button “⚙ Template settings”. Below it the section “Page border” with an ⓘ: the checked item “Draw a border around every page”, the “Border color” (blue, #2B4CC4), “Thickness (pt)” 1.5, “Distance from page edge (mm)” 8 and a gray sentence “The border sits on every page at the given distance from the page edge – regardless of the page margins.” Then follow the checked item “Different first page” with ⓘ, below it, indented behind a vertical gray line, the unchecked item “Draw a border on the first page”, and finally the unchecked item “Different last page” with ⓘ.]
Caption: The section “Page border” in the area “Properties” when nothing is selected. Here with “Different first page” without a border (cover page).
- Image marker 1: The checkbox “Draw a border around every page” turns the border on for the whole template; only then do the fields below appear.
- Image marker 2: “Distance from page edge (mm)”: measured from the paper edge, not from the page margins.
- Image marker 3: “Different first page”: a rule of its own for page 1, checked here.
- Image marker 4: Without the checkbox “Draw a border on the first page”, the first page gets no border.
- Image marker 5: “Different last page”: the same for the last page, not checked here.

| Setting | What it does | Default |
|---|---|---|
| “Draw a border around every page” | Turns the border on. Only with the checkbox do the fields below appear. If you clear it, all settings stay saved and apply again as soon as you check it again. Without the checkbox there is no border anywhere, not even on a different first or last page. | off |
| “Border color” | The color of the border, also from a color variable via “ƒ Variable …” (see Border, background and colors: Color field and color picker). If the variable yields no color, the PDF prints no border (see Border, background and colors: Color from a variable). An empty field, in contrast, counts as dark gray, although it shows the placeholder “none”; the same applies to “No color” in the color picker (see Border, background and colors: Empty color field). If there should be no border, clear the checkbox “Draw a border around every page” or set “Thickness (pt)” to 0. | dark gray (#333333) |
| “Thickness (pt)” | The line thickness in points; how 1 pt is converted to millimeters and what an empty field means is described under Border, background and colors: What the fields do. Steps of 0.5; less than 0 is not possible. 0 means: no border. The same applies to the field “Thickness (pt)” of a different first or last page (see Different first and last page). If such a page has a thickness of its own above 0 there, it keeps its border even if 0 is entered here. | 1 |
| “Distance from page edge (mm)” (ⓘ) | How far the border moves inward from the page edge, not from the page margins. Steps of 0.5 mm; an empty field counts as 0. A negative number pushes the border outward over the page edge; it is then only partly visible or not visible at all. | 0 |
| “Different first page” (ⓘ) | Its own border or no border on page 1 (see Different first and last page). | off |
| “Different last page” (ⓘ) | Its own border or no border on the last page (see Different first and last page). | off |

Below the three fields a sentence reminds you: “The border sits on every page at the given distance from the page edge – regardless of the page margins.” The border takes over the defaults when you check the box for the first time.

The stroke lies centered on the border line, half inside and half outside (see Border, background and colors: Where the line sits). With a distance of 0, the outer half falls over the page edge and cannot be seen on paper or in the PDF: of a border of 5 pt, 0.88 mm then remain visible instead of 1.76 mm. If you want to see the full thickness, choose a distance of at least half the thickness.

> **Tip:** Many printers cannot print right up to the page edge. With a distance of 5 to 10 mm you are on the safe side; at 0 the border may be lost completely or partly, depending on the device.

#### Different first and last page

The two checkboxes “Different first page” and “Different last page” appear only when “Draw a border around every page” is checked. If you check one of them, the following appear indented below it:

| Setting | What it does | Default |
|---|---|---|
| “Draw a border on the first page” or “Draw a border on the last page” | Without the checkbox this page gets no border, the others do. The three fields below appear only with the checkbox. | on |
| “Border color”, “Thickness (pt)”, “Distance from page edge (mm)” | The same fields as above, for this page only. | the general values |

- When you check it for the first time, the exception takes over the general values. Checking it alone therefore does not change the document; only a change below it takes effect. Later changes to the general values are not taken over by the exception.
- If you clear the checkbox again, the values of the exception stay saved.
- Which page is the last is decided only when the document is generated: with more data the document becomes longer, and the rule moves along. On the canvas it applies to the last sheet.
- If the document has only one page, it is both the first and the last. If both checkboxes are checked, the rule of the first page applies. If only “Different last page” is checked, its setting also applies to this single page.

You get a cover page without a border like this:

1. Click a free spot so that nothing is selected, and on the right, under “Page border”, check the box “Draw a border around every page”.
2. Check the box “Different first page”.
3. Below it, clear the checkbox “Draw a border on the first page”.
   → The first sheet no longer has a border, all the others keep it.

[Image: Reduced canvas with two white sheets one below the other, labeled “Page 1 / 2” and “Page 2 / 2”. Sheet 1 carries the invoice content with header and footer, but no border. Sheet 2 carries the heading “Allgemeine Geschäftsbedingungen” with header and footer and is surrounded by a continuous blue border that runs at some distance from the page edge.]
Caption: Cover page without a border: sheet 1 stays free, sheet 2 carries the page border.
- Image marker 1: The first sheet has no border.
- Image marker 2: The page border on sheet 2, at a fixed distance from the page edge.

**On the canvas** every sheet carries its border. What extends beyond the page edge is cut off by the sheet, like the paper in the PDF. **In the PDF** the border lies under the content on every page: objects that touch it lie on top.

### What changes in the document?

**On the canvas:** As many sheets as you have designed and appended, each with the label “Page 1 / 2”. Headers and footers appear on the sheets that their settings allow, with a blue dashed outline that belongs to the guides (see Working on the canvas: Grid, snap lines and guides); page numbers appear as markers, a page break as a hatched strip. How objects make way for long data, you see only in part, and visibility rules have no effect here (see Visibility: What changes in the document?).

**In the PDF:** As many pages as the data needs; appended blank pages set a minimum number, and sheets on which there were only hidden things are dropped (see Visibility: What happens in the PDF). Header and footer appear on the chosen pages and keep their space free, page numbers are filled in, and the page border is printed; break strips, hatching and outlines do not appear. Every object follows its positioning behavior and the rules at the page edge.

---

## E-invoice: ZUGFeRD and XRechnung

*For users · Template and pages · Page en/e-rechnung.html*

> **In short:** An e-invoice is the document as a file in a standardized format: an XML file with the invoice data that your customer’s software reads in by itself. Smart Templates produces it according to **ZUGFeRD 2.5.2 (EXTENDED)**, in which case the XML is embedded in a PDF, or according to **XRechnung 3.0**, in which case only the XML is produced. You turn on the e-invoice in the template settings, in the “E-invoice” tab, and assign a field, a variable or a fixed value to each entry of the e-invoice; if the value should differ depending on the document, for example for a credit note, the entry gets an if-then. An AI can fill in the assignment for you. Smart Templates calculates nothing itself in the process: totals and taxes come from your template. If a mandatory entry is missing or the amounts do not add up, no document is created, but a message that says what is missing and who fixes it. Button, email and flow deliver what the template specifies.

### What is produced

Whether and how an e-invoice is produced is specified in the template. The sheet itself does not change as a result: the e-invoice has no object on the sheet (see What changes in the document?).

| Standard | What is produced | For whom |
|---|---|---|
| “ZUGFeRD 2.5.2 (EXTENDED)” | A PDF in which the XML is embedded (PDF/A-3), or the XML only. The customer reads the PDF, their software reads the data. The EXTENDED profile contains all entries of the European standard and many additions, such as sub-items, further parties and down payments. | Invoices that the recipient should receive both as a readable PDF and as data. |
| “XRechnung 3.0” | Only the XML file, with the recipient’s Leitweg-ID. | Invoices to German public authorities and public-sector clients. |

This is how you proceed:

1. Turn on the e-invoice and choose the standard and the output (see Turning on and “Only if …”, The standard and The output).
2. Assign something to every mandatory entry, yourself or with an AI (see Assigning entries, Lists and Assigning with AI).
3. Check with a sample record whether an e-invoice would be produced with its data (see Checking with a sample record).
4. Save the template. After that, button, email and flow deliver the e-invoice (see Button, email and flow).

> **Good to know:** Which standard applies to your customers is a tax question. Smart Templates gives no legal or tax advice; the statements on this page describe what the program does.

### Turning on and “Only if …”

Open the template settings and click the “E-invoice” tab (see Template settings: “E-invoice” tab). At the very top is the box “The AI can fill in the assignment for you” (see Assigning with AI). Below it are the sections “E-invoice” with the switch and the assignment, “Standard”, “Output” and “Only if …”, and at the end the explanation of the standard.

[Image: The window “Template settings” with the button “Close” at the top right and the active “E-invoice” tab (underlined in blue) in the tab bar “Page”, “Font”, “Numbers & date”, “E-invoice” and “Data”. At the very top a gray box “The AI can fill in the assignment for you” with an ⓘ and the sentence “It knows the entries of the standard and the fields of your template. Afterwards you see the result in the assignment window and check it with a sample record.”, below it the white button “Download AI package” and a line with four steps: “Switch on” and “Choose standard” with a gray check mark, “3 Assign entries, yourself or with the AI (1 of 14)” outlined in blue and “4 Check with sample record”. In the section “E-INVOICE” there is the checked box “This template creates an e-invoice”, below it a progress bar with “1 of 14 mandatory entries assigned” and an ⓘ, the blue button “Assign entries …” and the button “Check with sample record”. The section “STANDARD” shows the selection “ZUGFeRD 2.5.2 (EXTENDED)” and on the right the button “Manage standards …”, below it in gray “Version 2.5.2 · valid from 01.09.2026 · ” with a lock and “supplied, cannot be changed”. At the bottom, cut off, the section “OUTPUT”, in the footer “Cancel” and the blue button “Apply”.]
Caption: The “E-invoice” tab right after turning it on, upper part.
- Image marker 1: The box “The AI can fill in the assignment for you” with the buttons for the AI and the steps up to the finished e-invoice (see Assigning with AI). Outside Dynamics, only “Download AI package” appears there.
- Image marker 2: The checkbox turns the e-invoice on. Turning it off keeps all assignments; the template then prints as before.
- Image marker 3: The bar counts the mandatory entries that already have something assigned.
- Image marker 4: “Assign entries …” opens the assignment window (see Assigning entries).
- Image marker 5: “Check with sample record” opens the window straight with the check (see Checking with a sample record).
- Image marker 6: The selection of the standard.
- Image marker 7: “Manage standards …” opens the list of standards (see Own standards).
- Image marker 8: Version and origin of the chosen standard.

When you turn it on for the first time, Smart Templates chooses “ZUGFeRD 2.5.2 (EXTENDED)” with the output “PDF with embedded e-invoice” and enters the entries that the standard itself specifies; for ZUGFeRD, that is the invoice type “Invoice” (yellow until you assign a choice field; see The invoice type). If you switch to XRechnung, its specifications are added, such as the business process and the payment type. Everything you set in the tab and in the windows behind it first applies in the open template; it is stored in Dynamics with “Save”.

#### “Only if …”

The e-invoice is produced only for documents to which the condition applies. If it does not apply, the document is produced as before, without an e-invoice and without a message. “Check with sample record” tells you for the sample record. You build the condition like any other: field, comparison, value, linked with AND or OR (see Conditions). Without a condition, the e-invoice is produced for every document.

[Image: The window “Only if … — e-invoice for this document” with a cross at the top right. Below the title is a gray explanatory text saying that the e-invoice is produced when the condition applies, otherwise the document as before without an e-invoice, and that it is best to name the exceptions. Below it the condition builder with the buttons “AND” (active) and “OR” and an ⓘ. A condition consists of the field “Rechnung › Rechnungstyp”, the switch “by option value” (active) and “by text”, the selection “is not” and the value “Mahnung · 100000004”. Below it “Condition” and “Subgroup”. At the bottom left “Without condition (always)”, at the bottom right “Cancel” and the blue button “Apply”.]
Caption: The window for “Only if …”. It is the same condition builder as for the visibility rule.

> **Tip:** Name the exceptions, not the cases with an e-invoice, such as “Rechnungstyp is not Mahnung”. If a new invoice type is added later, it then gets its e-invoice or a message saying what is missing, and does not go out silently without an e-invoice.

The same “Only if …” exists on a list (except for the line items) and on a fixed entry (see Lists). There it decides whether the rows or the entry are included.

If “wenn” is misspelled in the template, such as “Wenn” or “when” (from a hand-edited file or a change by the AI), the e-invoice would apply to every document that way. That is why this is an error: no e-invoice is produced until it is corrected, and under “Only if …” it says in red “⚠ The template contains »Wenn« instead of »wenn« — as written the e-invoice would apply to every document. Until this is corrected, no e-invoice is created.” with the button “Use as condition”. If “Wenn” is additionally next to a “wenn” with a condition, the note reads “⚠ The template contains »Wenn« in addition to »wenn«. Until it is removed, no e-invoice is created.”, and the button reads “Remove”; the condition in “wenn” stays. If there is something else at the top of the e-invoice that Smart Templates does not know, a red note below the switch says so, likewise with “Remove” (see Problems and messages: E-invoice).

The same applies on a list and on a fixed entry. If it says “Wenn” instead of “wenn” there, no condition applies as written: the rows of the rule would come with every document, a fixed entry would be present on every document. No e-invoice is produced until it is corrected. In the assignment window it then says in red “⚠ The template contains »Wenn« instead of »wenn« — as written the entry would be present on every document. …” (on a list with a rule “… as written the rows of the rule would be present on every document. …”; on a list without a rule a condition has no effect at all, there it says “… on a list a condition only applies to the rows of a rule, and this list has none. …”), on a list at the top in the box “Where do the entries come from?”, on a fixed entry below its row and in the window of the entry under “Only if …”. “Use as condition” turns it into the condition; for the line items (there is no “Only if …” on the rule there) and on a list without a rule the button reads “Remove”. If “Wenn” is additionally next to a “wenn” with a condition, the note at all three places reads “⚠ The template contains »Wenn« in addition to »wenn«. Until it is removed, no e-invoice is created.”, likewise with “Remove”; the condition in “wenn” stays. Anything else that Smart Templates does not know on a list or an entry is named by a red note such as “⚠ The entry contains something that Smart Templates does not know: »notiz«. …”, likewise with “Remove”. Nothing is changed until you click; whatever you do not click stays in the template. In the window of the entry, the click takes effect only with its “Apply”, and “Cancel” in the assignment window undoes everything. In the result of the check, “to the entry ›” on this message leads to the list, and on the left the error counts at the section of the list. The designer already rejects a file or an answer from the AI with such a key when it is opened; you then correct the key in the file (see Problems and messages: E-invoice).

A condition is always a text. If “wenn” instead holds `false`, `true` or a number without quotes, an object or a list (from a hand-edited file or a change by the AI), this is likewise an error: no e-invoice is produced until it is corrected. At the top under “Only if …”, on a list and on a fixed entry it then says in red “⚠ The condition in the template is not a text but false without quotes. It cannot be evaluated like this; until it is corrected or removed, no e-invoice is created.” with the button “Remove”. After that it always applies; you create a new condition with “Set condition …”. Below it, the row continues to show what is in the template, such as “ONLY IF false”. If you choose “Change condition …” there, the same red sentence also appears in the window; “Apply” changes nothing until you have built a condition.

### The standard

The standard determines how the e-invoice is structured. The selection in the section “Standard” lists the supplied standards first, then your own.

| Name in the selection | Version | Valid from | Output |
|---|---|---|---|
| “XRechnung 3.0” | 3.0.2 | February 1, 2024 | e-invoice only (XML) |
| “ZUGFeRD 2.5.2 (EXTENDED)” | 2.5.2 | September 1, 2026 | PDF with embedded e-invoice or e-invoice only (XML) |

- **Supplied** means: the standard is built into Smart Templates and cannot be changed. The lock in the box “Origin” shows it. New versions come with an update.
- **Own standards** are uploaded under “Manage standards …” (see Own standards). They permanently carry the note “Own standard – not checked by Smart Templates”.
- **When you change the standard**, the assignments stay as far as the entries also exist in the new standard. If some do not exist there, a confirmation prompt names them before they are removed: “The standard »…« does not have 3 of the previous assignments (…). They are removed when changing.” With “Cancel” everything stays as it was. The output follows the default of the new standard.
- **If the standard is missing in this environment**, for example one of your own after an export, it says in red below the selection: “The standard »…« does not exist in this environment – please upload it. Until then no e-invoice is created.”
- **New versions.** The template remembers the standard and its version. If a newer version of the same standard expressly names the remembered one as its predecessor and the day from which it applies has been reached, the template works with the newer one by itself, without you changing anything. A version that does not report itself as a successor is never taken silently; then you switch the template to the new version yourself (see When you change the standard). If the validity of the version in use has expired, the e-invoice is still produced; the check mentions it as a note and asks you to switch to a newer version.

### The output

The section “Output” determines what comes out when the document is generated.

| Choice | What comes out | When possible |
|---|---|---|
| “PDF with embedded e-invoice” | A PDF/A-3 document in which the XML is embedded as the attachment `factur-x.xml`. The customer reads the PDF, their software reads the data. | only with ZUGFeRD |
| “e-invoice only (XML)” | The XML file alone. With XRechnung this is fixed: an XRechnung is handed over as an XML file; no recipient reads it as an e-invoice in a PDF. | with both standards |
| “additionally a PDF for reading” | The reading copy: the PDF as the template prints it, without embedded data, for reading and filing. It is produced only if the e-invoice is produced too. | only with “e-invoice only (XML)” |

[Image: The lower part of the “E-invoice” tab in the window “Template settings”, scrolled down. At the top, still the bar “1 of 14 mandatory entries assigned” with “Assign entries …” and “Check with sample record”, then the section “STANDARD” with “ZUGFeRD 2.5.2 (EXTENDED)”, “Manage standards …” and the gray line “Version 2.5.2 · valid from 01.09.2026 · supplied, cannot be changed”. The section “OUTPUT” shows the selection buttons “PDF with embedded e-invoice” (chosen) and “e-invoice only (XML)”, below them the grayed-out box “additionally a PDF for reading” with an ⓘ and the addition “(only with »e-invoice only«)” and the sentence “Button, e-mail and flow deliver what is set here.”. The section “ONLY IF …” shows the marker “for every document” and the button “Set condition …”. At the end, without a box of its own, “STANDARD EN 16931” with the explanatory text. In the footer “Cancel” and “Apply”.]
Caption: Standard, output, “Only if …” and standard EN 16931 in the lower part of the tab.
- Image marker 1: The output. The second choice, XML only, exists with every standard.
- Image marker 2: The reading copy. The checkbox is available only with “e-invoice only (XML)”.
- Image marker 3: “Only if …”: the condition under which the e-invoice is produced. None is set here: for every document (see “Only if …”).
- Image marker 4: The explanation of the standard (see The standard EN 16931).

With XRechnung, “e-invoice only (XML)” is the only choice and carries the note “fixed”.

[Image: The sections “STANDARD” and “OUTPUT” in the “E-invoice” tab of an XRechnung. Under “STANDARD” the selection “XRechnung 3.0” with “Manage standards …” and in gray “Version 3.0.2 · valid from 01.02.2024 · supplied, cannot be changed”. Under “OUTPUT” there is only a grayed-out, chosen button “e-invoice only (XML)” with the note “fixed”, below it the sentence that an XRechnung is handed over as an XML file and no recipient reads it as an e-invoice in a PDF. The box “additionally a PDF for reading” with an ⓘ is available and not checked. At the end the sentence “Button, e-mail and flow deliver what is set here.”.]
Caption: With XRechnung the output is fixed.
- Image marker 1: The output is fixed to “e-invoice only (XML)”.
- Image marker 2: The reading copy can be switched on.

#### The PDF with embedded e-invoice

This PDF is a PDF/A-3. Pages and texts look like in the normal PDF; in addition, the XML is embedded in the document as an attachment. A PDF/A shows images without smoothing (as the standard requires): a small image, such as a logo, that is greatly enlarged may look somewhat more jagged in the PDF viewer. So that the PDF is valid, Smart Templates checks it before it is produced. A document is not produced if

- a text contains a character that the font does not have, such as a check mark ✓ or an emoji,
- an image is stored in CMYK (RGB is required),
- a font may not be embedded in documents according to its license information.

The message names the character and the place, the image or the font (see Problems and messages: E-invoice). If the image or the character comes from the record, such as a product photo or a character in the product name, the line below says “To be fixed by whoever maintains the record.”; if it is fixed in the template, “To be fixed by whoever maintains the template.” A character counts as coming from the record only if it comes from a field that the template prints at this place; if it is also in the template (even written as “&#9731;”), it says “Template”. Without an embedded e-invoice, that is with “e-invoice only (XML)” and in templates without an e-invoice, these rules do not apply.

[Image: The window “Assign e-invoice – ZUGFeRD 2.5.2 (EXTENDED)” with the section “Result of the check”. At the top the full bar “14 of 14”. The “Sample data of the draft” tab carries “1 error”, next to it the grayed-out button “Record”. A red box says “With this record no document is created.” and explains: a button, an email or a flow stops with the message below, and no normal PDF is produced either; only the full preview in the designer shows the PDF, then without an e-invoice and with a warning. Below it, under the red heading “PDF WITH E-INVOICE (1)”, there is a box with the message that the character “✓ (U+2713)” in the text “Bezahlt ✓” (page 1) does not exist in the font “Arimo” and that a PDF with e-invoice (PDF/A) must not contain missing characters, with the sentence “To be fixed by whoever maintains the template.”. Then follow the collapsed line “✓ 37 entries have a value” and the buttons “Download e-invoice as file” and “View PDF with e-invoice”. On the left, “Result of the check” carries the red marker “1 error”.]
Caption: A character that the font does not have prevents the PDF with e-invoice.
- Image marker 1: Defects that affect only the PDF/A are in a group of their own.
- Image marker 2: The message names the character, the text, the page and the font, and who fixes it.
- Image marker 3: The XML itself is valid: it can still be downloaded as a file.

#### The file name

The name of the XML comes from the standard: `XRechnung_` or `ZUGFeRD_`, the invoice number and `.xml`, such as `XRechnung_R-2026-0042.xml`. Whitespace in the invoice number becomes an underscore; characters that are not allowed in a file name are dropped.

If the template has a PDF name (see Template settings: PDF name), the XML is named the same, with `.xml`, such as `Rechnung_R-2026-0042.xml`: on download, on the button, as an email attachment and in `XmlFileName` or `FileName` of the actions. The XML in a ZUGFeRD PDF is always named `factur-x.xml`; the standard requires this.

### Assigning entries

Every entry of the e-invoice, such as invoice number, invoice date, buyer address or total, needs a value. Which one, you set in the window “Assign e-invoice”. You reach it in the “E-invoice” tab with “Assign entries …”. The name of the standard is in the title of the window. An AI can fill in most of the assignment for you (see Assigning with AI); the window then serves mainly for reviewing and touching up.

As long as nothing but the specifications of the standard is assigned, below the tabs there is first “Almost nothing assigned yet” with three buttons: “Apply suggestions from Dynamics” (see Applying suggestions), “Fill in with the AI …” (see Assigning with AI) and “Assign yourself”. Below it, it says how many mandatory entries are still open and, if the check has already found errors, how many: a single error with its section and “to the entry ›”, otherwise “view ›”, which leads to the result of the check. “Assign yourself”, a click on a tab, the search or a jump shows the entries.

[Image: A box with the heading “Almost nothing assigned yet” and the sentence “For an invoice from Dynamics, Smart Templates knows the usual fields.”. Below it three buttons: the blue button “Apply suggestions from Dynamics”, “Fill in with the AI …” and “Assign yourself”, plus an ⓘ. Below it, in gray, “13 mandatory entries are still open. Then check with the sample record.” and a line with the red marker “1 error”, “in »Ihr Unternehmen«” and “to the entry ›”.]
Caption: Below the tabs of the assignment window, as long as almost nothing is assigned.

[Image: The window “Assign e-invoice – ZUGFeRD 2.5.2 (EXTENDED)” after “Assign yourself”. At the top “Mandatory entries” with a short bar and “1 of 14”, the blue button “Next open mandatory entry ›”, the button “1 to look at ›” and on the right “Apply suggestions” with an ⓘ; below it the box “Show technical identifiers” with an ⓘ. On the left the search box “Search entry …”, the switch “Mandatory only” (active), “Open only” and “All” with an ⓘ and the gray sentence “Optional entries without assignment are hidden; »All« or the search shows them.”. Below it the sections, each with a small bar and a number or a dash: “Rechnung” (3, chosen), “Ihr Unternehmen” (2 and red “1 error”), “Kunde” (2), “Lieferung” (–), “Zahlung” (–), “Positionen” (1), “Nachlässe und Zuschläge” (–), “Steuern” (5), “Weitere Angaben” (–), below a line “Countries and units” and “Result of the check” with “13 open” and red “1 error”. On the right the heading “Rechnung” with the marker “3 open”, below it the jump links “Bemerkungen”, “Bestellung des Endkunden” and “Vorherige Rechnung”, then a table with the columns “ENTRY”, “VALUE”, “EXAMPLE” and “STATUS”: “Rechnungsnummer” with the empty selection field “Fixed value, field, variable or if-then …”, gray “e.g. R-2026-0042” and “open”; “Art der Rechnung” with a yellow border, “fest Rechnung”, “Rechnung (380)” and yellow “please check”; “Rechnungsdatum” (“e.g. 22.10.2026”, “open”) and “Währung” (“e.g. Euro (EUR)”, “open”). Below it the line “▸ 3 more become mandatory only if …” and under “LISTS IN THIS SECTION” three tiles with “No source yet — neither rule nor fixed entries.” and “open ›”. In the footer “Sample record: Sample data of the draft”, “Samples …”, “Check again”, “Cancel” and the blue button “Apply”.]
Caption: The assignment window of a ZUGFeRD template right after turning it on and “Assign yourself”, section “Invoice”.
- Image marker 1: The bar counts the mandatory entries that already have something assigned.
- Image marker 2: “Next open mandatory entry ›” jumps to the next mandatory entry without an assignment.
- Image marker 3: “*n* to look at ›” (in the menu “⋯”) jumps to the next yellow entry.
- Image marker 4: The search finds every entry, also in the lists. There is no filter: every entry of the section is there.
- Image marker 5: The tabs, each with at most one red number: open mandatory entries and errors of the check together.
- Image marker 6: The jump links to the lists of the section.
- Image marker 7: The selection field of an entry. A click opens the menu.
- Image marker 8: The status: “open”, yellow “please check” or gray “Note”; if something is assigned, it stays empty.
- Image marker 9: The sample record with which the window calculates and checks.

#### The window

- **At the top.** The bar counts the mandatory entries that must always be filled and the lists that need at least one entry, such as the line items. What is counted is whether something is assigned to them; whether the value is filled in the individual document is shown only by the check. This includes the entries that are mandatory only under a condition (“Mandatory if …”) as soon as the condition certainly applies to your template, such as the type of the electronic address when an electronic address is assigned. If the condition depends on data that is only known in the individual document, the entry is not counted; the check reports it if it is missing in the document. The template check on saving names the same entries (“For the e-invoice … assignments are still missing …”). On the right are “Apply suggestions” (see Applying suggestions), “Countries and units …” (see Countries and units) and the menu “⋯” with “*n* to look at ›” and “Show technical identifiers”. All of this is in one line.
- **Next open mandatory entry.** The button “Next open mandatory entry ›” next to the bar jumps to the next mandatory entry without an assignment, tab by tab from left to right; if it is in another section, the tab changes too. The entry is then outlined in blue and expanded. With the keyboard the focus stays on the button; Enter jumps on. It also jumps to the mandatory entries that are still open in a list, right after the list on its tab, part by part and source by source: it opens the list and in it “Edit fields …” or the window of the fixed entry, with the entry marked. For a list per row, such as “Allowance on the line”, this window is in the list’s pop-up. If something is assigned to all mandatory entries, also in the lists, the button is gray. The bar continues to count only the mandatory entries in the header and the mandatory lists; what is still open in the fields of a list is named by the button “Edit fields … · *n* open” and the pop-up (see The fields of a list).
- **To look at.** As long as an entry is on “please check”, the menu “⋯” at the top right carries a yellow dot, and in the menu “*n* to look at ›” counts these entries. Each click jumps to the next one and expands it; there “Fine as is” removes the yellow, or you choose a different value. Counted are suggestions and prefilled values (the template remembers what you have confirmed) and entries in the header whose field is empty in the sample record; in the lists, “Empty in the sample record” appears only at the entry itself. If a whole list is suggested, such as “VAT per rate”, the entry jumps to its tile; there is “Fine as is”.
- **Tabs and search.** At the top the sections are shown as tabs in one line, always in the same order: “Invoice” (with the further entries), “Your company”, “Customer”, “Delivery & payment”, “Lines” and “Totals & taxes” (allowances and charges, taxes and the totals). A tab that carries several sections shows them one below the other, each with its heading. On the right, set apart a little, as soon as a check has been made, comes “Check” with the result of the check. A click on a tab shows its entries. The search “Search entry …” sits at the top right in the band and finds every entry, also in the lists; a hit in a list opens the list and its fields with the entry marked. There is no filter: every entry of the section is there, also the optional ones.
- **The red number on a tab** says how much is still to do there: the mandatory entries that have nothing assigned yet and, after a check, the errors it found there. A mandatory entry without an assignment counts only once, even if the check reports it as missing. The tooltip on the number names both separately, such as “2 mandatory entries open, 1 error”; on the tab itself it names, for example, “2 of 4 mandatory entries assigned”. If nothing is to be done on a tab, there is no number.
- **Below the tabs** is the name of the section with the number of its open mandatory entries, such as “3 open”. If a section has several groups or lists, you jump there with the jump links below the heading. Below that, each entry has a row with the columns “Entry”, “Value”, “Example” and “Status”: name and marker, the selection field, the example and, where necessary, “open”, “please check” or “Note”. The marker says whether the entry is mandatory, “Mandatory if …” or optional; with “Mandatory if …” the condition follows right after it, such as “Mandatory if … as soon as an electronic address is given”. What is mandatory at this moment carries a red asterisk after the name: every mandatory entry and every “Mandatory if …” whose condition applies to your template. If the condition cannot be judged without data, for example because the entry depends on a field that can be empty, there is no asterisk, and the entry does not count as open; the check reports it if it is missing in the document. If an entry with an asterisk lacks its value, “open” appears under “Status”. The ⓘ on the row shows the explanation already when you hover over it. A click in the row expands it: below it are then the short explanation, notes from the check and, where something is to be looked at, “Fine as is”. Only one row is expanded at a time. A click on the selection field opens the menu at the same time. Errors of the check appear in red on every row, even collapsed. A note from the check is shown by the collapsed row with the gray word “Note” under “Status”; a click on it expands the row. All entries of the section are there, in the order of the standard, mandatory and optional mixed; nothing is hidden and nothing is collapsed behind a “more …”. The red asterisk shows what is mandatory. A “Mandatory if …” whose condition cannot apply to your template appears without an asterisk, such as the “Country” of an address as long as nothing is assigned to it.
- **Technical identifiers.** With the checkbox “Show technical identifiers” in the menu “⋯”, the numbers of the standard appear after the names (BT-1 invoice number, BG-25 line items …) and the codes after the plain texts (380 invoice, DE Germany). You do not need them for working in the window; they are helpful in conversation with support, the tax advisor or the recipient. The browser remembers the setting.
- **At the bottom** are the sample record with which the window calculates and checks, and “Samples …” (see Up to three sample records).
- **Apply and Cancel.** You work on a copy of the assignment. “Apply” writes it into the open template, in one step that Ctrl+Z undoes completely; it is stored in Dynamics with “Save”. “Cancel”, the cross, Esc and a click next to the window discard it; if something has changed, the designer asks “Discard assignments not applied and close?” with “Discard”. The variables and rules that were created in this window are discarded too: with “Apply suggestions”, with “Create variable …” or as a rule that is created by itself when you choose a relationship.

#### Choosing a value

The selection field in the row of an entry shows what is assigned. If nothing is assigned yet, it says “Fixed value, field, variable or if-then …”. A click opens a menu. Which items it has depends on the entry:

| Item | What it does |
|---|---|
| Default of the standard | If the entry has a default, it is at the top of the menu. |
| “Fixed value …” | A value that applies to every document of this template, such as your company name. An amount or percentage is written with a period as the decimal separator, such as 19 or 100.00; you choose a date in the calendar. |
| Codes in plain text | For entries with fixed codes, such as the currency, the common codes appear under “Common” with name and code instead of “Fixed value …”. You fetch rare ones with “Search further codes …”; hits appear as you type. On the invoice type, a question appears instead of this menu (see The invoice type). |
| “running number (1, 2, 3 …)” | Only in a list and only where the standard provides for it, such as for the line item number. |
| “Choose a field or variable …” | A field of the record, also through a relationship, or a custom variable of the template, such as a calculated total (see Variables). The familiar field picker opens. In the header it offers only number and currency fields for an amount, only date fields for a date, and only choice and text fields for the invoice type (see The invoice type); the custom variables are always all available. In a list it shows the fields of the row, their relationships, the rule variables of the rule and the custom variables, and below them the button “Field of the main record …” (see The line items and Data tree and field picker). In these pickers the custom variables are only available to choose, without “+ New” and ✎: you create a new one with “Create variable …”, and you change an existing one at the variables. |
| “If-then …” | A different value depending on a condition, such as 381 for a credit note and otherwise 380 (see If-then on an entry). |
| “Create variable …” | Creates a variable and inserts it right here, for a value that is calculated or composed. In the header, the same button is at the bottom of the field picker. In a list from a rule, the item is called “Create variable … (on the rule)” and creates a rule variable (see Creating a variable). |
| “— no value —” | Removes the assignment again, also a whole if-then. It appears as soon as something is assigned. |

[Image: The expanded row “Währung” with an ⓘ; in the selection field it says “fest Euro”, next to it “— (changed, please check again)”. Below the selection field the menu is open: under “COMMON” are “Schweizer Franken” (CHF), “Euro” (EUR, highlighted), “Pfund Sterling” (GBP) and “US-Dollar” (USD), each with the code on the right, below them the blue item “Search further codes …”. After a line follow “Choose a field or variable …”, “If-then …” and “Create variable …”, after another line “— no value —”. Behind it on the left, cut off, the explanatory text of the row, “▸ 3 more become mandatory only if …” and the tiles of the lists.]
Caption: The menu of an entry with fixed codes, here the currency, after “Euro” has already been chosen.

After the choice, the field shows what is assigned. A field appears with the gray word “Field” and its name. A custom variable appears as a blue placeholder, as on the canvas and in the content of a barcode; a rule variable of a list likewise, with “ƒ” in front, such as “ƒ Netto”. “fixed” stands for a fixed value, “Text” for a value in which text and fields appear together, “1 2 3” for the running number, “Rule” for the rule of a list and “If-then” for an if-then. To the right of the field is the status of the entry:

| Status | Meaning |
|---|---|
| “open” | A mandatory entry without an assignment. No e-invoice is then produced with the document. Open does not count as an error of the check (it is already in the number at the section); the word appears neutral, without color. |
| (empty) | Something is assigned to the entry, also an if-then. It does not need a word of its own: the example next to it shows the value. |
| “please check” (yellow) | The entry is assigned, but a person should look at it: a suggestion that Smart Templates could only guess, the prefilled invoice type (“It is always an invoice”) or a field that is empty in the sample record (“Empty in the sample record — please check whether the field is right.”). In the expanded row there is then a button “Fine as is”. For a suggestion and for the prefilled invoice type, the template remembers the yellow until you confirm it; for “Empty in the sample record”, “Fine as is” applies to this value as long as the window is open. |
| “Default: …” (gray) | Without an assignment, Smart Templates writes the named value because the format requires a value at this place. |
| “Note” (gray) | The last check has a note on this entry, for example on a branch of an if-then that always applies. The note itself is in the expanded row; a click on “Note” expands it. A note does not prevent the document. If the entry has a second status at the same time, such as “please check”, both appear one below the other. |

[Image: The collapsed row “Zahlungsart” with the addition “Mandatory if … as soon as details of the payment or an account are assigned” and an ⓘ. In the value field “If-then 2 branches · else fixed SEPA-Ü…”, below it “always → fixed Überweisung” and “if Gesamtbetrag größe… → fixed SEPA-Überwe…”. In the column “Example” “Überweisung (30)”, under “Status” the gray word “Note”.]
Caption: An if-then with a branch without a condition: under “Status” it says “Note” in gray; a click on it expands the row with the note.

Next to the selection field, in the column “Example”, there is an example. “R-2026-0042” shows the value that the assignment yields in the sample record; “e.g. …” set in gray is only an invented pattern as long as nothing is assigned or no check has been made yet. After a change, “(changed, please check again)” appears there until the next check.

Formatters such as `{{Currency:…}}` or `{{Date:…}}` are allowed only with texts. For an amount or date, assign the field without a formatter.

#### If-then on an entry

Some entries depend on the individual document. The invoice type is 381 for a credit note, otherwise 380; a credit note that Dynamics stores with negative amounts needs positive ones in the e-invoice. For this, the entry gets an if-then: if a condition applies, its value applies, otherwise the value under “ELSE”. The if-then sits on the entry itself; you do not need a custom variable for it. You know the window from the condition branches of the variables and from the content of a barcode (see Variables: Condition branches).

1. In the assignment window, click the selection field of the entry and choose “If-then …”.
   → The window “If-then for »Invoice type«” opens with an empty branch under “IF”. Under “ELSE” is the value that was assigned so far.
2. Build the condition under “IF”: field, comparison and value. You attach a second one with “Another condition”; AND/OR and “Subgroup” then appear (see Conditions: The builder). For a choice field, choose the value “by option value” among its options: there is the name, such as “Gutschrift”, with the code of the chosen option small and gray next to it; the comparison uses the code, whatever language Dynamics supplies the label in (see Conditions: Choice fields: by option value).
3. Under “THEN”, choose the value for this case, with the same menu as on the entry: for an entry with codes a code, otherwise a fixed value, a field or a variable. “— no value —” means: in this case the template supplies nothing.
4. You create further cases with “Condition branch”. Under “ELSE”, choose the value that applies when no branch is met.
5. Click “Apply”.
   → The selection field of the entry shows the marker “If-then”, the number of branches and the value under “ELSE”, such as “2 branches · else fixed Invoice”. Below it there is one row per branch, “if … → …”, with the condition in words. The codes of the values, such as 381, appear there only with “Show technical identifiers” after them; the example always names the code, such as “Invoice (380)”. You open the window again via the selection field and “If-then …”.

[Image: The window “If-then for »Invoice type«” with a cross at the top right. At the top the sentence “The first branch that applies wins, otherwise »Else«. It is checked once per document on the main record. The conditions read your own data, not other entries of the e-invoice.” with an ⓘ and “What should it contain?” with an ⓘ. The first branch: under “IF” (with a red cross on the right) the field “Rechnung › Belegart”, the switch “by option value” (active) and “by text”, “is” and the value “Gutschrift” with “100000001” small and gray next to it, below it “Another condition”; under “THEN” “fest Gutschrift”. The second branch likewise with “Rechnungskorrektur” (100000002) and “fest Korrigierte Rechnung”. Under “ELSE” “fest Rechnung”. Below that the button “Condition branch”, the line “Result with the current sample data: 380”, at the bottom left “Save as custom variable”, at the bottom right “Cancel” and the blue button “Apply”.]
Caption: The if-then for the invoice type with two branches over the choice field “Belegart”.
- Image marker 1: A branch begins with “IF”: here a condition on a choice field.
- Image marker 2: For a choice field, you choose the value “by option value”.
- Image marker 3: The code of the chosen option is small and gray next to it; the comparison uses it.
- Image marker 4: Under “THEN” the value for this case, here from the codes of the invoice type.
- Image marker 5: “ELSE” applies when no branch is met.
- Image marker 6: “Condition branch” creates a further case.
- Image marker 7: The preview: what the if-then yields with the sample data (380 = invoice).
- Image marker 8: “Save as custom variable” turns the branches into a variable in which you may calculate.

[Image: The expanded row “Art der Rechnung” with the example “Rechnung (380)” and the question “How does the template tell what kind of document it is?”. Of the three answers “It is always an invoice” (with the code 380), “From a choice field of my invoice” and “Otherwise: I build an if-then …”, the third is chosen and outlined in blue. Below it the selection field with the marker “If-then”, “2 branches · else” and “fest Rechnung”, below it two rows: “if Belegart is »Gutschrift« → fest Gutschrift” and “if Belegart is »Rechnungskorrektur« → fest Korrigierte Rechnung”.]
Caption: After “Apply”: the if-then on the entry, in the expanded row.
- Image marker 1: The marker “If-then”, the number of branches and the value under “ELSE”.
- Image marker 2: One row per branch with the condition in words.

- **The first branch that applies wins.** If none applies, “ELSE” applies. A branch without a condition always applies; below the selection field it appears as “always → …”, and the branches after it and “ELSE” then never come into play. “Check again” (under “Note” in the result of the check, with “to the entry ›”) and, after saving, the message “Warning: …” already point this out, for example with “Branch 3 has no condition and therefore always applies; »else« is never reached. If that is not intended, add the condition.” If a field is chosen in a branch but no value yet, the red note “⚠ Value missing: without a value, this branch would always apply. Choose a value or remove the condition with ✕.” appears below the branch, and until you add the value or remove the condition with ✕, “Apply” stays locked. This way a half-built branch never silently becomes one that applies to every invoice. If a condition contains a field in “{{ }}”, for example from an AI change, “Apply” is locked likewise, and no e-invoice is produced until the condition is corrected (see Conditions: Fields in “{{ }}”).
- **A branch chooses a value, it does not calculate.** If you want to calculate, for example to flip the sign, create a variable for it: “Save as custom variable” at the bottom of the window, in a list “Save as rule variable”, turns the branches into a variable in which you may calculate, and inserts it on the entry. “Create variable …” works too (see Creating a variable).
- **The conditions read your own data,** not other entries of the e-invoice. In the header, that is for an entry outside a list, it is checked once per document on the main record: its fields, also through relationships, and the custom variables. In a list it is checked per row: the fields of the row, their relationships, the rule variables of the rule and the custom variables, which have the same value in every row.
- **No value is intentional.** If a branch with “— no value —” applies, the entry gets no value in this document. If it is mandatory, no document is produced, and the message says “…: the template supplies no value for this case (if-then)”. This way, for example, a reminder never silently goes out as an invoice. If no e-invoice at all should be produced for such a document, exclude it at the switch under “Only if …”.
- **Errors in a condition.** If a condition is recognizably misspelled, for example with an open bracket or a single “=”, or names a custom variable that does not exist, no document is produced, and the message names the entry. All branches are checked in the process, also those that do not apply to this document. The check with the sample record already shows it in the window (see Checking with a sample record). What you click together in the condition builder is spelled correctly. A condition written by hand or by an AI, you additionally look at with one example per case (see Up to three sample records), because not every typing error is noticed.
- **A condition is always a text.** If a branch holds `false`, `true` or a number without quotes, an object or a list instead of a condition in quotes (from a hand-edited file or a change by the AI), this is an error as with “Only if …”: no e-invoice is produced until it is corrected. Below the selection field, the row of the branch shows what is in the template, such as “if false”, and below it it says in red “⚠ The condition in the template is not a text but false without quotes. It cannot be evaluated like this; until it is corrected or removed, no e-invoice is created.” with the button “Remove”; what it does is shown when you point at it with the mouse. If another branch or “Else” with a value follows this branch, the button removes the whole branch; the other branches and “Else” continue to apply, and if no branch remains, only the value of “Else” is left. Only on the last branch without “Else” does it remove the condition alone: the branch then always applies and appears as “always → …”, like a fixed value; if it should not apply at all, remove it in the window “If-then …” with “✕”. You also create a new condition in this window: the branch appears there with the same red sentence and the button “Rebuild with the condition builder”. As long as you do not rebuild this condition, it stays in the template as it is, even if you change something else in the window.
- **Preview.** At the bottom of the window it says what the if-then yields with the sample data, in a list on the first row of the rule. A branch without a condition and without a value, such as the empty one when opening, does not count in this; the preview then shows the value under “ELSE” straight away.
- **Queries.** An if-then is not a query of its own. If a condition reads a field through a relationship, it is joined into the query and may cost further queries, as may a summary over a list, such as the number of line items.
- **Taking it out.** “— no value —” in the menu of the entry takes out the whole if-then. If you remove all branches in the window, the value under “ELSE” stays as a simple value.
- If-then exists on individual entries, not on groups or whole sections. A group is created in the e-invoice anyway only if one of its entries has a value.

> **Tip:** The invoice type from your own choice field, such as “Belegart”: IF “Belegart is Gutschrift” THEN “Credit note 381”, IF “Belegart is Rechnungskorrektur” THEN “Corrected invoice 384”, ELSE “Invoice 380”. If the field is on the primary source, the answer “From a choice field of my invoice” builds such an if-then for you, one branch per value of the field and without a value under “ELSE” (see The invoice type). A type without a branch, such as a reminder, then gets no value instead of silently going out as invoice 380.

#### Creating a variable

If an entry needs a value that you have to calculate or compose, such as an amount with the sign flipped, you create a variable. “Create variable …” in the menu of the entry opens the variable window, already prefilled: name and type come from the entry (amount, price, quantity and percent give number, a date gives date, yes/no gives yes/no, everything else text). In the variable you may calculate and build condition branches (see Variables). After “Save” the variable is on the entry; “Cancel” changes nothing.

| Where | What is created | Title of the window |
|---|---|---|
| in the header, that is for an entry outside a list, such as under “Invoice” or “Taxes” | A custom variable of the template. It is calculated once per document on the main record and then appears with the variables. | “New variable for »…«” |
| on an entry of a list from a rule, such as the line items; the item is called “Create variable … (on the rule)” there | A rule variable of this rule: a new column, calculated per row. It then appears under “Choose a field or variable …” and in the column bar at the line items. | “New rule variable on »…«” |

- If you close the assignment window with “Cancel”, the new variable is discarded too. That is why the custom variables in the pickers of this window are only available to choose, without “+ New” and ✎ (see Choosing a value).
- From the if-then window, “Save as custom variable” or “Save as rule variable” creates a variable with the branches of this window.
- The variable changes nothing in the printed document as long as you do not drag it into the document yourself.

#### Applying suggestions

For the Dynamics invoice, that is the table “Rechnung” as the primary source of the template, Smart Templates knows the usual standard fields: invoice number, due date, currency, billing and delivery address, comment, totals, line items with quantity and price, discounts and freight. “Apply suggestions” assigns all of those for which there is a field in the sources of your template. Entries that already have something assigned stay unchanged. With a different primary source the button is locked.

After the suggestions, a line appears at the top, such as “34 entries suggested.”, followed by how many mandatory entries are still open and how many errors the check found, each with a jump, and “Undo”. What the yellow means is explained by the ⓘ next to “Apply suggestions”. For an assigned entry, the column “Example” shows the value from the sample record; “Status” stays empty.

[Image: The window “Assign e-invoice – ZUGFeRD 2.5.2 (EXTENDED)” after “Apply suggestions from Dynamics”. At the top the bar “11 of 14”, “Next open mandatory entry ›”, “9 to look at ›” and “Apply suggestions”, below it “Show technical identifiers”. A gray line says “34 entries suggested.”, followed by the blue jumps “3 mandatory entries still open ›” and “View 8 errors ›” (“8 errors” as a red marker), on the right “Undo” and a cross. On the left the sections, now with longer bars: “Rechnung” (1), “Ihr Unternehmen” (2 and red “2 errors”), “Kunde” with a check mark, “Positionen”, “Nachlässe und Zuschläge” and “Steuern” with red error numbers, “Result of the check” with “3 open” and “8 errors”. On the right the section “Rechnung” with “1 open”: “Rechnungsnummer” with “Feld Rechnung › Rechnungsnummer” and the example “R-2026-0042”, the status empty; “Art der Rechnung” with a yellow border, “aus Feld Rechnungstyp · 7 Werte übersetzt, 1 ohne Beleg”, “Rechnung (380)” and yellow “please check”; “Rechnungsdatum” open; “Währung” with “Feld Rechnung › Währung › Währungscode” and “Euro (EUR)”. Below it “▸ 3 more become mandatory only if …” and the list “Bemerkungen” with “1 fester Eintrag »Bemerkung«”.]
Caption: After “Apply suggestions” on the demo invoice.
- Image marker 1: The line after the suggestions: how many are suggested, what is open and which errors the check found.
- Image marker 2: “Undo” takes the suggestions out again.
- Image marker 3: “*n* to look at ›” jumps in turn to the yellow entries.
- Image marker 4: “Apply suggestions” is further up; a second click assigns what has been added in the meantime.
- Image marker 5: Assigned: the example shows the value from the sample record, “Status” stays empty.
- Image marker 6: Yellow: a suggestion to look at, here the invoice type according to the labels of the invoice type.

Suggestions that you should look at are marked yellow:

- a substitute: Dynamics has no invoice date of its own, the creation date is suggested; if you keep a field of your own, choose it instead,
- a value that applies to every document, such as the invoice type “Invoice” (380), tax type and tax rate 19 % on every line item, the unit “Piece” without a unit field, or the fixed tax entry “19 %”; if you keep the invoice type in a choice field of your own, choose it at the entry (see The invoice type),
- something that Smart Templates has newly created: the rule variable “Netto”, the variable “NettoGesamt” and the fixed entries for discounts and freight,
- a variable that already existed and that Smart Templates uses unchanged: the rule variable “Netto” with this name or the variable “NettoGesamt” with this name and the same formula; the note at the entry then begins with “Already there:” instead of “Newly created:”, and you check whether the variable calculates what you want,
- a total from Dynamics if the template has no line item rule: whether it contains discounts and freight as the e-invoice requires is known only to whoever sets up the template.

For this, Smart Templates creates what is missing: on the rule of your line item table, the rule variable “Netto” (the amount minus manual discount; Dynamics has already deducted the volume discount in the amount), from which the line item amount net and the total of the line items come; the variable “NettoGesamt” (the total amount from Dynamics without the tax) for the total amount net and the basis of the tax line; fixed entries with a condition for the discount on the whole invoice, the freight, and per line item for the manual discount and the volume discount. Such an entry applies only if its amount is greater than 0; you assign tax type and tax rate of discount and freight in the entry itself. In addition come the comment of the invoice and the delivery address. “Undo” and “Cancel” also take out what was created. The suggestions come from a table in Smart Templates that the AI assistant also uses (see Assigning with AI).

Smart Templates does not suggest custom fields — neither those of your company nor those of an add-on solution, nor those of Microsoft. You recognize them by the prefix of their publisher before the field name, such as `cig_`, `ep_`, `msdyn_` or `new_`; the fields of Dynamics itself have none. A custom field may not exist in another environment. You assign those yourself, also for the invoice type: you choose your own choice field, such as “Rechnungstyp”, at the entry with “From a choice field of my invoice”. The Leitweg-ID belongs here too: it is usually in a field of its own on the customer. With XRechnung, where it is mandatory, the window says so after the suggestions. “Undo” in the message takes the suggestions back, “Cancel” everything that was changed in this window. If there is nothing left to suggest, it says there: “No further suggestions: what the sources of this template provide is already assigned.”

After the suggestions, the window checks straight away with the sample record; the examples and the yellow “empty in the sample record” arise from that. What you should look at is counted by “*n* to look at ›” in the menu “⋯” at the top right; each click jumps to the next yellow entry and expands it.

#### The invoice type

The invoice type tells the recipient whether it is an invoice, a corrected invoice, a partial, final or cancellation invoice or a credit note. Instead of a menu, the entry asks a question: “How does the template tell what kind of document it is?” It appears as soon as you click the row “Invoice type”; collapsed, the row shows only the short form, such as “fixed Invoice” or “from field Rechnungstyp · 7 values translated”. The question has three answers; the answer that currently applies is marked.

- “It is always an invoice”: every document goes out with the code 380, also credit notes and corrections. This is how a newly turned-on e-invoice is prefilled, with “please check”. “Fine as is” or a click on the answer that is already marked confirms it; the yellow then stays away, also the next time you open it.
- “From a choice field of my invoice”: usually the invoice type. Under “Choice field”, choose the field; only the choice fields of your primary source are listed there. A table assigns a type of the standard to each value of the field (see below).
- “Otherwise: I build an if-then …”: opens the if-then window, for example for “else invoice, if … then credit note” (see If-then on an entry). After that, below the answer there is the value field with all ways: a fixed code, “Choose a field or variable …” and “If-then …”. If you choose a choice field there, the table of the second answer appears. At this entry, also for the value of a branch in the if-then, the field picker offers only choice and text fields, no fields for date, number, amount or yes/no and no lookups; a relationship leads to the fields of its target. A field of another type that is already assigned stays visible and unchanged.

[Image: The expanded row “Art der Rechnung” with a yellow border, the example “Rechnung (380)” and yellow “please check”. Below it the question “How does the template tell what kind of document it is?” with three answers: “It is always an invoice” with the code 380 and the sentence “Credit notes and corrections would then also go out as an invoice.” (chosen, outlined in blue), “From a choice field of my invoice” with “e.g. »Invoice type« with invoice, credit note, correction …” and “Otherwise: I build an if-then …”. Below it in yellow “Suggested — please take a look.” and the button “Fine as is”.]
Caption: The question at the entry “Invoice type”, right after turning it on.
- Image marker 1: “It is always an invoice”: this is how a newly turned-on e-invoice is prefilled.
- Image marker 2: “From a choice field of my invoice”: the table below.
- Image marker 3: “Otherwise”: an if-then of your own (see If-then on an entry).
- Image marker 4: “Fine as is” confirms the prefill.

[Image: The row “Art der Rechnung” after the answer “From a choice field of my invoice”, with “— (changed, please check again)” and yellow “please check”. In the box below it the selection “Choice field” with “Rechnungstyp”, then a table with the columns “VALUE IN THE FIELD” and “IN THE E-INVOICE”: Rechnung → Rechnung, Gutschrift → Gutschrift, Rechnungskorrektur → Korrigierte Rechnung, Abschlagsrechnung → Teilrechnung, Mahnung → “— no document —”, Schlussrechnung → Rechnung, Anzahlungsrechnung → Teilrechnung, Stornorechnung → Gutschrift, each row with a selection field. Below it in gray “Pre-assigned by the labels. Values without an assignment create no document.”, the blue button “Apply” and “Back to the question”.]
Caption: The table for the choice field “Rechnungstyp”, prefilled according to its labels.
- Image marker 1: The choice field of the primary source.
- Image marker 2: One row per value of the field with the invoice type.
- Image marker 3: A value without a matching type: “— no document —”.
- Image marker 4: “Apply” confirms the table.
- Image marker 5: “Back to the question” leaves the invoice type as it was before.

[Image: The expanded row “Art der Rechnung” after “Apply” and “Check again”: the example “Rechnung (380)”, below it the marker “aus Feld”, “Rechnungstyp · 7 Werte übersetzt, 1 ohne Beleg” and the button “Change”. No “please check” any more.]
Caption: After “Apply”: the short form with “Change”.

The table is prefilled according to the labels of the field. The prefill guesses from the usual German and English words: “Rechnung” and “Schlussrechnung” become invoice, “Abschlag” and “Anzahlung” partial invoice, “Gutschrift” and “Storno” credit note, “Korrektur”, “Rechnungskorrektur”, “korrigiert” and “Berichtigung” corrected invoice. You find rare types in the menu of a row via “Search further codes …”. From this, Smart Templates writes an if-then directly onto the entry: one branch per value of the field. What is remembered is the value of the field, that is its code, not its label; that differs per language.

- The prefill stays on “please check” until you confirm the table with “Apply”. After that, the expanded row shows only the short form, such as “from field Rechnungstyp · 7 values translated, 1 without document”, with the example next to it; “Change” brings back the question. “Apply suggestions” does not choose a field of its own for this (see Applying suggestions); you choose the field here.
- “Back to the question” leaves the table; the invoice type then stays as it was before.
- A value without a matching type, such as “Mahnung”, gets “— no document —”: a document of this kind stops with a message. If it should be produced without an e-invoice, exclude it at the switch under “Only if …”.
- If no label of the field matches a type, for example with “Status” or “Priorität”, the table appears with nothing but “— no document —”, and below it the sentence “None of this field’s labels could be matched to a type — please choose the types yourself.” You then choose the types yourself in the menu of each row; “Apply” works as soon as one value has a type. Until then the previous invoice type stays unchanged.
- A variable “Rechnungsart” from an older version is still recognized by Smart Templates and edited in the same table; the finished row shows it as a blue placeholder (see Variables).
- An if-then with other conditions, for example by hand or from an AI, appears under the answer “Otherwise”; you edit its branches there.
- With XRechnung, a credit note document of its own is created automatically for a credit note (381).
- If the primary source has no choice field, under “Choice field” it says “— no choice field in the main source —”; then “It is always an invoice” and “Otherwise” remain.

#### Taxes and totals

Smart Templates calculates nothing itself. You assign totals, tax amounts and tax rates like any other entry: from fields, from custom variables or from the result of a rule. Usually they are the same fields or variables that your document prints. Whether the amounts add up is checked by the arithmetic check of the standard (see Checking with a sample record).

- **One tax rate:** In the list of taxes, “One tax rate” creates a fixed entry “19 %” with the tax type S (for XRechnung “Standard rate”, for ZUGFeRD “Standard or reduced rate”) and the tax rate 19. Then assign the basis, that is the total net at this rate, and the tax amount (see Lists).
- **Several tax rates:** Instead of fixed entries, use a rule over the line items, summarized by the tax rate, with the totals to two decimal places (see Rules).
- The suggested totals calculate from the line items: the total of the line items via the rule variable “Netto”, the total amount net as total amount minus tax (variable “NettoGesamt”), the discount on the invoice and the freight from their fields. They are yellow until you look at them; the arithmetic check reveals any deviation. If the template has no line item rule, Smart Templates suggests the totals from Dynamics.
- **Rounding:** Smart Templates writes amounts into the e-invoice rounded commercially to two decimal places, also an amount from a custom variable, such as 1,486.905 as 1,486.91. Unit prices, quantities and percentages stay as they are. The arithmetic check checks the rounded amounts as they appear in the e-invoice; if it does not add up by one cent because of rounded partial amounts, it reports that. A summary such as `{{sum(Positionen.Netto)}}` rounds each line item to two places before adding up — the total of the line items thus matches the line items. A total from a custom variable or a field is best rounded to two places already in the rule.
- **Credit note:** If Dynamics stores a credit note with negative amounts, convert the totals together with the line items (see Credit note with positive amounts).

### Lists: line items, tax rates, allowances

Some entries occur several times: line items, tax rates, bank accounts, allowances. Each of these lists appears as a tile in the section it belongs to, with the marker “Mandatory” if it needs at least one entry, otherwise with “List”; such a mandatory list carries the red asterisk like a mandatory entry. A click on “open ›” on its tile opens the list. At the top is the box “Where do the entries come from?” (see Where the entries come from); if the list gets different entries depending on the document, create parts “If …” and “Else” below it with “Set condition …” (see If and Else: different entries depending on the document). You assign the *entries per row* in the window “Edit fields …” (see The fields of a list); they are not below the box, not even for a list without a condition.

On the list “Preceding invoice” it says what it is for: “Needed for corrected, cancellation and final invoices”. The ⓘ next to it explains what belongs in it: for a corrective or cancellation invoice, the invoice that is corrected or canceled, for a final invoice every partial invoice. Below it follow the notes that the check otherwise reports: for XRechnung the rule BR-DE-26 (a corrected invoice should refer to the original invoice), for both standards the own check rule ST-BG-3 of Smart Templates. It reports a note if the invoice type is a cancellation, corrective or final invoice (code 381, 384, 876 or 877) and “Preceding invoice” stays empty; if XRechnung already reports BR-DE-26, it is dropped. The e-invoice is produced in any case. ST-BG-3 is a rule of Smart Templates, not of the standard; its sentence says so: “… (own check rule of Smart Templates, not a rule of the standard)”. What is checked is the result: whether the entries come from a rule, from fixed entries, from “Else” or from a case, the note appears only if the list is empty at the end. If the list has no source in “Else” or in a case, the message says “To be fixed by whoever maintains the template.”, otherwise “To be fixed by whoever maintains the record.”

If a rule of the standard names another list, a line “Otherwise the check reports a note: …” or “… an error: …” with the sentence of the rule and its identifier also appears on the tile and at the head of the list. With XRechnung it also exists on “Credit transfer” (BR-DE-23-a, BR-DE-24-b and BR-DE-25-b); “Needed for …” appears only on “Preceding invoice”. After a check, the findings that concern this list also appear at the head of the list, a note in yellow, an error in red; after a change they disappear until you check again.

#### Where the entries come from

At the top, in the box “Where do the entries come from?”, there are two buttons side by side: “Rows from a rule” and “Fixed entries”. A list gets its entries from one of the two; at the start “Rows from a rule” is pressed, and only what was chosen appears. If you switch, you remove what the other source already has; the designer asks first, such as “Remove the fixed entry?”, and afterwards immediately opens the rule picker or the window of a new entry.

- **Rows from a rule.** One entry is created per row of the rule, as with the rows of a table. With “Choose rule …” choose an existing rule; usually it is the same one your table in the document is based on. If you choose a relationship instead of a rule, the rule is created by itself: if the relationship already has a rule without a limit (for the line items one that does not summarize), Smart Templates suggests that one first; otherwise it creates a rule “… (E-Rechnung)” with all rows and without a limit (see The rule is created by itself). “Undo” in the message takes it out again, as long as you have not changed anything else afterwards. Next to the rule is the button “Edit fields …”: it opens the window for the *entries per row*, relative to one row of the rule (see The fields of a list), and names what is still open there, such as “Edit fields … · 1 open”. The ✕ after it takes the rule out.
- **Fixed entries.** With “Entry” you create an entry with values of its own, such as a row “Fracht” or “Abschlag”, or a tax rate. As long as there is none, it says “No entry yet.” Fixed entries come in their order; a fixed entry can have an “Only if …”.
- **Older templates with both.** If a list from an older version has a rule and fixed entries, both appear and continue to apply: first the rows of the rule, then the fixed entries in their order. A sentence points this out; the two buttons are locked until you have removed one of the two. Nothing is deleted silently.
- **“Only if …” on the rule.** The box no longer offers it: the same effect is achieved by “Set condition …” below the part (see If and Else: different entries depending on the document). An older “Only if” on the rule is still evaluated and appears on the rule: “Change condition …” expands its condition builder below the row, “Done” collapses it, the ✕ takes the condition out. A condition that is not a text (see “Only if …”) still opens a window, so that nothing is overwritten silently. “Turn into a case” turns it into a part “If …” and leaves the e-invoice as it was. On the rule of the line items, an older “Only if” appears in gray; “Remove condition” takes it out, after which the line items come with every document.
- An entry whose condition applies is always there. If a mandatory entry is missing in it, that is an error.

The rule of a list must not leave out rows. If it delivers only the first *N* rows, or if for the line items it selects exactly one row, a red message appears below the rule: “The rule »…« delivers only the first 2 rows. An e-invoice must contain all of them.” The button “Create own rule without limit” creates a copy that loses only the limit; filter and sorting stay. Your rule and the printed document stay as they are; the copy can cost further queries.

Below the rule it says what it costs: the same rule as the table in the document already has its query. If the e-invoice additionally reads something through relationships of the row, such as through a lookup to the invoice, it is joined in and can cost further queries; that is then stated below it. A rule that the document itself does not use can cost further queries for the e-invoice.

#### The rule is created by itself

If you click “Rows from a rule”, “Choose rule …” or the chosen rule, the window “Choose rule for »…«” opens. It shows the main record with its relationships and the rules on them. On a rule it says what matters for the e-invoice:

- “table in the document · its query already exists”: a table of the document is based on this rule. It is usually the right choice.
- “limited — not for the e-invoice” (red): the rule delivers only the first *N* rows or, for the line items, exactly one; the e-invoice rejects it.
- On a relationship without a matching rule it says what a click does, such as “creates »Zahlungsplan (E-Rechnung)«”.

A click on a rule chooses it. A click on a relationship leads to a rule without the rule window opening:

- If the relationship already has a rule without a limit, a small window asks, such as “»Rechnungspositionen« already has the rule »Positionen« without limit, which the table in the document also uses. Use it?” The blue button, here “Use »Positionen«”, chooses it, “Create new rule” creates one of its own. For the line items, it does not suggest a rule that summarizes.
- Otherwise a rule “*Relationship* (E-Rechnung)” is created under the relationship, with all rows, without a filter and without a limit. If a rule of the same relationship already sorts, the new one takes over its sorting, never its limit, plus the rule variables that read this sorting or your assignments.
- At the top a message then appears such as “Rule »Zahlungsplan (E-Rechnung)« created: all rows, without limit. It can cost further queries.”, with taken-over sorting with “sorted like »…«”. It names rule variables that were taken over and, in yellow, columns of the previous rule that the new one does not have (“Assignments on them stay empty”). “View rule …” opens the new rule in the rule window; if you rename it there, the assignment follows. “Undo” takes it out again, as long as you have not changed anything else afterwards.

The new rule then appears in the data tree under its relationship like any other (see Rules). It changes nothing in the printed document. Like any rule that the document does not use, it can cost further queries.

[Image: The window “Choose rule for »Positionen«” with a cross at the top right and an explanatory text. Below it the search box “Search relationship or rule…” and the expanded main record “Rechnung ★” with a search box of its own. Then follow the lookups “N:1 Währung · Währung”, “N:1 Firma · Kunde”, “N:1 Benutzer · Besitzer” and “N:1 Rechnung · Bezugsrechnung”, then “1:N Rechnungsposition · Rechnung” with “choose”, the rules “ƒ Rechnungsposition · Positionen” with gray “table in the document · its query already exists”, “ƒ Rechnungsposition · Steuersätze” and “ƒ Rechnungsposition · Erste drei Positionen” with red “limited — not for the e-invoice”, each with a gear and “choose”, further “1:N Rechnung · Schlussrechnung”, “ƒ Rechnung · Abschläge” and “1:N Zahlungsplan · Rechnung” with gray “creates »Zahlungsplan (E-Rechnung)«”. At the bottom left “Cancel”.]
Caption: The rule picker of a list, here of the line items.
- Image marker 1: The rule on which the table in the document is based: usually the right choice.
- Image marker 2: The e-invoice rejects a limited rule.
- Image marker 3: A click on a relationship without a matching rule creates one.

[Image: At the top of the assignment window a gray line “Rule »Rechnungsposition (E-Rechnung)« created: all rows, without limit, sorted like »Positionen«. It can cost further queries.” with the buttons “View rule …” and “Undo” and a cross. Below it on the left the search box, the filter and the first sections, on the right the list “Positionen” with an ⓘ and its explanation and the box “WHERE DO THE ENTRIES COME FROM?” with the checked “Rows from a rule”, the selection field “Rule Rechnungsposition (E-Rechnung)” and gray “The document itself does not use this rule — for the e-invoice it can cost further queries.”.]
Caption: After a click on the relationship and “Create new rule”: the message at the top and the new rule on the list.
- Image marker 1: The message names the new rule and where its sorting comes from.
- Image marker 2: “View rule …” opens the new rule in the rule window.
- Image marker 3: “Undo” takes it out again.
- Image marker 4: The new rule is now the source of the list.
- Image marker 5: What it costs: the document does not use this rule.

#### The fields of a list: “Edit fields …”

What goes into each entry of a list, you assign in the window “Edit fields …”. If the list has a rule, the button of the same name is next to it; if mandatory entries are still open, it names the number, such as “Edit fields … · 1 open”. The window also exists for a list without a condition: below the box “Where do the entries come from?” there are no entries per row any more. A fixed entry has its own window (see A fixed entry).

- **The head** says what the window applies to, such as “Edit fields · Preceding invoice · Else if Rechnungstyp is equal to Schlussrechnung · Rule »Abschlagsrechnungen«”: the part as it is called in the box, with its condition in words. For a list without a condition it is missing. Below it says what the entries relate to: “Relative to one row of the rule; example from row 1.”
- **Every entry has a row** as in the assignment window: name, selection field, example and status (see Choosing a value). All entries of the list are there, in the order of the standard; the red asterisk shows what is mandatory, and “open” appears on a mandatory entry without an assignment. The if-then of an individual entry remains a window of its own that opens above this one (see If-then on an entry). For the line items, the table with the column bar appears in place of the rows (see The line items).
- **If the list has conditions,** the fields belong to the part that is named in the head; each part has its own. The example is then that of the standard (“e.g. …”) and not row 1 of the sample record, because only the data show which part applies; the column is called “Example”, and the sentence above it says “Relative to one row of the rule. The list has cases — the example shown is the one of the standard.”
- **Lists per row,** such as an allowance on the line item, appear under “Lists per row” as tiles. “open ›” opens the list in the same window, not in a second one above it. At the top, breadcrumbs show the way, such as “Positionen If Belegart is equal to Gutschrift › Nachlass auf die Position”, and lead back with one click. There too is the box “Where do the entries come from?” with “Set condition …” (see If and Else: different entries depending on the document); the fixed entries of such a list also open in the window, with the breadcrumb “Fixed entry”.
- **Apply and Cancel.** “Apply” takes the fields into the working copy of the assignment window. “Cancel”, the cross, Esc and a click next to the window discard only what you changed in this window; if something has changed, the designer asks “Discard the changes in this window?” with “Discard”. As always, it is stored only with “Apply” in the assignment window and saving the template.
- **Jumps.** The search, “to the entry ›” in the result of the check and “*n* to look at ›” open the right tab and the list, choose the right part and open the window with the entry marked (for a fixed entry its window; for a fixed entry in a list per row the box of the list in the pop-up, with all its entries). Which part it is is decided by the order of the check: the first one that has the entry; for an entry that the check reports as missing, the first one that lacks it. If a check rule names a list, such as ST-BG-3 the list “Preceding invoice”, “to the entry ›” leads to that list.

#### If and Else: different entries depending on the document

Some lists get something different depending on the document: a cancellation invoice names the canceled invoice, a final invoice every partial invoice, an ordinary invoice none. Conditions exist for this. Without a condition, the box “Where do the entries come from?” has one part, “Always”; whatever is in it, the list gets with every document. The ⓘ at the heading of the box explains everything else.

1. Below the part “Always”, click “Set condition …”.
   → The part is now called “If” and keeps what it had. Next to it is the condition builder for the condition, as you know it from “Only if …”, on the right “Remove condition”. Below it is “Else”, empty at first: “No entries — in this case the list stays empty. Choose a source above if it should get something here.” As long as you have not built a condition, “If” applies to every document; a sentence in the part says so.
2. Build the condition, such as “Rechnungstyp is equal to Schlussrechnung”.
3. If the list should get something in the remaining cases, choose “Rows from a rule” or “Fixed entries” in “Else”. A second click on the pressed button makes “Else” empty again.
4. For a further case, click “Set condition …” again below “Else”.
   → “Else” becomes “Else if” with a condition of its own, and below it there is a new, empty “Else”.
5. Assign the fields: “Edit fields …” on the rule of a part opens the window for that rule (see The fields of a list); a fixed entry has its window as everywhere.

- **The first part that applies wins.** The parts are checked from top to bottom; if no condition applies, “Else” applies. A part without a condition applies to every document; the parts after it and “Else” then never come into play. The part points this out, and after saving the message “Warning: …”, such as “Case 2 has no condition and therefore always applies; …”.
- **Removing a condition.** “Remove condition” takes the part out. If it delivers something, the designer asks beforehand “Remove the condition and the part? What the list gets in this case will be lost.” If it is the only part with a condition and “Else” is empty, its content becomes “Always” again: that takes back “Set condition …”. A different order of the parts comes about by removing parts and creating them anew.
- **Every part has a source:** a rule or fixed entries, chosen with the two buttons at the top of the part (see Where the entries come from). A new part “Else if” begins with “Rows from a rule”. A fixed entry keeps its own “Only if …”. On the rule of a part there is no “Only if …”; the condition of the part decides.
- **The condition reads your data, not the e-invoice.** It queries fields of the record, also through lookups, and your own variables; for a list per row, the fields of the row above it. The condition builder does not offer entries of the e-invoice. For a cancellation invoice, you therefore query the field or the variable from which “Invoice type” comes, such as the invoice type, not the “Invoice type” itself.
- **Create cases from »Invoice type«.** Next to “Set condition …”, for a list in the section itself, such as “Preceding invoice”, there is the button “Create cases from »Invoice type«”. For credit note (381), corrected invoice (384), partial invoice (875), partial final invoice (876) and final invoice (877), it creates one part “If …” or “Else if …” each before “Else”, as far as your assignment delivers this code, with exactly the condition by which your template determines the invoice type: with the conditions of the if-then, with the variable, or with the field and its translation. What was in the part “Always” before becomes “Else”. The content of the new parts stays empty; you fill it yourself afterwards. The names of the codes are named by the tile of the list, such as “5 cases »Credit note, …«”. A second click does not create anything twice. If the invoice type is fixed or it cannot be read off which codes it delivers, a sentence says why there is nothing to create. For lists per row the button does not exist.
- **Same rule, same fields.** If a part without fields gets the same rule as another part of the list, it takes over its field assignment, first from the next part above it. You change only what differs, such as the signs for a credit note.
- **Turn into a case.** If the rule of “Always” or “Else” has an older “Only if …”, “Turn into a case” turns it into a part “If …” or “Else if …” with the same condition, the rule including fields and a copy of the fixed entries, after the existing parts; “Else” keeps the fixed entries. “Set condition …” does the same on this part. The e-invoice stays as it was. The message at the top has “Undo”.
- **Queries.** Every rule of a part is an ordinary rule of your template and is loaded with every document, even if its part does not apply: which part applies becomes known only from the data. A rule costs at most one query, none if the document already uses it. A lookup, such as to the canceled invoice, is joined into the query from which it is read: in a fixed entry and in the condition of a part into the query of the record (for a list per row, into the query of the row above it), in the fields of a rule into the query of that rule. It can cost further queries, for example from ten links on (see Where the entries come from).
- **An empty mandatory list.** If a mandatory list gets no entries in a part, that part says “In this case the list gets no entries; but it is mandatory.”, for an empty “Else” “If none of the cases applies, the list stays empty; but it is mandatory.” This is a note, also when saving, not an error: whether a list stays empty becomes known only on the document. If it stays empty there, no e-invoice is produced, as with any empty mandatory list.
- **The numbers.** The button “Edit fields …” shows “*n* open” for the mandatory entries in the fields of this part that have nothing assigned yet; in the window itself, “open” appears on the individual entry. The tabs, the bar and the template check when saving count as before: mandatory entries in the header and mandatory lists; a list with conditions counts as assigned there.

An example for the list “Preceding invoice”, if your invoice has a choice field “Rechnungstyp”:

| Part | Condition | Entries |
|---|---|---|
| If | Rechnungstyp is “Gutschrift” or “Rechnungskorrektur” | A fixed entry “Bezug” with number and date of the invoice that the document refers to, from the lookup to the reference invoice. |
| Else if | Rechnungstyp is “Schlussrechnung” | Rows from the rule “Abschläge”: one entry per partial invoice with number and date. |
| Else | no condition applies | no entries (“Else” stays empty) |

A cancellation invoice gets the entry from “If”, a final invoice the partial invoices from “Else if”, an ordinary invoice no entries and no note either, because the check rule ST-BG-3 requires the previous invoice only for the codes 381, 384, 876 and 877.

> **Good to know:** A template with conditions on a list (in the template format they are called cases, `faelle`) requires a Smart Templates that knows cases, in the designer as well as in Dynamics. An older version rejects the key `faelle` as unknown: no document is then produced instead of a wrong one. So keep designer and plugin together at the new version.

#### The line items

The line items appear in the window “Edit fields …” like a table (see The fields of a list): on the left the entry, in the middle the value per row, on the right the example from row 1 (columns “Entry”, “Value per row” and “Example (row 1)”; if the list has cases, the column is called “Example”). Every row has the same selection field and the same status as an entry in the header (see Choosing a value); the explanation of an entry is shown by the mouse pointer on its name. Every entry is in the table, in the order of the standard, mandatory and optional mixed; the red asterisk shows what is mandatory. A “Mandatory if …” whose condition cannot apply to your template appears without an asterisk.

[Image: The list “Positionen” of an XRechnung in the assignment window. At the top the box “WHERE DO THE ENTRIES COME FROM?” with the checked “Rows from a rule”, the selection field “Rule Positionen” and gray “The same rule as the table in the document — its query already exists.”, below it “Fixed entries” (not checked) with the button “Entry” and a gray sentence on the order. Under “ENTRIES PER ROW — RELATIVE TO ONE ROW OF THE RULE; EXAMPLE FROM ROW 1” the column bar: “A click on a field assigns it to: Positionsnummer”, under “COLUMNS OF THE RULE” (with ⓘ) the fields Positionsnummer, Produktname, Menge, Einheit · Name, Einzelpreis, Steuersatz, “ƒ Netto” and “ƒ NettoPositiv” and the button “Column (rule variable) …”, under “FROM THE MAIN RECORD” the custom variables Nettosumme, Zahlbetrag, KopfSteuersatz, KopfZuAb and Belegart and the button “Field of the main record …”. Below it the table with the columns “ENTRY”, “VALUE PER ROW” and “EXAMPLE (ROW 1)”: Positionsnummer (marked, field Positionsnummer, 1), Menge (6), Einheit (field Einheit · Name, Stunde (HUR)), Positionsbetrag netto with “If-then 1 branch · else ƒ Netto” and below it “if @Belegart equals 100000001 → ƒ NettoPositiv”, example 570,00, Einzelpreis netto (95,00), Steuerart der Position (fest Normalsatz, Normalsatz (S)), Steuersatz der Position (“Mandatory if … except for »nicht steuerbar«”, 19) and Artikel oder Leistung (Einrichtung Smart Templates). At the very bottom “▸ 4 more become mandatory only if …”.]
Caption: The line items of an XRechnung. The box “Where do the entries come from?” is in the list, the column bar and the table in the window “Edit fields …”. The line item amount net is made positive for a credit note. You convert the unit price net the same way, otherwise no document is produced for the credit note (see Credit note with positive amounts).
- Image marker 1: In the box: the rule of the list, here the same as the table in the document.
- Image marker 2: In the box: what the rule costs; here its query already exists.
- Image marker 3: In the window “Edit fields …”: the columns of the rule, also rule variables with “ƒ”.
- Image marker 4: “Column (rule variable) …” creates a variable on the rule.
- Image marker 5: From the main record: the custom variables, here also “Belegart”.
- Image marker 6: “Field of the main record …” turns a field of the invoice into a custom variable.
- Image marker 7: The table: one row per entry with value and example from row 1.
- Image marker 8: An if-then in a row compares with the code of the Belegart.

Above the table is the column bar with the fields that a line item row can read. Click an entry in the table to mark it; at the start the first open mandatory entry is marked, and the bar names it (“A click on a field assigns it to: …”). A click on a field assigns it to the marked entry.

- **Columns of the rule:** the fields that the table in the document shows on this rule, those already assigned and the rule variables, these with “ƒ” in front, such as “ƒ Netto”. A field that does not match the type of the marked entry is locked (“Does not match the type of this entry.”). You choose further fields of the row via “Choose a field or variable …”. “Column (rule variable) …” creates a variable on the rule, calculated per row, and assigns it to the marked entry, such as a positive amount for the credit note (see Creating a variable).
- **From the main record:** A line item row does not see the fields of the invoice by itself, just as little as a table row in print does. It reads the custom variables, with the same value in every row; they are available to choose here. “Field of the main record …” turns a field of the main record into a custom variable, named like the field. It then appears under “From the main record” and in the conditions to choose; it is not yet assigned with that: a click on it in the bar assigns it to the marked entry. If a custom variable already reads exactly this field, Smart Templates takes that one. For a choice field such as the Belegart, the variable remembers the code, not the label, which differs per language. In a condition you therefore compare it with the code; the row below shows this as, for example, “if @Belegart equals 100000001 → ƒ NettoPositiv”. The same button is at the bottom of the picker of an entry (“Choose a field or variable …”); there it inserts the new variable right at the entry.
- **Via the lookup of the row:** If the row has a lookup to the invoice, under “From the main record” there is one button per lookup that opens its fields. That is a join in the query of the rule and counts against the limit of ten links per query. If the row has several such lookups, the bar says so: “The row has 2 lookups to the main record. Take the one that points to the printed invoice …”. Another lookup may point to a different invoice.

On the rule of the line items there is no “Only if …”. Differences per document, such as for a credit note, are in the if-then of the individual entries or in parts with a condition (see If and Else: different entries depending on the document). If an older template still has a condition there, it appears in gray with the sentence “Older assignment: the line items only come if this condition applies — it is still evaluated that way. …”. “Remove condition” takes it out; that changes the e-invoice, and afterwards the line items come with every document. “Undo” in the message at the top takes it back. Nothing is rebuilt by itself. “Turn into a case” turns the condition into a part “If …” and leaves the e-invoice as it was.

> **Good to know:** Without “Only if …” on the rule, the line items cannot be switched off for individual documents by a condition on the rule, for example for a partial invoice that should carry a row “Abschlag” instead of the line items. There are three ways to do this: a part “If …” (see If and Else: different entries depending on the document) with the condition for the partial invoice and the fixed entry “Abschlag”, while the rule of the line items stays under “Else”; a template of its own for partial invoices; or a rule of its own just for the e-invoice, whose filter lets no row through for a partial invoice, and in addition the row “Abschlag” as a fixed entry with “Only if …”. A rule of its own can cost further queries. Existing templates with a condition on the rule continue to work as before.

#### Credit note with positive amounts

A credit note (invoice type 381) needs positive amounts in the e-invoice. If Dynamics stores it with negative amounts, you convert all entries involved together by if-then, each for the same case “Belegart is Gutschrift”. In the header, you choose the credit note “by option value” among the options of the choice field; in the line items, you read the Belegart through a custom variable from the main record and compare with the code of the credit note, such as “@Belegart equals 100000001” (see The line items):

- in the **line items** the “Line net amount” and the “Net unit price” (or the “Quantity”), each via a rule variable that flips the sign (“Column (rule variable) …”),
- in the **header** the “Sum of line net amounts”, the “Total without VAT”, the “Total VAT”, the “Total with VAT” and the “Amount due”, each via a custom variable,
- under **“VAT per rate”** the “Taxable amount of this rate” and the “Tax amount of this rate”, via rule variables on its rule,
- and the “Invoice type” itself: 381 instead of 380.

For the line items and for the taxes, it also works through conditions on the list: “Set condition …” turns the part with the rule into a part “If” for the credit note; if you give “Else” the same rule, “Else” takes over the fields, and in the part of the credit note you change only the fields that flip the sign (see If and Else: different entries depending on the document). The totals in the header remain entries with if-then, because such conditions exist only for lists.

If you flip only the line item amount, the amounts no longer match each other: the unit price stays negative, quantity times price no longer gives the amount, and the totals in the header do not match the line items. No document is then produced, and the message names the arithmetic check that does not add up. With XRechnung, a credit note document of its own is created automatically for the credit note.

#### A fixed entry

“Entry” and “Edit fields …” in the row of an entry open the window for a fixed entry. It shows all entries of the list, each in a row as in the assignment window, in the order of the standard; the red asterisk shows what is mandatory, and the example is that of the standard. The name appears only in the window and in the list, not in the e-invoice. The cross after an entry removes it after a confirmation prompt. If there is something at the entry that Smart Templates does not know, such as “Wenn” instead of “wenn”, a red note says so (see “Only if …”).

[Image: The window “New fixed entry” with a cross at the top right. It names the list “Steuer je Steuersatz” and has the field “Name (only for this window)” with the value “19 %”. Below it a dashed box “Only if …” with an ⓘ, the marker “always” and the button “Set condition …”. Then follow five rows, each with an entry and a selection field: “Steuerbetrag dieses Steuersatzes” (mandatory, still open), “Nettobetrag dieses Steuersatzes” (mandatory, still open), “Steuerart dieser Zeile” (mandatory, fest “Normaler oder ermäßigter Steuersatz”), “Grund der Steuerbefreiung (Text)” (“Mandatory if …”) and “Steuersatz dieser Zeile” (“Mandatory if … except for »nicht steuerbar«”, fest “19”). Below it “▸ 3 further optional entries”. At the bottom right “Cancel” and “Apply”.]
Caption: A fixed entry for a tax rate, created with “One tax rate”.
- Image marker 1: The name only helps with finding it again.
- Image marker 2: “Only if …”: without a condition, the entry is present on every document.
- Image marker 3: The red asterisk shows the mandatory entries. Here the tax amount and the net amount are still missing.
- Image marker 4: “Mandatory if …”: only needed if the condition of the standard applies.
- Image marker 5: The optional entries are there too, in the order of the standard; nothing is collapsed.

Lists in a fixed entry, such as an allowance for this row, cannot be assigned here yet. For that, use a rule as the source of the list.

### Countries and units

Countries and units appear in the e-invoice as fixed codes: DE for Germany, H87 for piece. Smart Templates usually recognizes what is in your data by itself, such as country names in German and English and common abbreviations like “Stk.” or “Std.”. Both supplied standards recognize the same spellings for countries, units and currencies. The country names come from Unicode CLDR. The button “Countries and units …” at the top of the window, next to “Apply suggestions”, shows the values from the sample record with their code; if values still need a choice, the yellow number on the button names how many, such as “2 ?”.

[Image: The assignment window of a ZUGFeRD template with the section “Countries and units” (on the left with the yellow number “2 ?”). The head names “Countries and units” with an ⓘ and explains that the e-invoice writes countries and units as fixed codes and that Smart Templates recognizes common spellings itself. The box “COUNTRIES — VALUES FROM THE SAMPLE RECORD” has the columns “Value in the record”, “Becomes in the e-invoice” and “Status”: “D” (Land) → selection field “Choose country …”, status “? unknown”. The box “UNITS — VALUES FROM THE SAMPLE RECORD” shows three rows: “Stdn” (Positionen › Einheit) → “Stunde HUR”, status “set by you” with a cross; “Stk.” → “Stück H87”, status “✓ recognized”; “Kiste” → selection field “Choose unit …”, status “? unknown”. Below it in gray: common units appear with names, all others as a code with search; and a document with an unknown value stops with a message that names the value.]
Caption: Countries and units from the sample record.
- Image marker 1: A country that Smart Templates does not recognize. You choose it once from the list.
- Image marker 2: Recognized: the value was already a common spelling.
- Image marker 3: Set by you. The cross takes the setting out again.
- Image marker 4: A unit that Smart Templates does not know.
- Image marker 5: The number with a question mark names the values that still need a choice; it appears on the button “Countries and units …”.

For an unknown value, you choose the right code once. The selection shows the common countries or units first, then all from A to Z, with a search box. The setting then applies to every document of this template. If a value appears later that neither Smart Templates nor your settings know, the document stops with a message that names the value. Nothing is ever guessed. Settings that the sample record does not show at the moment are under “Further settings of this template” and can be removed there.

### Checking with a sample record

The check runs with the part of Smart Templates that later produces the e-invoice: with the template as it currently stands in the window, even unsaved, and the data of the sample record. You start it with “Check with sample record” in the tab or in the footer of the assignment window, afterwards with “Check again”. After “Apply suggestions” and when the window is opened, as soon as there is a sample record, it runs by itself. “Check again” stays where you are: the findings appear at the entries and as red numbers on the tabs, at the top there is a line with the result, such as “With this record no document is created. 3 mandatory entries still open › View 2 errors ›”. Everything is collected under the “Check” tab on the right, heading “Result of the check”.

[Image: The assignment window “Assign e-invoice – XRechnung 3.0” with the section “Result of the check”. At the top the full bar “29 of 29” and “2 to look at ›”. The “Sample data of the draft” tab carries “3 errors · 1 note”, next to it the grayed-out button “Record”. A red box says “With this record no document is created.” and explains that a button, an email or a flow stops with the message and that no normal PDF is produced either. Below it the group “MISSING (2)” with “Referenz des Kunden (bei Behörden: Leitweg-ID) (Kunde): empty on the record” and “Elektronische Adresse des Kunden (Kunde): empty on the record”, each with “To be fixed by whoever maintains the record.” and “to the entry ›”. The group “DOES NOT FIT (1)” says that “Kiste” in line item 3 is not a valid code of the list EINHEIT. The group “NOTE (1)” asks for the delivery date or a service period. On the left, “Kunde” shows “2 errors”, “Positionen” “1 error”, “Countries and units” the yellow number “1 ?” and “Result of the check” red “3 errors”.]
Caption: The result of a check with errors.
- Image marker 1: The box summarizes: with this record no document is created.
- Image marker 2: “Missing”: mandatory entries that are empty on the record, not set up in the template, or deliberately without a value for this case by if-then.
- Image marker 3: “Does not fit”: values that the standard rejects, and arithmetic checks that do not add up.
- Image marker 4: “Note”: the document is produced anyway.
- Image marker 5: “to the entry ›” jumps to the entry and expands its row.
- Image marker 6: The red number on the tab names open mandatory entries and errors of this check together.
- Image marker 7: The sample record with its result; “Record” next to it adds a further one in Dynamics (see Up to three sample records).

#### Reading the result

- **Red** are errors. With this record no document would be produced: neither by button nor by email or flow, and no normal PDF either. The groups are called “Missing”, “Does not fit” and “PDF with e-invoice”. The last names the reasons why the PDF/A cannot be produced (see The PDF with embedded e-invoice).
- Mandatory entries that have nothing assigned yet are in gray under “Still open”, also a “Mandatory if …” whose condition applies to your template. As long as such entries are open, the check when opening and after the suggestions names only their number and, if there are any, the real errors, such as “3 mandatory entries are still open, plus 11 errors. Then check with the sample record.” It shows the red box “With this record no document is created.” as soon as you have run a check yourself in this window or nothing is open any more.
- **Yellow** are notes under “Note”. The document is produced anyway. This includes the note of the template check on an if-then with a branch without a condition, behind which further branches or “ELSE” follow, such as “Branch 1 has no condition and therefore always applies; »else« is never reached. If that is not intended, add the condition.” (see If-then on an entry). ST-BG-3, the own check rule of Smart Templates, is also a note: “For a cancellation, corrective or final invoice, the previous invoice is missing (own check rule of Smart Templates, not a rule of the standard).” The message names the invoice type and the list “Preceding invoice”; “to the entry ›” leads to this list, at whose head the same note appears (see Lists).
- **Green** means: “All there — with this record the e-invoice is created.” Below it is the file name, and for a credit note under XRechnung also “A credit note document is created.”
- Every row says who has to act: “To be fixed by whoever maintains the record.”, “To be fixed by whoever maintains the template.”, “Please have the assignment checked.” or, for an error in the program, “An error in Smart Templates — please report it.”
- “Do the amounts add up?” appears before the rows of the arithmetic check. It compares the totals the way the standard requires, for example: total tax equals the sum of the tax per rate. The message names the entries involved with their values.
- If “Only if …” does not apply to the record, it says: “»Only if …« does not apply to this record. The document is created as before, without e-invoice.”
- Collapsed it says “✓ *n* entries have a value” with the list of the values that the e-invoice gets.
- Entries changed since the last check show “Example: — (changed, please check again)”. A yellow strip says so too; “Check again” shows the new state.

With two buttons below the result you take the e-invoice with you straight away: “Download e-invoice as file” saves the XML as soon as it is valid, even if the PDF/A still fails; “View PDF with e-invoice” (with “e-invoice only (XML)” with a reading copy “View PDF (reading copy)”) shows the PDF with the assignment from the window, not yet applied.

#### Up to three sample records

Up to three sample records can be checked side by side, such as an invoice, a partial invoice and a credit note. Each has its own tab with its result; the cross on the tab takes it out. The red numbers on the tabs, also on “Check”, count the errors of the chosen sample record; if you choose another tab, they count its errors. In Dynamics the button “Record” adds one, “Samples …” in the footer opens the check view. The records are remembered with the template. Without any of your own, the sample record of the template applies (see Template settings: Sample record).

[Image: The assignment window “Assign e-invoice – ZUGFeRD 2.5.2 (EXTENDED)” in the section “Result of the check”. At the top three tabs side by side: “R-2026-0042 · Rechnung” (chosen, red “1 error”), “R-2026-0051 · Abschlagsrechnung” (“all there”) and “R-2026-0047 · Gutschrift” (“all there”), each with a cross. Below it the sentence “Up to three sample records — for example an invoice, a partial invoice and a credit note. They are remembered with the template.”. A red box “With this record no document is created.”; then “DOES NOT FIT (1)” with “Einheit, Position 3: »Kiste« is not a valid code (list EINHEIT) …” and “to the entry ›”. Below the collapsed line “✓ 37 entries have a value” are the grayed-out button “Download e-invoice as file” and the button “View PDF with e-invoice”. In the footer it says “Sample record:” with the three names and the button “Samples …”.]
Caption: Three sample records: an invoice with an error, a partial invoice and a credit note without errors.
- Image marker 1: The chosen tab shows its result below it.
- Image marker 2: The cross takes a sample record out.
- Image marker 3: As long as the e-invoice itself has an error, downloading the file is locked.
- Image marker 4: The PDF can still be viewed.

#### Full preview and PDF

In Dynamics, “Full preview” and “PDF” show the PDF with e-invoice when the e-invoice is turned on and everything is valid. If there are gaps, the preview is milder than a button: it shows the PDF without an e-invoice and a warning that names the reason. The warning is in English in the message “Warning: …” and begins with “e-invoice: the PDF was made WITHOUT e-invoice” (see Full preview and PDF: With e-invoice). A button, an email and a flow, in contrast, stop.

#### When saving

If the template has the e-invoice turned on, the designer checks after saving whether all mandatory entries are assigned. If something is missing, a message appears at the top such as “Warning: For the e-invoice 1 assignment is still missing: Contact telephone. You can save anyway; documents with e-invoice are only created once everything is assigned.” Entries that are mandatory only under a condition are also named if the condition certainly applies to the template. In addition come notes on the conditions of a list: a part without a condition and a mandatory list that gets no entries in a part or in “Else” (see If and Else: different entries depending on the document). The template is saved in any case.

[Image: A message card with an orange border and a warning symbol: “Warning: For the e-invoice 1 assignment is still missing: Contact telephone. You can save anyway; documents with e-invoice are only created once everything is assigned.” At the top right a cross.]
Caption: The message after saving.

### When no e-invoice is produced

Smart Templates checks strictly: an e-invoice is produced only if it is complete and consistent. Otherwise nothing is produced at all, neither the e-invoice nor a normal PDF nor a reading copy. Button, email and flow stop with a message; it appears in the window “Smart Templates — canceled”, in the error of the action or, with the email, in the sentence “The document could not be built: …”. The message comes in the language of your Dynamics interface: German with any German setting, otherwise English; here the English sentences are given. It names the entries in everyday language and says who has to act.

The message begins like this:

- “The e-invoice cannot be created – one entry is missing:” or “– 3 entries are missing:”, followed by one row per entry, such as “Invoice date (Invoice): empty on the record”,
- “The e-invoice cannot be created – the amounts do not add up:”, followed by the arithmetic check with the entries involved,
- “The e-invoice cannot be created:”, when the reasons are mixed, such as an invalid code or a negative unit price,
- “The PDF with embedded e-invoice (PDF/A-3) cannot be created:”, when the PDF would not be valid (see The PDF with embedded e-invoice).

At the end it says what to do: “Please complete the entries on the record.” or “Please have the template adjusted under »Template settings › E-invoice«.” For an error in the program: “Please report this to the vendor of Smart Templates.”

The common reasons:

| Reason | What helps |
|---|---|
| **empty on the record**: The entry is assigned, but the field is empty on the record. | Fill in the field on the record. |
| **not set up in the template**: Nothing is assigned to the entry. | Assign something in the assignment window. |
| **the template provides no value for this case (if-then)**: For this document, a branch without a value applies in the if-then of the entry, or “ELSE” is empty. | Check the if-then of the entry (see If-then on an entry). If no e-invoice should be produced for such documents, exclude them under “Only if …” at the switch. |
| A condition in the if-then cannot be read or names a custom variable that does not exist, also in a branch that does not apply to this document. | Correct the condition in the assignment window. |
| The same applies to the condition of a case: it cannot be read or names a variable that does not exist, also for a case that is not chosen for this document. It is likewise an error if a case carries an unknown key, has cases itself or `faelle` is not an array. | Look at the red note on the case or the list and fix it (see Problems and messages: E-invoice). |
| A mandatory list stays empty because no condition applies and “Else” is empty. | Give the part or “Else” a source (see If and Else: different entries depending on the document). |
| A value has the wrong format, such as a date “2026-02-30” or a number with text. | Correct the value on the record. |
| A unit price is negative. | A reduction is entered as a negative quantity or as an allowance. |
| A code is invalid, such as a unit or a country that Smart Templates does not know. | Correct the value or set it with “Countries and units …”. |
| The amounts do not add up. | Check the assigned totals and taxes. |
| The rule of a list leaves out rows, or the query reaches the limit of 20,000 rows. | Take the limit out of the rule or narrow the amount of data with a filter. |
| The standard does not exist in this environment. | Upload your own standard. |
| The PDF/A cannot be produced (character, image, font). | Replace the character, save the image as RGB, choose another font. |

The complete wording of the messages and how to fix them is shown in Problems and messages: E-invoice.

### Button, email and flow

Button, email and flow deliver what is set in the template. There is no setting of its own for this on the button.

| Template setting | Button “Create and display the document” | Button “Download e-invoice” | Email |
|---|---|---|---|
| no e-invoice, turned off or “Only if …” does not apply | The document in the tab, as before. | No file; the button gives the reason. | The PDF, as before. |
| ZUGFeRD, “PDF with embedded e-invoice” | The PDF/A-3 in the tab. It is the e-invoice. | The XML alone as a file, the `factur-x.xml` from the PDF. | One attachment: the PDF with the XML in it. |
| “e-invoice only (XML)” | The XML as a file to save. No PDF is produced; the tab that opens on the click closes again right away. | The XML as a file. | One attachment: the XML. |
| “e-invoice only (XML)” with reading copy | The PDF in the tab and the XML as a file. | The XML as a file. | Two attachments: the XML and the PDF. |
| Error of the e-invoice | The button, the email or the flow stops with the message from the core. No document, no reading copy and no email is produced. |   |   |

#### The button

In the assistant “Manage buttons in Dynamics” there is the purpose “Download e-invoice”, but only if the open template has an e-invoice turned on. It delivers only the XML, with ZUGFeRD the XML that is otherwise embedded in the PDF. The PDF is not produced for it. The button asks for no flow: no flow is triggered. It checks like printing; if an entry is missing, no file is produced, and the window says what is missing (see Buttons: the assistant: What should the button do?).

[Image: The window “Manage buttons in Dynamics” in the step “What should the button do?” for a template with an e-invoice. Below the question there is an explanatory text: the first three produce the same document, the fourth delivers only the e-invoice as an XML file. Four cards are stacked. “Create and display the document” is chosen (blue border) and at the end carries the note that this template delivers its e-invoice as an XML file, that no PDF is produced and that the tab that opens on the click closes again right away. Then follow “Prepare an email and present it”, “Send email immediately” and, with a green symbol “XML”, “Download e-invoice”. At the bottom “Step 5 of 7”, “Back” and the blue button “Next”.]
Caption: The purpose step of the assistant for a template with an e-invoice.
- Image marker 1: The fourth card appears only if the template has an e-invoice turned on.
- Image marker 2: The card “Create and display the document” says what this template delivers.
- Image marker 3: The explanatory text names the difference of the fourth card.

You create the button in the command designer like any other (see Adding, changing and removing a button). As the function, the instructions enter `SmartTemplates.Button.downloadEInvoice`, for all checked rows `SmartTemplates.Button.downloadEInvoiceAll`. What the user sees on the click and which messages there are is described under What happens on click: The e-invoice.

**Several invoices at once.** With “All checked rows, one after the other”, all e-invoices come in **one** ZIP file, such as `E-Rechnungen_2026-10-23_1405.zip` (with an English Dynamics interface, with an English name). What fails is named by the message at the end with its place among the checked rows; the others are still in the ZIP file.

#### The email

The email purposes attach what the table above names. The email template supplies subject and text as usual (see Buttons: the assistant: Email template). If something is missing from the e-invoice, no email is produced: “The document could not be built: The e-invoice cannot be created – … — no email was created.”

#### The flow

A flow that the designer creates builds the document in the step “Beleg erzeugen” (see Flows: The scaffold of the created flow). With “e-invoice only (XML)”, the XML comes in the output `XmlBase64` and its name in `XmlFileName`; the output `PdfBase64` is then the reading copy or empty. Whoever needs only the XML calls the action `st_GenerateEInvoice` (see Actions and APIs: E-invoice). An error of the e-invoice makes the step fail; the sentence from the core is in the error message.

### Own standards

In addition to the two supplied standards, you can upload your own, such as an annotation file that explains individual entries differently for your recipient or carries additional rules. You open the window “Standards for the e-invoice” in the “E-invoice” tab with “Manage standards …”. How such an annotation file is built is described in Own standards for the e-invoice.

At the top of the window there are short instructions. You need a standard of your own if your recipient requires a different format or a different version than the supplied ones. It goes in as a file (`.xsd`) or as a package (`.zip`), as described under Uploading a standard. The easiest way is to start from a supplied standard: you save it with “Save as file”, give it an ID of its own in the file (the IDs of the supplied standards are locked), adapt the file and upload it again. As soon as the manual is available online, the link “Read in the manual” also appears below the instructions; it opens the page Own standards for the e-invoice.

[Image: The window “Standards for the e-invoice” with a cross at the top right. At the top a gray box with the instructions: you need a standard of your own if your recipient requires a different format or a different version; supplied standards cannot be changed; you upload one of your own with “Upload …” as a file (.xsd) or package (.zip); the easiest way is via “Save as file”, an ID of its own, adapting and uploading again. A table with the columns “Name”, “Version”, “Valid”, “Origin” and “Output” has three rows: “XRechnung 3.0”, 3.0.2, from 01.02.2024, with a lock “supplied”, “XML only”; “ZUGFeRD 2.5.2 (EXTENDED)”, 2.5.2, from 01.09.2026, with a lock “supplied”, “PDF with e-invoice or XML only”; “Muster-XRechnung”, 1.0, from 01.02.2024, yellow “Own standard – not checked by Smart Templates”, “XML only”. On the right in each row “View” and “Save as file”, in the own row additionally red “Delete”. Below it the box “An AI can build your own standard for you” with an ⓘ, three numbered steps and the button “Open AI package …”. At the bottom left “Upload …” with an ⓘ, at the bottom right the blue button “Close”.]
Caption: The standards: two supplied and one of your own.
- Image marker 1: Supplied standards carry a lock.
- Image marker 2: Own standards carry the note “not checked by Smart Templates”.
- Image marker 3: “View” shows all entries of the standard with their explanations.
- Image marker 4: “Save as file” saves the annotation file (.xsd) of the standard.
- Image marker 5: “Delete” exists only for own standards.
- Image marker 6: “Open AI package …” opens the AI package with the checkbox for the standard checked (see Having an AI build your own standard).
- Image marker 7: “Upload …” uploads your own standard.

- **View** shows all entries of the standard by section, with explanation, marker and search box, as a reference. It changes nothing.
- **Save as file** saves the annotation file of the standard as `kennung-fassung.smart-templates.xsd`. It is the best starting point for an adaptation of your own.
- **Delete** asks for confirmation: “Delete the own standard »…« (version …)?” If the open template uses it, it says that its e-invoice is then no longer produced until it is uploaded again. The window does not know of other templates that use it. Supplied standards cannot be deleted.

#### Uploading a standard

“Upload …” opens the window “Upload own standard”. Choose an annotation file (`.xsd`) on a supplied schema set or a package (`.zip`) with its own schema set. Smart Templates checks the file completely before it saves anything. If everything fits, it says “Saved: …” there, and the selection knows the standard. If something does not fit, the locations are listed.

[Image: The window “Upload own standard” with a cross at the top right. A gray box carries the sentence “Uploaded annotation files are not part of Smart Templates. Whoever uploads them is responsible for their content and rights.” Below it the field “File” with an ⓘ, the button “Choose file” and the shortened name “muster-ka…plates.xsd”, a gray sentence on the permitted files and the unchecked box “Replace the same version if it already exists”. A red box says “Not saved — 2 errors:” and lists, under the location “anmerkung.xsd, line 89, column 8”, two findings: in the path /ubl:Invoice/cbc:Rechnungsnummer the step cbc:Rechnungsnummer does not exist, and a mandatory element is without a value (/ubl:Invoice/cbc:ID). Below it the button “Copy locations” and a gray note that everything is checked completely before anything is saved. At the bottom “Cancel” and the blue button “Upload”.]
Caption: A faulty file: nothing is saved, the locations are listed below.
- Image marker 1: The note on content and rights is always there.
- Image marker 2: The chosen file.
- Image marker 3: With the checkbox, the file replaces an existing identical version.
- Image marker 4: Each row names the location (file, line, column) and the finding.
- Image marker 5: “Copy locations” puts the findings on the clipboard.

- **Same version.** If ID and version already exist, the designer asks in the window “Replace standard?”: “This standard already exists here (…). Replace it with the uploaded file?” The checkbox “Replace the same version if it already exists” answers the question beforehand.
- **Supplied IDs** are locked: a standard of your own cannot replace a supplied one.
- **Size.** A package may be at most 768 KiB when packed.
- **Rights.** Uploading and deleting needs the security role “Smart Templates Designer” (see Rights and roles: Designing templates). Without it, the upload stops with a sentence that names the right on the table “st_erechnungstandard” (displayed it is called “Smart Templates E-Rechnungsstandard”).

> **Caution:** Uploaded annotation files are not part of Smart Templates. Whoever uploads them is responsible for their content and rights.

#### Having an AI build your own standard

Below the list is the box “An AI can build your own standard for you”. You do not have to write the annotation file yourself:

1. Create an AI package with the checkbox “Include the e-invoice standard”. The button “Open AI package …” in the box opens the window “AI package” with the checkbox already checked (see Working with an external AI: The settings in the “AI package” window).
2. Give the file to an AI and ask it **expressly** to write a standard of your own. Say what your recipient needs differently. The AI does not deliver one on its own.
3. Bring the answer back with “Upload AI changes”. The standard comes along: the designer asks first, uploads it and checks it completely in the process, as described under Uploading a standard (see Working with an external AI: Taking over the AI’s answer). After that it appears among the standards.

A standard written by the AI is also a standard of your own: it needs an ID of its own (the IDs of the supplied standards are locked; if the AI has used one of them, ask it for one of its own), it carries the note “Own standard – not checked by Smart Templates”, and the note above applies to its content and rights.

### Assigning with AI

You can leave the assignment to an AI. The fastest way is the box “The AI can fill in the assignment for you” at the very top of the “E-invoice” tab of the template settings. It is also there as long as the e-invoice is still off: the AI can turn it on if you tell it to.

[Image: A gray box with the heading “The AI can fill in the assignment for you” and an ⓘ, below it the sentence “It knows the entries of the standard and the fields of your template. Afterwards you see the result in the assignment window and check it with a sample record.”. Two white buttons follow: “Open AI assistant” with a speech bubble and “Download AI package” with an arrow pointing up. At the bottom a line with four steps connected by small arrows: “Switch on” and “Choose standard” with a gray check mark, “3 Assign entries, yourself or with the AI (1 of 14)” outlined in blue and “4 Check with sample record”.]
Caption: The box in the “E-invoice” tab, as it looks in Dynamics.
- Image marker 1: “Open AI assistant” exists only in Dynamics.
- Image marker 2: “Download AI package” opens the window “AI package” with the checkbox for the standard checked.
- Image marker 3: The step you are at is outlined in blue; the number is the same as on the bar.

- “Open AI assistant” opens the AI assistant (Microsoft 365 Copilot) in a window of its own. The template and the task “Assign the mandatory entries of the e-invoice of this template.” are on the clipboard; you paste them there with Ctrl+V and send the message. The assistant works with the saved template, and its change comes into the open template as soon as the template settings are closed. The button exists only in Dynamics; if no assistant is set up there yet, it says so on the click. For a new template it is gray until you have created it with “Create template”; below it then says “The AI assistant is available once the new template has been created with »Create template« – it works with saved templates.”
- “Download AI package” opens the window “AI package” with the checkbox “Include the e-invoice standard” checked, even if the e-invoice is still off. You give the file to an AI of your choice; you bring its answer back with “Upload AI changes”.
- The steps below show where you are: “Switch on”, “Choose standard”, “Assign entries, yourself or with the AI” with the same number as the bar, such as “(1 of 14)”, and “Check with sample record”. A check mark means: done. The last step never gets a check mark, because the template does not remember the result of a check.
- As soon as the manual is available online, the box also contains the link “Read in the manual”; it opens this section.

Both buttons lead to the two ways from Working with AI:

- **AI assistant in Copilot:** It reads the standard with its tool “Standard lesen”, uses the same suggestions as “Apply suggestions” for the Dynamics invoice and asks about what it cannot take from fields, such as the Leitweg-ID or the data of your company (see Working with the AI assistant in Copilot: E-invoice).
- **External AI with the AI package:** In the window “AI package”, check the box “Include the e-invoice standard” and below it check the standards that the AI should work with; ZUGFeRD and the standard of this template are preselected. The entries of the standards then appear in the file with mandatory status, type and common codes, with several standards one section per standard (see Working with an external AI: The settings in the “AI package” window).

Both assign only entries that the standard knows. If a value differs depending on the document, such as the invoice type or the amounts of a credit note, the AI writes an if-then directly onto the entry; calculation is done only in variables (see If-then on an entry). In the line items it uses the rule of the table in the document; if a row has several lookups to the invoice, it asks which one is meant. If a list gets different entries depending on the document, such as the previous invoice for a cancellation and a final invoice, it writes cases, in the window parts “If …” and “Else” (see If and Else: different entries depending on the document). Like any AI change, the change comes into the open template as one undo step. Afterwards, check the e-invoice here with “Check again”. An AI writes a standard of your own only if you ask for it (the way is described under Having an AI build your own standard); how it is built is described under Own standards for the e-invoice.

### The standard EN 16931

The same explanation appears in the “E-invoice” tab under “Standard EN 16931” and in the license enclosure `THIRD-PARTY-NOTICES.txt` (section 10, there also in English):

> **Explanation of the standard:** For e-invoices, Smart Templates implements the semantic data model of the European standard EN 16931-1:2017+A1:2019 and the syntax bindings according to CEN/TS 16931-3-2 and CEN/TS 16931-3-3. Reproduced with the permission of CEN and DIN. CEN and DIN accept no liability for the content or its implementation; in case of doubt, the official texts of the standard, available from DIN, prevail.

### Limits

- Two standards are supplied: ZUGFeRD 2.5.2 in the EXTENDED profile and XRechnung 3.0. There are no further ZUGFeRD profiles and no XRechnung extension. Own standards can be uploaded.
- One standard applies per template.
- There are no attachments as file content. References to documents without a file, that is identifier, description and link, can be assigned. Delivery terms (Incoterms®) are missing.
- Smart Templates calculates nothing itself. You assign totals, taxes and signs from your template; the arithmetic check of the standard checks them.
- Smart Templates delivers the file: as a download, as an email attachment or to a flow. Sending over a network such as Peppol is not part of it.
- The check works with the schema and the rules of the standard, in the designer as well as for every document that a button, an email, a flow or code of your own produces; an error prevents the document. Whether the recipient accepts the file, it cannot promise.
- Lists in a fixed entry cannot be assigned yet; the rule of a list must not leave out rows.
- If-then exists on individual entries, not on groups or sections. A branch chooses a value; calculation is done in variables.
- There is no “Only if …” on the rule of the line items; the line items can be switched off entirely for individual documents with a part “If …” (see The line items).
- Parts with a condition (in the template format cases) exist per list, not per entry and not for the header. A part cannot have parts with a condition of its own, but the lists per row in its fields can. The condition of a part reads your data and your variables, never the entries of the e-invoice.
- Smart Templates gives no legal or tax advice.

### What changes in the document?

**On the canvas:** Nothing. The e-invoice has no object on the sheet, and the sheet looks as it does without it. The assignment is in the template and can be viewed in the template settings. Variables and rules that are created in the assignment window then appear with the variables or in the data tree; they change the sheet only when you drag them into the document yourself.

**In the PDF:** With “PDF with embedded e-invoice”, pages and texts look as they do in the normal PDF. Images appear without smoothing: a greatly enlarged small image may look somewhat more jagged. In addition, the XML is embedded in the document as the attachment `factur-x.xml`, and the PDF is a PDF/A-3. With “e-invoice only (XML)”, the XML file is produced and, if set, the ordinary PDF as a reading copy. If something is missing from the e-invoice, no document is produced at all.

---

## Full preview and PDF

*For users · Printing and Dynamics · Page en/vorschau-pdf.html*

> **In short:** The canvas shows fields only by their names. How the document really looks is shown by two buttons at the top of the header bar: “Full preview” opens it in a window, “PDF” downloads it right away. Both create the real PDF in the same way that Dynamics creates it later. They use the values of the sample record and all changes, including those not yet saved. Beforehand, the designer checks the primary source, sample record, rules and variables. Anything the print notices, the designer reports afterward at the top center. This page also says what is different when printing in Dynamics and where the canvas differs from the PDF.

### The full preview

“Full preview” is at the top of the header bar, between “↷” and “PDF” (see The header bar). The button creates the real PDF from the open template and shows it in a window over the whole designer. The document is created in the same way, with the same checks and the same values as with “PDF”; every click creates the file anew. The values come from the template’s sample record. What that is and how you choose it is described under Data sources and relationships: The sample record.

1. At the top of the header bar, click “Full preview”.
   → The designer first checks a few things (see What is checked before the document is created). If everything is in order, the window “Full preview” opens with the text “Generating PDF…”.
2. Wait until the document appears.
   → Next to the title it says “real PDF (identical to the export)”. If the print has anything to report, it appears at the top center (see Problems and messages: Notes and warnings).
3. Page through and zoom with your browser’s PDF viewer. You can print from there as well.
4. If you want the document as a file, click “Download PDF”.
5. Close the window with “Close” or the Esc key.
   → You are back in the designer. Nothing has changed in the template, unless you set a primary source or a sample record during the check (see What changes in the document?).

- How long creating takes depends on Dynamics and on the template. After a longer pause, the first document can take ten to seventeen seconds (see Keep warm).
- In the group designer you cannot reach “Full preview” and “PDF”, because its window covers the header bar. Close it first: a click on “📄 Document” in the path at the top left closes it completely; “✕ Close” goes back only one level at a time (see Groups: Opening, going deeper, going back).
- There is no keyboard shortcut for either button.

#### The “Full preview” window

The window covers the whole designer. At the top is a white bar with a title and two buttons, below it the document on a darkened background.

[Image: The full preview over the whole designer. At the top a white bar: on the left the bold title “Full preview” with the gray addition “real PDF (identical to the export)”, on the right the buttons “Download PDF” and “Close”. Below, on a darkened background, the document in the browser’s PDF viewer: at the top the viewer’s dark toolbar with a long, machine-assigned file name, page number “1 / 1”, zoom “67%” and icons for downloading and printing, below it a whole page of an invoice. At the top it shows the logo and sender “Dyn365 Smart Templates”, the address “Contoso Handels GmbH”, a box with the document data, the heading “Rechnung RE-2026-000142”, a table with four line items and their batches and, at the right below the table, a box with the total amount of 4.444,65 €; at the very bottom bank details, a greeting and a gray footer with “Seite 1 von 1”. How the viewer’s bar looks depends on the browser.]
Caption: The full preview: The document appears as a real PDF in the browser’s viewer.
- Image marker 1: Title and addition. The addition appears as soon as a document has succeeded for the first time.
- Image marker 2: The bar of the PDF viewer: Paging, zooming and printing are handled by the browser’s viewer; how it looks depends on the browser.
- Image marker 3: The document: created in the same way as with “PDF”, with the values of the sample record.
- Image marker 4: Creates the document a second time and downloads it; the window stays open.
- Image marker 5: Closes the window; the Esc key does the same.

| Part of the window | What it shows or does |
|---|---|
| Title “Full preview” and addition “real PDF (identical to the export)” | The addition appears as soon as a document has succeeded for the first time. It stays afterward until you reload the designer, even above a later error message. It therefore does not say whether the document shown right now succeeded; you see that below it: there is either the document or “PDF generation failed – …”. |
| “Generating PDF…” | Appears in white type on the darkened background while the document is being created. There is no progress bar. |
| The document | Your browser’s PDF viewer shows it. Paging, zooming and printing are handled by this viewer; how it looks and which buttons it has depends on the browser. The window has no zoom controls of its own. Ctrl+mouse wheel enlarges the viewer or the browser view here, not the canvas behind it. |
| “Download PDF” | Creates the document a second time and downloads it, exactly like the button “PDF” in the header bar: with the same checks, the same file name and the same messages; a prompt about rules or variables therefore comes once more. What is downloaded is not the PDF shown but a newly created one. The window stays open. |
| “Close” | Closes the window. The Esc key does the same. If you clicked into the document beforehand, the Esc key may reach the PDF viewer instead of the designer; then the window stays open, and you use “Close”. |
| “PDF generation failed – …” | Appears instead of the document when none was created, with the reason after it (see Problems and messages: When no document is created). |

As long as the window is open, changes from the Copilot agent do not arrive in the open template. They follow a few seconds after you have closed it (see Working with the AI assistant in Copilot: What happens then).

#### Full preview and printing in Dynamics

The full preview creates the document in the same way as a button or a flow in Dynamics. In Dynamics, it fetches the values of the sample record fresh from the database and calculates the rules as in the real print. Some differences remain:

- **Version of the template:** Full preview and PDF take the template as it is currently open, including unsaved changes. Buttons and flows always print the saved version. What you see in the full preview applies there only after “Save”.
- **Record:** The full preview prints the sample record. A button prints the record on which it is clicked, in a list the checked rows (see What happens on click: Several checked rows); if it sits on a different table than the template, it prints the record at the end of its path (see Buttons: the assistant: The path). A flow prints the record that it passes (see Actions and APIs: From Power Automate).
- **User:** What depends on the printing user, the full preview shows as it applies to you: the system value “User”, the date format “Same as the printing user (Dynamics)”, the time zone in which a point in time becomes a calendar day (for both see Numbers, currency and dates: Date & time), and your read rights. Someone with other rights may get a different document; details are under Rights and roles.
- **Point in time:** The system values “Current date”, “Current time” and “Date & time” name the moment at which the document is created. The full preview of today therefore shows today’s date, a button tomorrow that of tomorrow.
- **Messages:** In the full preview you see warnings and yellow notes. A button in Dynamics shows the print’s feedback only if a warning is among it (see Problems and messages: Where the feedback of a document arrives). It never shows yellow notes alone, not even in the message “The email was sent.” that appears after “Send email immediately”. So check these here.

#### With e-invoice

If the e-invoice is switched on for the template (see E-invoice: ZUGFeRD and XRechnung), “Full preview” and “PDF” in Dynamics work more leniently than a button:

- With “PDF with embedded e-invoice” and a valid e-invoice, the PDF is a PDF/A-3 with embedded XML. Pages and texts look as usual; images appear without smoothing, a greatly enlarged small image may look somewhat more jagged.
- With “e-invoice only (XML)”, the preview shows the ordinary PDF. You see the XML in the assignment window under “Result of the check” with “Download e-invoice as file”.
- If something is missing in the e-invoice, the preview shows the PDF without e-invoice and a warning. It is in English in the message “Warning: …” and begins with “e-invoice: the PDF was made WITHOUT e-invoice”, followed by the reason. A button, an email and a flow cancel in this case, and no document is created at all.
- If “Only if …” does not apply to the sample record, the PDF is created as without an e-invoice.

### The “PDF” button

“PDF” is in the header bar right next to “Full preview”. It creates the same document with the same checks (see What is checked before the document is created), but does not display it; it downloads it right away as a file. Where the file goes is determined by your browser.

- While the document is being created, the designer shows nothing: there is no waiting message, and the button stays clickable. Click once and wait until your browser reports the download.
- If the print has anything to report, it appears as with the full preview at the top center (see Problems and messages: Notes and warnings).
- If no document is created, the yellow note “PDF failed – …” appears below the bars for six seconds (see Problems and messages: When no document is created).

#### The file name

If the template has a PDF name (see Template settings: PDF name), the file is called that, calculated with the sample record as in the document, for example `Rechnung_R-2026-0042.pdf`. If the PDF name yields nothing, it is called like the template, with `-` instead of the characters that are not allowed in file names.

Without a PDF name, the file is called like the template. The name is transformed as follows:

- Everything is written in lowercase.
- ä, ö and ü become ae, oe and ue, ß becomes ss.
- Every run of other characters, that is, spaces, punctuation and letters with accents such as é, becomes one hyphen. At the beginning and at the end the hyphen is dropped.
- “.pdf” is added.

| Name of the template | Name of the file |
|---|---|
| Auftragsbestätigung | auftragsbestaetigung.pdf |
| Angebot 2026 (Entwurf) | angebot-2026-entwurf.pdf |
| Café Müller | caf-mueller.pdf |
| (no name) | dokument.pdf |
| only special characters, for example “– – –” | vorlage.pdf |

The file from “Download PDF” in the full preview gets the same name. If a file of this name already exists in the download folder, your browser decides how to name the new one.

### What is checked before the document is created

For “Full preview”, “PDF” and “Download PDF”, the designer checks four things beforehand, in this order:

1. **Primary source:** If the template has none, “Primary source required” opens (see Without a primary source).
2. **Sample record:** If none is set or the one that was set has been deleted in Dynamics, “Choose sample record” opens (see Without a sample record).
3. **Rules:** If rules read each other in a cycle, the designer asks in the window “Please confirm” (see Confirmation prompt for rules and variables).
4. **Variables and condition branches:** If something is wrong in your own variables or in the condition branches, it asks as well (see Confirmation prompt for rules and variables; the individual findings are described under Variables: The check before full preview and PDF).

Only after that does the full preview window open or the download begin. If everything is in order, you see nothing of the checks.

#### Without a primary source

If the primary source is missing, the window “Primary source required” opens; how to use it and how to continue afterward is described under Data sources and relationships: The window “Primary source required”.

#### Without a sample record

If no sample record is set or the one that was set has been deleted in Dynamics, the window “Choose sample record” opens, with the name of the primary source added to the title. How to search in it and choose a different view is described under Data sources and relationships: The window “Choose sample record”. For full preview and PDF the following applies:

| What you do | What happens |
|---|---|
| Click a row, or move to it with the Tab key and press the Enter key or the Space bar | “Loading sample data...” appears briefly. After that, the full preview or the download continues by itself. The record is now in the open template; it is stored in Dynamics only with “Save”. |
| “Continue without a sample record” | If none was set yet, the document is created without the values of a record: the fields of the main record stay empty. Further sources appear only with the rows that the design also loaded (at most 50 per source), and rules and sums are based only on these. For a first check of the layout that is enough; check quantities and sums with a real sample record. The next time, the designer asks again. If the record that was set had been deleted in Dynamics, however, no document is created. |
| Esc key or a click next to the window | The window closes, and nothing happens: no document, no message. This window has no ✕. |

What happens when the record that was set has been deleted or Dynamics has just not delivered it, and how you then replace or remove it, is described under Data sources and relationships: When the sample record is missing or cannot be read.

#### Confirmation prompt for rules and variables

Three kinds of errors in the template do not stop the print but change the document. That is why the designer asks beforehand in the window “Please confirm”. If several occur, it asks one after the other.

| Prompt | When it appears | What “Generate anyway” means |
|---|---|---|
| “The rules depend on each other: A → B → A.” or “The rule »X« reads itself — but its result only comes into being through it.” | Two or more rules read each other, or a rule reads itself. There is no order in which they can be calculated. | The print then calculates not a single rule of the template, not even the uninvolved ones. Places with rule results stay empty. What else happens and how you resolve the cycle is described under Rules: When rules read each other in a cycle. |
| “Something is wrong with the custom variables:” with one bullet per finding | Something in your own variables is wrong, also in the if-then cases of the template settings. All findings are described under Variables: The check before full preview and PDF. | The document is created with the error. Most items of the prompt name their consequence themselves; variables that depend on themselves or on each other stay empty in the document. |
| “Some conditions in the template are incomplete:” with one bullet per condition | A condition of the template is missing a part, for example the second side of an AND or OR, also in a visibility rule. What counts as incomplete is described under Conditions: Incomplete conditions. If a condition contains a field in “{{ }}” or a word like “isEmpty”, the heading reads “Some conditions in the template are written incorrectly:”; if both occur, “Some conditions in the template are incomplete or written incorrectly:” (see Conditions: Fields in “{{ }}” and Checking for empty in a hand-written condition). | The document is created as set; the missing part is never considered met, a condition with “{{ }}” does not read its field, one with “isEmpty” reads a field that does not exist, and the PDF reports the condition as a warning. |

On the left is “Cancel”: no document is created. On the right is “Generate anyway” in red type. This button is preselected; the Enter key therefore creates the document despite the error. Otherwise the window works like any prompt (see Problems and messages: The windows). If the prompt after “Download PDF” appears over the full preview window, choose “Cancel”: the Esc key may first close the full preview behind it there.

[Image: The window “Please confirm” in the middle of the darkened designer. The text says: “Something is wrong with the custom variables:”, after a blank line one bullet: “In template setting »Currency symbol« there is a condition branch WITHOUT a condition before others — it always applies and switches off the branches below it.” At the bottom right two buttons: “Cancel” in dark type and “Generate anyway” in red type.]
Caption: The prompt before the full preview: “Cancel” on the left, “Generate anyway” in red type on the right.
- Image marker 1: One bullet per finding; it names where the error is and what follows from it.
- Image marker 2: “Cancel”: No document is created.
- Image marker 3: “Generate anyway” creates the document with the error. The button is preselected: the Enter key chooses it.

Only what can be recognized from the template itself is checked. Errors that arise only with the data are reported by the document afterward (see Problems and messages: Notes and warnings).

### What is reported after the document is created

If the print notices something while creating, the designer reports it at the top center. What the notes and warnings look like, how long they stay and what they mean is described under Problems and messages: Notes and warnings.

If no document is created at all, the reason is under Problems and messages: When no document is created.

The messages that concern only the canvas and not the document are under Problems and messages: Messages of the design.

### What the canvas shows differently from the PDF

The canvas calculates by itself and shows the sheet as precisely as possible. At the following places it differs, partly on purpose, partly because it knows only an excerpt of the data. The PDF is always authoritative; check these places in the full preview.

[Image: Excerpt of the canvas with the sample invoice. At the top the line item table: a blue header row with “Pos.”, “Bezeichnung”, “Menge”, “Einzelpreis” and “Gesamt” and exactly one sample row whose cells carry blue field markers (“Pos.-Nr.”, “Bezeichnung”, “Menge” and “Einheit”, “Einzelpreis”, “Gesamt”), below it an extra row “Chargen:” with the markers “Nummer” and “Wert”. Dashed guides outline the cells. Below on the left the text “Bitte überweisen Sie Brutto bis zum Zahlungsziel unter Angabe der Rechnungsnummer auf das unten genannte Konto.” with two field markers and below it, in a dashed box, the green stamp “BEZAHLT”; on the right a totals block in a blue dashed box with a light background: “Zwischensumme (netto)” with the marker “Summe”, “zzgl. 19 % USt.” with “USt” and “Gesamtbetrag” with “Brutto”.]
Caption: The design: one sample row, field markers and guides; the visibility rule of the stamp has no effect here.
- Image marker 1: The sample row: Of the rows from the data, the design shows only one, with field markers instead of values.
- Image marker 2: The stamp “BEZAHLT” has a visibility rule and is still always there in the design.
- Image marker 3: Guides: The dashed outline shows the totals block; guides exist only in the design.

[Image: The same piece of the sample invoice as a PDF. The line item table now has four rows with all values: 0010 “Beratung Dynamics 365 – Konzeptphase” (8 Std, 145,00 €, 1.160,00 €), 0020 a second sample line item, wrapped onto two lines (1 Stk, with unit and total price), 0030 “Einrichtung & Schulung vor Ort” (1 Pauschal, 650,00 €, 650,00 €) and 0040 “Individuelle Rechnungsvorlage nach CI” (3 Std, 145,00 €, 435,00 €). Under each line item, in small gray type, are its batches with number and value; the second and the fourth row have a light blue background. Below it, correspondingly lower than in the design, on the left the sentence “Bitte überweisen Sie 4.444,65 € bis zum 11.07.2026 unter Angabe der Rechnungsnummer auf das unten genannte Konto.” and on the right the totals block in a box with a blue border with “Zwischensumme (netto)” 3.735,00 €, “zzgl. 19 % USt.” 709,65 € and “Gesamtbetrag” 4.444,65 €. The stamp “BEZAHLT” is missing. There are no dashed guides.]
Caption: The same piece in the PDF: all rows, the totals block further down, the stamp missing, no guides.
- Image marker 1: In the PDF, all rows of the list are there with their values and their batches.
- Image marker 2: The totals block moves down as far as the table has grown.
- Image marker 3: Here the design shows the stamp “BEZAHLT”. The invoice is not paid: the visibility rule hides it.

| Topic | On the canvas | In full preview and PDF |
|---|---|---|
| Fields, variables, system values | Blue markers with the name, never with the value. Your own variables appear without @, system values as “Page #”, “Pages ∑”, “Current date”, “Time”, “Date & time” and “User”. A display name you assigned yourself takes precedence. If you point at one with the mouse, you see which field is meant. | The values of the sample record, in the format of their kind and of the template settings. See The “Edit text” window: Inserting fields. |
| Length of the texts and position of the objects | Each marker takes the space of its name; the lines of a text are based on that. Each object sits where you put it (for the page edge see below). | Values are often longer or shorter than their names; a text therefore gets more or fewer lines. If something grows, objects below it move down according to their positioning behavior; they never move up. See Positioning behavior. |
| Visibility rules | Have no effect. The object is always visible, and no sign reveals that it has a rule. | A hidden object is missing; directly in the document, its place stays free. A sheet on which only hidden things stand is not printed. See Visibility: What happens in the PDF and Visibility: Per object. |
| Texts and images that depend on conditions | A text with versions shows the version that matches the sample record. A dynamic text appears as a green pill with its label and is not evaluated. An image with “Except when” rules shows the image that matches the drawn sample row. | The first version whose condition applies is printed; if none applies, the text stays empty. Of a dynamic text, the matching branch is printed, never its label. An image with rules shows, per record, the matching image. See Texts: Content depending on a condition, Texts: Dynamic text and Images: A different image depending on a condition. |
| Text with a fixed height | If the content does not fit in, it is cut off, and below the box an orange hatched strip shows the overhang. The mouse pointer on it explains the difference from the PDF. | The whole text is printed; border and background become as tall as the text. What stands below it on “Flowing” moves down; if the text has “Fixed position”, it overprints whatever lies below it. The document reports both as a warning. See Texts: Width and height, Position, size, rotation and arrangement: Automatic height and limits and, for all places where the PDF cuts off, Position, size, rotation and arrangement: Where the PDF really cuts off. |
| Groups and table rows with a fixed height | Cut off at their edge. A data table inside shows only its sample row. | Cut off as well. What happens with each object and what is reported is described under Position, size, rotation and arrangement: What the wall does to an object; in a table row or cell with a fixed height, cell content that is too long is cut off and reported. See Position, size, rotation and arrangement: The fixed bottom edge and where the PDF cuts off, Groups: Settings of the group, Data tables: The properties of the whole table and Cells, header row and page break: Tables in groups and cells. |
| Page edge | An object that the print splits at the edge stands unsplit on its sheet on the canvas and extends beyond the bottom margin, as does an object on “Fixed position” and the first object of a sheet; an orange hatched strip at the end of the sheet shows the overhang (different only with free-form tables, see below). If an object moves as a whole to the next sheet because of the page edge, the canvas shows it there at the top, as in print; an object that may split and moves on whole only because too little of it fits on the old sheet still stands on the old sheet in the design; this concerns mainly split texts, because “Minimum lines when text is split” works only in print. See At the page edge: keep together or split: What the canvas shows. | An object is split at the edge or moves as a whole to the next page, depending on its kind and “Keep together at page break”. An object on “Fixed position” is not split; whatever extends beyond the paper edge is missing and is reported. Likewise, the first object of a sheet usually stays where it is and extends beyond. See At the page edge: keep together or split: What happens at the page edge and At the page edge: keep together or split: The first object of a sheet. |
| Number of pages | As many sheets as your design occupies, including those that the canvas attaches itself when an object moves to the next sheet at the page edge or a free-form table runs over the end of the page. Sheets attached with “Blank page” or “Add page” set a minimum number, as in print: if the content fills them later, no further sheet is added. Above each sheet is a label such as “Page 1 / 2”. | As many pages as the data needs. Sheets attached with “Blank page” or “Add page” set a minimum number: if the content needs fewer pages, they are printed empty; if it needs more, no empty ones are added. A sheet on which only hidden things stand is dropped (see Visibility: What happens in the PDF). See Pages, header and footer: Sheets in the design and in the document and Pages, header and footer: Adding blank pages and removing pages. |
| Header, footer and repeated areas | On every designed sheet for which they apply according to their settings. “Last page only” and “All except the last page”, as well as a page frame with “Different last page”, apply to the last drawn sheet. | On every printed page for which they apply. Which page is the last is known only when the document is created. See Pages, header and footer: Header and footer. |
| Page numbers | Markers “Page #” and “Pages ∑”. | The real numbers. See Pages, header and footer: Page numbers. |
| Data tables | Header row and one sample row with markers; with extra rows, one record with its rows. This also holds if the rule behind it returns exactly one record, for example with “Only the first”. | All rows, with page breaks, repeated header row and zebra stripes. Rounded corners remain only if the whole table fits on one sheet; otherwise it is square-cornered, even if the design shows it rounded (see Border, background and colors: What the fields do). A table on a rule that returns exactly one record prints no row (see Rules: Taking certain records). See Cells, header row and page break: Across several pages. |
| Free-form tables | All rows as they are printed; if the table runs directly on the sheet over the end of the page, also the following page with the repeated header row. Only fields appear as markers. | The same rows, fields with their values. See Free-form tables. |
| Amount of data | The design loads at most 20 rows per list and 50 per further source. What it calculates in the background, such as rules, sums, “The first N” and conditions, it calculates only with these. | All rows, up to the upper limit of 20,000 rows per query; if it is reached, the document reports a warning. See Data sources and relationships: What the design loads and what is printed. |
| Images from the data | The first image that the design finds in the sample record for this field, in a table the same in every row. For a field with “first(…)” or “last(…)”, on the other hand, it shows exactly the image that is printed, in a table row that of the drawn row. If it finds none, outside a table a blue dashed placeholder with 🖼 and name appears; in a table row the design then draws nothing, except with “show placeholder”. If “Show image on the canvas” is off, the blue placeholder always appears. | Each record and each row with its own image. If one is missing, the setting of the image for this case applies. See Images: Images from the data; what the design shows is described under Images: What the canvas shows. |
| Images that the print cannot read | A blue dashed box “not printable” in place of the image. | The place stays empty and keeps its space; the document reports it. Only PNG, JPEG and BMP are printed. See Images: Formats. |
| Images that the design could not retrieve just now | An amber dashed box “not loaded” for an image from a file column, if retrieval was disturbed. It stays until you change the sample record. | The print fetches the image anew and prints it if that succeeds then. If it does not succeed, the place stays empty, keeps its space, and the document reports it. |
| Position of the border | For rectangle, group and table cell, the border lies completely inside; for text, line and the other shapes it is centered on the edge. | Always centered on the edge, half outside and half inside. A rectangle with a thick border is therefore somewhat larger on the outside in the PDF. See Border, background and colors: Where the line lies. |
| Colors from variables | The color that results with the sample data; if none results, the color of the else branch of the variable. | The color that results with the printed record. If none results, only what this color was supposed to draw is missing in print, and this is not reported; only the canvas takes the else branch as a substitute. See Border, background and colors: Color from a variable and Border, background and colors: Invalid color. |
| Date and time zone | Only if a message at the start says that the time zone could not be read: dates in the design then calculate in your computer’s time zone. | Calculates with the time zone from Dynamics. With different zones, design and PDF can be a day apart. |
| Window “Edit text” | Shows the line spacing only in part; on the canvas itself it works as in print. | The set line spacing. See Texts: Line spacing. |
| Aids of the designer | Selection frames, handles, guides, the grid, the blue ⇕, orange warning signs, hatched strips, the label above each sheet, the buttons next to the sheets, the marker “✂ Page break · new page starts here” and the magenta snap lines while dragging. | None of this is printed, not even the zoom. A page break takes effect; only its marker is missing. See Working on the canvas: Markings and warning signs on the canvas and Working on the canvas: Grid, snap lines and guides. |

> **Tip:** Open the full preview after every larger change, especially with long texts, tables over several pages, visibility rules and objects near the page edge. Also look at the messages at the top center.

### What changes in the document?

**On the canvas:** Full preview and PDF change neither the template nor the canvas. Exempt is what you set yourself during the check: a primary source via “★ Set primary source” and a sample record. Both are afterward in the open template, and the design calculates with the sample record in the background; it is stored in Dynamics only with “Save”. If the template already has content, the window “Assign variables” may open after setting the primary source (see Data sources and relationships: Setting the primary source).

**In the PDF:** The PDF shows the current state of your template, including unsaved things, with the values of the sample record. In Dynamics, neither button stores anything. Which version buttons and flows print is described under Full preview and printing in Dynamics.

---

## Buttons: the assistant

*For users · Printing and Dynamics · Page en/buttons-flows.html*

> **In short:** With a button in Dynamics, the document is created with one click, right on the record and without the designer. You create the button in the command designer of Power Apps; the assistant that the button “🖨 Manage buttons in Dynamics” opens leads you there question by question and provides every value you have to enter, ready to copy. This page describes the assistant’s questions and how to use it. The steps in the command designer are described under Adding, changing and removing a button, and what users see on click under What happens on click. The button “↻ Manage flows” opens a window in which you create flows in Power Automate that carry on afterward, for example filing the document in SharePoint; it is described under Flows. Neither window changes anything on the sheet.

### What a button can do

A button is an additional button in Dynamics. It sits in the bar with buttons such as “Save” or “New”, which Dynamics calls the “command bar”, and it can be in one of three places:

- **On the record:** in the bar above the open form. In the image, a Smart Templates button, “Create PDF”, is already there. [Image: The head of a form in Dynamics, app Vertriebshub: at the top the dark bar with “Dynamics 365” and “Vertriebshub”, on the left the menu with Home, Recent, Pinned and My Work. To the right of it the command bar with an arrow back, an icon for a new window, “Create PDF”, “Save”, “Save & Close”, “Transaktionen für Rec…”, “Neu berechnen” and “Flow”. Below it the title “Rechnung erstellen” with “Rechnung · Rechnungsübersicht” and the tabs Zusammenfassung, Zahlungen, Abschlagsrechnungen, Anhänge and Monatsabrechnung Verweise.] On the record: the bar above the form of a new invoice, with the button “Create PDF”.
- **In a subgrid:** in the small bar of a list in the middle of the form, here the line items of an invoice. [Image: The section “Produkte & Dienstleistungen” in the form of an invoice: on the left the view “Positionserfassung”, on the right above it the small bar with “Refresh”, “Flow”, “Run Report”, “Excel Templates” and three dots. Below it a list with the columns Pos., Menge, Vorhandenes Produkt, Produktbeschreibung, Einzelpreis, Betrag and others; it contains two line items, an oxidation catalyst and a gasket set.] In a subgrid: the small bar above the list of line items, not the large bar at the top of the form.
- **In a view:** in the bar above the list of a table, here “Alle Rechnungen”. Here the user first checks one or more rows. [Image: The view “Alle Rechnungen” in the Sales Hub: at the top the command bar with “Show As”, “Show Chart”, “New”, “Delete”, “Refresh”, “Visualize this view”, “Email a Link”, “Flow” and “Run Report”. Below it the title “Alle Rechnungen” and the column heads Vorgang, Name, Vorgangsart, Rechnungsnummer, Kunde, Statusgrund, Offener Brutto, Brutto Endbetrag and others. Below that four invoices, for example “Wartungsvertrag 2026” for Contoso Handels GmbH for 2,856.00 €.] In a view: the bar above the list of all invoices.

In the assistant, the three places are called “Main form”, “Subgrid view” and “Main grid” (see Where in “Table”?). With one click, the button creates the document from your template. It can do three things:

- **Create and display the document:** The document opens in a new tab. Nothing is stored and nothing is sent in Dynamics.
- **Prepare an email and present it:** An email draft with the document attached opens; you check and send it yourself.
- **Send email immediately:** The email goes out without a prompt, to a recipient from the record (a lookup such as the customer, or an email field, see Who receives the email?) or to the record itself if the template prints a contact, an account, a lead, a user or a queue.

All three create the same document. It corresponds to what the button “PDF” in the designer creates, but from the saved version of the template and with the record on which the button is clicked, instead of the sample record. If the button sits on a different table than the template, it is the record at the end of the path. These differences and what else depends on the printing user and on the point in time are described under Full preview and PDF: Full preview and printing in Dynamics.

If the template has a switched-on e-invoice (see E-invoice: ZUGFeRD and XRechnung), a fourth purpose is added: “Download e-invoice”. It delivers only the template’s e-invoice as an XML file to save, without a document in a tab and without a flow. The other three purposes then deliver what the template sets (see E-invoice: Button, email and flow).

There is an assistant for the button. Click through its questions; it explains every choice along the way. At the end you get instructions on what to enter where in the command designer, with every value ready to copy. Further down this page, every step is described once more in detail, in case you want to look something up; the steps in the command designer are described under Adding, changing and removing a button. You can set up a button only for a template that has already been stored in Dynamics (see The window “Not yet saved in Dynamics”). What the administrator has to prepare is described in Preparing buttons and flows.

#### The two buttons in the header bar

In the header bar of the designer there are two buttons in a group of their own to the right of “Full preview” and “PDF” (see The header bar). Both are always there, both open a window of their own, and neither changes anything on the sheet.

| Button | What it does | Tooltip |
|---|---|---|
| “🖨 Manage buttons in Dynamics” | Opens the assistant, the window “Manage buttons in Dynamics”. With it you plan, change or remove, step by step, a button in Dynamics that creates the document from this template with one click or sends it by email. If the template has no ID because it is not stored in any record in Dynamics, only a notice window appears instead. The button used to be called “🖨 Drucken & Senden einrichten”. | “Create, change or remove a button in Dynamics that creates the document from this template with one click or sends it by email. An assistant guides you step by step.” |
| “↻ Manage flows” | Opens the window Manage flows: create, open and remove cloud flows (Power Automate) for this template. The flow is created here, and it is edited in Power Automate. The window also opens for a template that is not yet in Dynamics, because there is no ID check here. The services behind it exist only in Dynamics. A flow that you create here is in the assistant’s flow list the next time it is opened. If you open the window from the assistant via “Create flow …”, the assistant selects the new flow right away (see The button “Create flow …”). | “Create, open and remove cloud flows (Power Automate) for this template — the flow is created here and edited in Power Automate.” |

If one of the two buttons is missing, an old browser cache is usually to blame, or an update that was only partly renewed. Otherwise the designer stays usable. Reload the page with Ctrl+Shift+R; if that does not help, the administrator has to redeploy the designer.

#### The window “Not yet saved in Dynamics”

If the open template has no ID, for example because it was opened from a file and never stored in Dynamics, this window opens instead of the assistant. It has only one button, “Got it”; there is no “Cancel”. The text reads: “This template is not stored in any record in Dynamics yet, so it has no ID. Use »Duplicate« to save it there (»New« would replace it with an empty one) — after that the finished instructions, with everything to copy, appear here.” “Here” means the assistant.

The focus is on “Got it”, so the Enter key closes the window just like Escape or a click next to the window. The assistant does not open afterward. The template’s ID belongs later, in the command designer, on the button as the second parameter; without it there are no finished instructions. How to store a template is described under Managing templates: Duplicate.

### The assistant: process and operation

At the top of the header bar, click “🖨 Manage buttons in Dynamics”. In the first step you choose whether you want to create a button, change an existing one or remove one. The assistant reads apps, tables, email templates, flows, existing buttons and relationships fresh from Dynamics every time it opens. Outside Dynamics, for example with a local call of the designer, it cannot read anything and says so.

The assistant stores almost nothing. Everything you choose lives only in the window and is gone when you close it. The only exception is the email template’s if-then cases: it writes them into the open template. They are stored in Dynamics only once you then press “Save” at the top as usual.

#### The steps at a glance

The branch “Create a button” has 7 to 11 steps, depending on whether the path, the question about several rows and, for the email purposes, the steps Who and Email template are added. For the purpose “Download e-invoice”, the step Flow is omitted, and Who and Email template are never added; it is then 6 to 8 steps. The instructions at the end have 13 to 20 numbered steps in this branch (see Adding, changing and removing a button: The steps for creating a button).

| Step | Question in the assistant | When it appears |
|---|---|---|
| Start | “What would you like to do?” | always |
| App | “Which app should the button be in?” | always |
| Table | “Which table should the button be on?” | always |
| Path | “How do you get from here to the template?” | only if the chosen table is a different one than the primary source of the template |
| Place | “Where in »*Table*«?” | always |
| Several rows | “Does it matter what the user checks?” | only for the three list places |
| Purpose | “What should the button do?” | always |
| Who | “Who receives the email?” | only for the two email purposes |
| Email template | “Which email template?” | only for the two email purposes |
| Flow | “Should a Power Automate flow run afterwards?” | always, except for the purpose “Download e-invoice” |
| Instructions | “Step by step” | always, in the last step |

In the branches “Change an existing button” and “Remove a button”, there are three steps: the start, the choice of the button and the instructions with four steps. See Adding, changing and removing a button: Changing or removing a button.

#### The window

| Control | What it does |
|---|---|
| Size and position | A wide window that adapts to the window width on narrow screens. The content scrolls, the footer bar with counter and buttons stays in place. Resizing and position as with all windows (see Problems and messages: The windows). |
| Close | There is no ✕ in the corner. It is closed with “Close” (in the start step before the first choice, in the last step and in the error state), with the Escape key or with a click next to the window (see Keyboard shortcuts: Esc in detail), always without a prompt. After that, the assistant’s state is gone, and the next time it opens it starts again at step 1. Only the if-then cases that have already been written into the open template remain; they are read again when it opens. |
| Further windows on top | If you open “Manage flows” from the assistant, this window lies over the assistant, and from there the connection instructions (see Flows: The windows “Create a connection” and “First the connection — here is how”) lie over it once more. Escape always closes the topmost one. |

#### The footer bar

| Control | What it does |
|---|---|
| Step *n* of *m* (left) | Counts the steps of the chosen branch. Before the first choice it says only “Step 1”; the total comes only with the choice. When creating, it is 7 to 11 steps (6 to 8 for the purpose “Download e-invoice”), when changing and removing 3. |
| Orange line with “·” in front | Names what is still missing before “Continue ▸”. As long as it is there, “Continue ▸” is disabled. The texts are under The orange line. |
| “◂ Back” | Goes back one step. The button is always there from the second step on, also in the last one: you can jump back at any time and change something. The choices so far stay as they are, apart from the consequences described under What lapses when you change earlier choices. |
| “Continue ▸” (highlighted) | Goes to the next step. The button is in every step except the last and is disabled as long as the orange line names something. When first opened, it is missing in the start step: there, a click on a card already moves on, and “Close” is on the right. If you later return to the start with “◂ Back”, it is there too. |
| “Close” | It is in the start step as long as nothing has been chosen yet, in the last step and, at startup, in the error state. Closes the assistant without a prompt. |

#### The orange line

The line names, per step, what is missing. Place and purpose have defaults and never block. Several rows, Who and Flow also have defaults and block only in the special cases named.

| Step | Text of the line |
|---|---|
| Start | “Please choose what you want to do.” |
| App | “Please choose an app.” |
| Table | “Please choose a table.” |
| Path | “The path has not reached »*name of the primary source*« yet.” |
| Several rows | “Please choose.” Practically never seen, because “Exactly one record” is preselected. |
| Who, card “From a lookup of the record” or “From an email field of the record” chosen | “Please choose a lookup.” or “Please choose an email field.” As long as the list is at “— please choose —”. |
| Who, purpose “Send email immediately”, card “As before …” | “»Send email immediately« needs a recipient for this template — please choose a lookup or an email field.” Only if the template’s primary source is not itself a recipient. |
| Who, purpose “Send email immediately”, card “As before …”, and the table of the primary source has neither a suitable lookup nor an email field | “»Send email immediately« does not work for this template — it has neither a lookup to a recipient nor an email field.” Go back and choose “Prepare an email and present it”. |
| Email template, “Always the same template” | “Please choose an email template.” |
| Email template, “Depending on a condition” | “Please specify at least one complete case or an otherwise branch.” When a case is complete is described under Depending on a condition: the cases. |
| Flow | “Please choose a flow — or »No« above.” |
| Choose a button (change, remove) | “Please choose a button.” |

#### Selection cards

Most questions you answer with a card. The whole card is clickable and acts like a radio button: the chosen one carries “● ” in front of the title, a blue border and a pale blue background, all others “○ ”. On the left, depending on the step, there is a character (＋ ✎ 🗑 ✉ ⑂ — ↗ @ ↻), a drawn symbol, a small sketch or the image of the app; if the app image is missing or does not load, “▦” appears. Names from Dynamics, that is, apps, tables, email templates, flows and the labels of existing buttons, are data and are not translated in the English interface.

#### Copy lines

A value that you enter later in the command designer is in a copy line: on the left the label, next to it a read-only field in monospaced type and on the right the button “Copy”. A click in the field selects the whole content. “Copy” puts the value on the clipboard and shows “Copied ✓” for 1.4 seconds. If that does not work, the button says “Copy manually”: click in the field and copy with Ctrl+C. Below it there is often a short note on the spelling.

The copy line is at the step where you need the value, not collected in one block. It occurs in the step Path (“The path”) and in the instructions (Adding, changing and removing a button: The instructions in the command designer): “… or the link”, “Suggestion”, “Library” twice, “Function”, “Parameter 2” to “Parameter *n*”, “Formula (Power Fx)” and, when changing, “This template”.

#### Loading and errors

As long as a step is fetching data from Dynamics, a sentence appears instead of an empty list, so that an empty selection does not look like “there are none”. The step triggers the loading itself as soon as it appears, not the button “Continue ▸”. The footer bar with its buttons is already there; only when opening, while the apps are being loaded, is it still empty.

| Where | Sentence in the content area |
|---|---|
| when opening | “Loading apps …” |
| Table | “Loading the tables of the app …” |
| Who | “Loading fields …” |
| Email template | “Loading email templates …” |
| Flow | “Searching for cloud flows …” |
| Choose button | “Searching for existing buttons …” |
| Path | “Loading relationships …” |
| otherwise | “Loading …”; rarely, in the step itself, also “Loading tables …” and “Searching for buttons …” |

If loading fails, there are two kinds of error boxes, both with an orange border:

- **Error at startup:** If reading the app list or the environment ID fails, only this box remains, and the footer bar shows only “Close”. In Dynamics it says: “The app list and the environment ID could not be read. The reason:”, followed by the server’s message. If the environment ID comes back empty, the reason is “The environment ID came back empty.” Without Dynamics, with a local call of the designer, it says, in substance: This window needs Dynamics; locally there is neither the app list nor the environment ID, please open the designer in Dynamics. The assistant needs the environment ID for the link into the command designer.
- **Error in a step:** A sentence names what could not be fetched (“The tables of this app could not be fetched: …”, correspondingly for email templates, buttons, the relationships of a table and the fields of the template table), followed by the reason, shortened to 300 characters. Below it says: “That does not mean they do not exist — Dynamics just did not respond (missing read permission, timeout or network).” The button “↻ Try again” discards the error and reloads. The flow list has the sentence “The flow list could not be fetched: …” instead, without this button but with “Create flow …”.

#### What lapses when you change earlier choices

If you go back and change something, you have to make the discarded choices again later. The orange line says in each case what is missing.

| You change | What lapses |
|---|---|
| the app | the table choice with the table list, the email templates with the choice, and the flow list with the choice |
| the table | the email templates with the choice, the flow list with the choice and the whole path (levels, search, expanded tree) |
| the purpose | the flow list and the flow choice. “Yes, start this flow” stays checked, and the orange line asks for a new flow. “No, no flow” clears the flow choice. The choice under “Who receives the email?” stays; when displaying, it has no effect. |
| the place | nothing. But it decides whether the step “Several rows” appears and whether the entry in the field “Function” ends in “All”. |

A click on a card redraws the step, and the scroll position stays. The content jumps to the top only on a change of step, in the Path step on a new level or when a collection question opens or closes, in the Who step on a switch between the three cards, in the email step on a switch between “Always the same template” and “Depending on a condition”, and in the Flow step on a switch between “No, no flow” and “Yes, start this flow”.

### The first steps: action, app and table

#### What would you like to do?

Above the three cards is the question “What would you like to do?”. Above it, a blue box explains what it is about. If the template has no name, “(no name)” appears instead of the name. The box says, in substance: A button in Dynamics creates the finished document from the template with one click, right on the record and without the designer. Depending on the setting, it shows the document, opens an email with the document attached or sends it right away. Under “What happens next”, three points follow:

1. Below you choose whether you want to create, change or remove a button.
2. The assistant then asks, step by step, where the button should be and what it should do.
3. You do the last step yourself in Power Apps, the tool for customizing Dynamics. Instructions with images show every step, and what you have to enter is ready to copy.

[Image: The window “Manage buttons in Dynamics” in the first step, a white window with rounded corners on a light gray background. At the top, in a light blue box, is an explanatory text: A button in Dynamics creates the finished document from the template “Rechnung Standard” with one click, right on the record and without the designer; depending on the setting, it shows the document, opens an email with the document attached or sends it right away. Below it follows the subheading “What happens next” with three numbered points. Under the question “What would you like to do?” are three cards one below the other, each with an empty circle before the title: “Create a button” with a plus sign, “Change an existing button” with a pencil and “Remove a button” with a wastebasket, each with a sentence below. The footer bar shows “Step 1” on the left and in orange “Please choose what you want to do.”, on the right the button “Close”.]
Caption: The first step of the assistant. The names of apps, tables and flows in the following images are examples; in your environment you will see your own.
- Image marker 1: The light blue box says what a button does and how to continue.
- Image marker 2: The three cards under “What would you like to do?”. A click chooses a card and jumps right to the next step; a “Continue ▸” is not needed here.
- Image marker 3: The footer bar counts the steps, here “Step 1”. The orange line names what is still missing.
- Image marker 4: “Close” ends the assistant without a prompt.

| Card | What it does | Default |
|---|---|---|
| “Create a button” (＋) | Text: “A new button in Dynamics that prints this template or sends it as an email.” Chooses the branch “create” and jumps right to the App step, without “Continue ▸”. | none |
| “Change an existing button” (✎) | Text: “Label, location or template of a button that already exists.” Jumps right to “Which button do you want to change?”; the instructions follow after that. | none |
| “Remove a button” (🗑) | Text: “A button that is no longer needed.” Jumps right to “Which button do you want to remove?”; the instructions for removing follow after that. | none |

#### Which app should the button be in?

The explanatory text reads: “A modern command always belongs to exactly one app. If you want it in several, it has to be created in each one separately.” Below it is a card for every app of the environment that is switched on, sorted by name. It shows the app’s image, its name and below it its description, or else its technical short name. A click chooses the app. It determines the table list in the next step and the app in the link to the command designer.

The assistant reads at most 250 apps; it does not show more and does not say so. There is no sentence of its own for an empty list: then nothing can be chosen, and the orange line says “Please choose an app.” A different app discards the table, the email templates and the flow choice.

#### Which table should the button be on?

Explanatory text: “The table whose record the user has in front of them when they click.” This means the table on which the button will later sit in Dynamics, not necessarily the table of your template (see Data sources and relationships: The primary source).

| Element | What it does |
|---|---|
| “Search … (N tables in this app)” | Filters the table list as you type. A hit is every table whose display name or logical name contains the search text, regardless of upper and lower case. N is the number of all tables of the app. |
| Table rows (○ / ●) | Each row shows the display name in bold and below it the logical name in monospaced type. For the template’s table, “· the table of this template” appears after it. A click chooses the table; a different choice discards email templates, flow and path. It is sorted by display name. At most 40 hits are shown. Only tables that belong to the components of the app are listed (the assistant reads at most 1,000 components) and that are valid in the Advanced Find of Dynamics. |
| Notes below the list | “… and N more. Please search more precisely.” appears with more than 40 hits, “No table of this name in »*App*«.” if the search finds nothing. |
| Orange note line | Appears only if you have chosen a table that is not the template’s primary source. In substance: This template prints “*primary source*”, but the button is to sit on “*table*”. That works; in the next step you choose the relationship through which one leads to the other. If the template has no primary source, there is neither this comparison nor the Path step. |

### The path

This step appears only if the chosen table is a different one than the primary source of the template, for example if the button sits on the invoice line but the template prints the invoice. In this step you determine through which chain of relationships the button gets from the open record to the template’s record on click. The assistant chooses nothing itself, because there are often several suitable lookups. The explanatory text says: The button sits on “*table of the button*”, but the template prints “*primary source*”; choose the relationship through which one leads to the other, across several levels if need be.

[Image: The window “Manage buttons in Dynamics” in the step “How do you get from here to the template?”. Under an explanatory text that names the invoice line and the invoice, a single field with a light blue background, “Rechnungsposition”, appears as a breadcrumb. Below it the sentence “One relationship leads from here directly to »Rechnung« — it is marked below.” and a wide search box “Search relationship … (5 on this level)” with a magnifier icon. In a bordered area is a tree: the root “Rechnungsposition” and below it five rows, each with a small arrow for expanding and a colored badge. Four carry the blue badge “N:1” (“Rechnung · Rechnungs-ID”, “Produkt · Produkt”, “Einheit · Einheit” and “Benutzer · Besitzer”), the last one the violet badge “1:N” (“Notiz · Bezug”). At the right edge of the first row is a rounded button filled blue, “✓ Target — take this path”; in the four other rows is a white button with a blue border each, “Path via this row”. Below the tree, three short lines explain the signs. The footer bar shows “Step 4 of 8”, in orange “The path has not reached »Rechnung« yet.”, the button “Back” and a pale, disabled “Continue”.]
Caption: The step “How do you get from here to the template?” (in this chapter, for short: the path) for a button on the invoice line whose template prints the invoice. The relationship names are examples and depend on your environment.
- Image marker 1: The breadcrumb shows the path so far; the current level is highlighted in light blue.
- Image marker 2: The sentence says whether the target can be reached directly from here.
- Image marker 3: The search box narrows the relationships of the current level as you type.
- Image marker 4: The row “Notiz · Bezug” carries the badge “1:N”: there there can be several entries, so the assistant asks which one applies. The badge “N:1” in the rows above leads to exactly one record.
- Image marker 5: The filled button “✓ Target — take this path”: this relationship leads directly to the template’s table; the click accepts the path.
- Image marker 6: A bordered button “Path via this row” accepts the path up to this row; from there it goes one level further.

1. Read the line above the tree. It says whether the target can be reached directly from the current table.
2. In the relationship tree, expand relationships with ▸ until you find the right one. With “🔍 Search relationship …” you narrow down the list.
3. On the right of the row you want, click “✓ Target — take this path” or “Path via this row”.
   → The path up to this row is accepted, even if it went across several levels. The search is cleared, the content jumps to the top, and the breadcrumbs show the path so far.
4. If the level can have several entries, answer the question of which one applies.
5. If the blue box “✓ The path leads to the target” is there, test the path with “▸ Try the path on a real record” and continue with “Continue ▸”.

#### Breadcrumb, line above the tree, and tree

| Element | What it does |
|---|---|
| Breadcrumbs (*table* ▸ *level* ▸ …) | Show the path so far, starting from the button’s table. The current level is highlighted. Every earlier level is a button: a click goes back there and discards all later levels. The first breadcrumb, the button’s table, discards the whole path. This is the only way to change a question about several entries that has already been answered: cut off the level and choose again. |
| Line above the tree | Says whether the target can be reached directly from here. With one relationship: “One relationship leads from here directly to »*target*« — it is marked below.” With several: “There are N relationships that lead from here directly to »*target*«. Only you know which one is right — that is why we ask.” With none: “No relationship leads from here directly to »*target*«. Expand the relationships to see what lies behind them — the path may go across several levels.” |
| “🔍 Search relationship … (N on this level)” | Searches in the relationship tree. What is expanded stays expanded while you type. |
| Relationship tree (▸ expand, badges 1:N and N:1) | Shows the relationships of the current table in an area of its own with a scroll bar. The tree loads further levels only when you expand them; this way you see several levels at once. Relationships are called “*table* · *field*” so that those with the same name can be told apart. Fields, dragging, rules and your own variables do not exist here: only a path is chosen. Collections (1:N) are expressly allowed. The tree remembers what you have expanded. What the badges mean is described under Data tree and field picker: What the badges and additions mean. |
| “✓ Target — take this path” and “Path via this row” | The button on the right of every relationship. Relationships that lead directly to the template’s table carry the filled blue button “✓ Target — take this path”; all others the bordered “Path via this row”. Both accept the path up to this row, even across several levels at once (tooltip: “Use the path up to this row”). If the relationship cannot be resolved, an orange request appears to expand the branch once more and try again. |
| Footnote below the tree | Explains the signs: ▸ expands a relationship and shows what lies behind it; the blue button on the right accepts the path up to this row; filled means this row is already at the target; 1:N means there can be several, then it asks which one applies. |

#### The question: Which entry applies?

If a level is a collection (1:N), for example several invoices for one order, an orange card appears: “»*relationship*« can have several entries — which one applies?” Below it says: “When clicked, the button must print exactly one record. Without this information it could not continue.” As long as the question is open, the step shows only breadcrumbs and questions. There is deliberately no default: which record applies must not be decided silently. After the answer, the question disappears. In the path text, the answer is at the end of this level (`genau1`, `neueste` or `aelteste`, see the copy line “The path” under The path is done).

[Image: The window “Manage buttons in Dynamics” in the step “How do you get from here to the template?”, view after choosing a collection. Two levels are shown as breadcrumbs: on the left “Auftrag” white with a border, a small arrow, then with a light blue background “Rechnung · Auftrag”. Below is a large card with a light orange background and an orange border. Its heading reads “»Rechnung · Auftrag« can have several entries — which one applies?”, below it the sentence “When clicked, the button must print exactly one record. Without this information it could not continue.” In the card are three white answer fields with an empty circle: “Only if there is exactly one” (with the addition “If there are several, the button stops and says so. The safest choice.”), “The newest” (“Sorted by creation date; the most recent wins.”) and “The oldest” (“Sorted by creation date; the oldest wins.”). The footer bar shows “Step 4 of 8”, in orange “The path has not reached »Rechnung« yet.”, “Back” and a pale, disabled “Continue”.]
Caption: A collection in the path, here several invoices for one order: The assistant asks which entry should apply. There is no preselection.
- Image marker 1: The chosen level is a collection (1:N): several invoices can belong to one order.
- Image marker 2: The orange card asks the question. As long as it is open, the step shows only breadcrumbs and the question.
- Image marker 3: The three answers, without preselection: choose exactly one; it will later be at the end of the level in the path text.
- Image marker 4: The orange line in the footer bar and the pale “Continue ▸”: Without an answer, “Continue ▸” stays disabled.

| Choice | What it does | Default |
|---|---|---|
| “Only if there is exactly one” | “If there are several, the button stops and says so. The safest choice.” On click, the button fetches two entries in order to recognize “several”. The path text says `genau1`. | none |
| “The newest” | “Sorted by creation date; the most recent wins.” The path text says `neueste`. | none |
| “The oldest” | “Sorted by creation date; the oldest wins.” The path text says `aelteste`. | none |

#### The path is done: test and path text

[Image: The window “Manage buttons in Dynamics” in the step “How do you get from here to the template?”, view with a finished path. As breadcrumbs are “Auftrag”, an arrow and, with a light blue background, “Rechnung · Auftrag”. Below it a light blue box with a blue border and the bold heading “✓ The path leads to the target: Rechnung” and two sentences: When clicked, the button reads its way from “Auftrag” to here and then prints the record it finds; use the breadcrumbs above to go back if you want a different path. Below it, on the left, is the white button “▸ Try the path on a real record”, to the right of it the sentence “Takes any »Auftrag« record and follows the path.” Then follows the line “The path” with a read-only field in monospaced type that contains salesorderid<invoice:invoiceid:neueste, and the button “Copy”; below it “This is exactly what the button carries later as a parameter.” The footer bar shows “Step 4 of 8”, “Back” and a blue-filled “Continue ▸”.]
Caption: The finished path with the text that the button later receives as a parameter.
- Image marker 1: The blue box “✓ The path leads to the target”: Only when it is there does “Continue ▸” become available.
- Image marker 2: The button “▸ Try the path on a real record” and the sentence next to it: The button follows the path, read-only, on any record. It exists only in Dynamics.
- Image marker 3: The field in the row “The path”: This text later goes on the button as the last parameter; here with the answer `neueste` at the end.
- Image marker 4: “Copy” puts the text on the clipboard.

| Element | What it does |
|---|---|
| Blue box “✓ The path leads to the target: *primary source*” | Appears when the path has arrived at the template’s table and no question is open any more. Text, in substance: When clicked, the button reads its way from the button’s table to here and then prints the record it finds; use the breadcrumbs to go back if you want a different path. Tree and search box disappear. “Continue ▸” becomes available only when this box is there. What is printed later is the record at the end of the path, not the one on which the button was pressed. |
| “▸ Try the path on a real record” | Next to it it says “Takes any »*table*« record and follows the path.” The button exists only in Dynamics. On click it is disabled, and next to it “Trying it out …” appears. The assistant reads the first record delivered of the button’s table and follows the path read-only, with the same evaluation as the real button. Results: green “✓ The path works: it ends at »*table*« *ID*.”; orange the sentence of the button, plus “for this record the path does not lead to the target. Perhaps a different relationship is the right one, or this particular record has it empty.”; or “There is not a single »*table*« record in this environment — so the path cannot be tried out.” Only one record is checked; a warning does not necessarily mean that the path is wrong. If the button library cannot be loaded, the test reports that and asks whether the library is published in this environment. |
| Copy line “The path” | Note: “This is exactly what the button carries later as a parameter.” The path appears as text that you later enter in the command designer. A lookup (N:1) appears as `field>table`, a collection (1:N) as `field<table:key:choice`; several levels are separated by commas. In the instructions (Adding, changing and removing a button: The steps for creating a button), the same text returns in the step “Add the path as the last parameter”; after it, only the parameter with `flow:` may follow. |

#### When the path does not reach the target

- **Four levels have been reached and the target is not among them:** An orange box advises going back and trying a different relationship, because going further rarely helps and a different one usually gets there faster. Tree and search box then disappear. This is not a hard maximum depth: a single click in the tree can accept several levels at once and end at the target, and then a path with more than four levels is also done.
- **No relationship leads on from the table:** An orange box says that not a single relationship leads on from the table and advises going back above and trying a different one. This appears if Dynamics delivers no relationship for the current table.

### Place, several rows and purpose

#### Where in “*Table*”?

This is about Dynamics, not about Power Apps: where should the button later appear for your users? It is created only in the last step, in Power Apps. Each card shows a small sketch of the Dynamics view; the pink button sits where it would end up.

[Image: The window “Manage buttons in Dynamics” in the step “Where in »Rechnung«?”. Under a short explanatory text are four cards one below the other, each with a small sketch on the left and the title and a description on the right. The first card “Main form” is selected (blue border, light blue background, filled dot); its sketch shows a form with a pink button in its gray bar at the top. The sketch of the card “Main grid” shows a list with rows and checkboxes; the pink button is in the bar above the list. For “Subgrid view”, a small bordered list lies in the middle of a form, and the pink button sits in its own small bar. For “Associated view”, the sketch shows a tab bar with a tab marked blue and below it a list with the pink button. The footer bar shows “Step 4 of 7”, “Back” and a blue “Continue ▸”.]
Caption: The four places where a button can be in Dynamics. The pink button in the sketch shows where it ends up.
- Image marker 1: “Main form”: The button is at the top, in the bar of the open record.
- Image marker 2: “Main grid”: The button is above the whole list; here the user has to check a row first.
- Image marker 3: “Subgrid view”: The button belongs to the small bar of the list in the form, not to the large bar at the top.
- Image marker 4: “Associated view”: the list in the “Related” tab; in the sketch the tab is marked blue.

| Card | What the user has in front of them | Default |
|---|---|---|
| “Main form” | Exactly one record, the open one. The button is at the very top of the bar, next to “Save” and “Delete”. This is the most common case and the one to start with: what is to be printed is unambiguous, it is the open record. | preselected; “Continue ▸” is available at once |
| “Main grid” | The table’s list as a whole page. The button is above the list, in the same bar as “New” and “Delete”. Here it has no record open: the user has to check a row first, otherwise the button does not know what to build the document for. | – |
| “Subgrid view” | The records appear as a small list in the middle of the form of another record, for example all documents of an account at the bottom of its page. The button belongs to the small bar of this list, not to the large one at the top. Here too, rows are checked. | – |
| “Associated view” | Almost like the subgrid, just one level further: on the “Related” tab, where Dynamics shows the connected records as a full list. If you miss the button in the subgrid, you will usually find it here. Here too, rows are checked. | – |

The place goes into the link to the command designer. It also decides whether the step “Several rows” appears (for the three list places), whether the three instruction steps for visibility appear (likewise for the three list places) and which first parameter is to be entered: in the subgrid view and the associated view it is `SelectedControl`, otherwise `PrimaryControl`.

> **Caution:** With `PrimaryControl`, the button in the subgrid and in the associated view would get the form around it and would work for the record on whose page the list sits, instead of for the checked rows. If this record belongs to the same table as the template, its document is silently created, without any message. Otherwise the button warns that template and record do not fit together and that the document stays empty or shows something wrong; for the email purposes and with a path it cancels, and no email is then created. Check the first parameter in the command designer.

#### Does it matter what the user checks?

This step appears only at the three list places. The explanatory text says: In a list, the user can check several rows and then click the button. What should happen then? This does not change the document itself: for four records, exactly the same thing happens four times as for one.

| Card | What it does | Default |
|---|---|---|
| “Exactly one record” | “The button works for the one checked row. If several are checked, it stops and says so — better nothing than the wrong document. This is the previous behavior and the safe choice as long as nobody has asked for anything else.” The entry in the field “Function” gets no addition. The visibility formula in the instructions is `CountRows(Self.Selected.AllItems) = 1`. | preselected |
| “All checked rows, one after the other” | “If the user checks four rows, four documents are created — one after the other. At the end it says what succeeded; anything that goes wrong does not stop the others.” The entry in the field “Function” then ends in `All`. A flow on the button runs per record. The visibility formula is `CountRows(Self.Selected.AllItems) > 0`. Two note boxes appear below. | – |

Instead of an additional parameter, there is an entry of its own in the field “Function” for “all checked rows”, because the command designer takes parameters as text and a typo would otherwise go unnoticed. The eight entries are listed in What happens on click: The eight entries for the field “Function”.

#### The two boxes for “All checked rows”

- **Blue box on the limits.** If you have not yet seen the Purpose step, it says what applies depending on the purpose: when displaying, all documents end up one below the other in a single tab, because the browser allows only one new window per click and silently blocks every further one; with “Prepare an email and present it”, no draft opens with several rows, all the drafts are created, and at the end it says where they are; with “Send email immediately”, every email goes out without a prompt, and at the end it says how many were sent. The box also names the limit of 200 rows when displaying and that it does not apply to emails. What happens beyond it is described under What happens on click: The limit of 200 rows. After the Purpose step, it says only what applies to the chosen purpose. Strictly speaking, the sentence about the email drafts applies only if more than one row is checked: with exactly one, the draft opens as with a single record. After the purpose “Send email immediately”, it says: “With several records, every email is sent immediately, one after the other — without asking and without a draft. At the end it says how many were sent and what did not succeed; the sent emails are on each record’s timeline.” After the purpose “Download e-invoice”, it says: “With several records, one e-invoice is created per record, one after the other. They all come together as ONE ZIP file — the browser would not allow many individual downloads. Anything that fails does not stop the others, and at the end it says what is missing.” If the template has a switched-on e-invoice and you have not yet seen the Purpose step, the blue box additionally says: “With »Download e-invoice«, the e-invoices of all checked rows come together as ONE ZIP file.” The limit of 200 rows does not apply to this purpose.
- **Orange box on the visibility rule.** In substance: A visibility rule goes with this. As long as nothing is checked, the button should not be clickable. You do not have to program anything for this, the command designer has it built in; the last step shows where. The three instruction steps for visibility appear at all list places, also with “Exactly one record”.

#### What should the button do?

The explanatory text says: All three create the same document from this template; they differ only in what happens with it afterward. If the template has a switched-on e-invoice, it says instead: The first three create the same document from this template, the fourth delivers only the e-invoice of this template, as an XML file. Once this step has been shown, the preselected card also counts as an answer; from then on, the step “Several rows” shows the matching note text. Which entry in the field “Function” belongs to which card, in each case one for one record and one for all checked rows, is described under What happens on click: The eight entries for the field “Function”.

[Image: The window “Manage buttons in Dynamics” in the step “What should the button do?”. Three cards are one below the other: “Create and display the document” with the icon of a sheet with a red PDF label, “Prepare an email and present it” with a pale envelope and “Send email immediately” with an envelope with a blue arrow pointing up. The third is selected (blue border, light blue background); its text says that the button takes the recipient from the record, from a lookup such as the customer or from an email field, and that you choose this in the next step. The footer bar shows “Step 5 of 9”, “Back” and a blue “Continue”.]
Caption: The three purposes, here with “Send email immediately” for a template for an invoice.
- Image marker 1: Each purpose has its own drawn icon: a sheet with a PDF label, an envelope, an envelope with an arrow.
- Image marker 2: The text of the third card: The button takes the recipient from the record. Where exactly from, you choose in the next step, Who receives the email?

| Card | What it does | Default |
|---|---|---|
| “Create and display the document” | “One click — the document is built and opens in a new tab. From there you can view it, save it or actually print it. Nothing is stored in Dynamics and nothing is sent.” The finished PDF opens in the tab and is stored nowhere. No email template step follows. If the template has a switched-on e-invoice, the card appends a sentence saying what this button delivers for this template: for “e-invoice only (XML)”: “⚠ This template delivers its e-invoice as an XML file: the button offers it for saving. No PDF is created; the tab that opens on the click closes again right away.” (with a reading copy instead of the last sentence: “… and also shows the PDF as a reading copy in a new tab.”); for ZUGFeRD with an embedded PDF: “With this template, the PDF itself is the e-invoice (ZUGFeRD: PDF/A-3 with embedded XML).”; for a standard of your own whose output the template does not determine: “This template has an e-invoice: depending on the setting, it is embedded in the PDF, or the button offers it as an XML file for saving.” | preselected |
| “Prepare an email and present it” | “The document is built, an email is created from it and opened with the document attached. It is not sent — the user does that themselves after looking at it.” The document is attached to the draft as a PDF; attachments of the email template are copied along. After that follow the steps Who receives the email? and Email template. If you choose a lookup or an email field under Who, this recipient is in the draft. Otherwise the record itself is in the draft if it is a recipient (contact, account, lead, user, queue), and for any other table the draft is created without a recipient; the user enters it there. | – |
| “Send email immediately” | “The same, but the email is sent without confirmation. The button takes the recipient from the record: from a lookup such as the customer or from an email field — you choose this in the next step. If the template prints a contact, an account, a lead, a user or a queue, the email can also go to the record itself. Without a recipient the action stops instead of sending into the void.” After that follow the steps Who receives the email? and Email template. | – |
| “Download e-invoice” | “One click — this template’s e-invoice is created as an XML file and offered for saving; for ZUGFeRD, it is the XML that is otherwise embedded in the PDF. It is checked as when printing: if a value is missing, no file is created, and the button says what is missing. No PDF is created, and nothing is stored in Dynamics.” The card is available only if the template has a switched-on e-invoice. If the template has a condition under “Only if …”, the card adds: “⚠ This template only creates the e-invoice if its condition »Only if …« is met. If it is not met for a record, no file is created, and the button says so.” The instructions follow right after: the steps Who, Email template and Flow do not exist for this purpose. | – |

**When “Send email immediately” works:** You can choose this purpose for any template. Whether it can succeed is decided by the next step, Who receives the email?. If the template prints a contact (`contact`), account (`account`), user (`systemuser`), queue (`queue`) or lead (`lead`), the email goes to the record itself even without a choice. For any other table, the step needs a lookup or an email field; otherwise “Continue ▸” stays disabled. What is checked is the table of the template’s primary source, not the table on which the button sits.

**When “Download e-invoice” is available:** only if the template has the e-invoice switched on on the “E-invoice” tab of the template settings (see E-invoice: Switching on and “Only if …”). If you switch it off afterward, a chosen purpose falls back to “Create and display the document”. The card depends on the state of the open template; the finished button, by contrast, reads the saved template on click (see Adding, changing and removing a button: The steps for creating a button, step “Save the template — otherwise the button does not know the e-invoice”).

[Image: The window “Manage buttons in Dynamics” in the step “What should the button do?” for a template with an e-invoice. Under the question is an explanatory text: The first three create the same document, the fourth delivers only the e-invoice as an XML file. Four cards are one below the other. “Create and display the document” is chosen (blue border) and carries, at the end, the note that this template delivers its e-invoice as an XML file, that no PDF is created and that the tab that opens on the click closes again right away. Next come “Prepare an email and present it”, “Send email immediately” and, with a green icon “XML”, “Download e-invoice”. At the bottom “Step 5 of 7”, “Back” and the blue button “Continue”.]
Caption: The Purpose step for a template with an e-invoice: four cards instead of three.
- Image marker 1: The fourth card appears only if the template has a switched-on e-invoice.
- Image marker 2: The card “Create and display the document” says what this button delivers for this template.
- Image marker 3: The explanatory text names the difference of the fourth card.

### Who receives the email?

This step appears only for the two email purposes, directly after the purpose. The explanatory text says: The button can pass along the recipient from the record for which the document is created, from a lookup such as the customer or from an email field. It reads it on click from exactly the record that the template prints. If the button sits on a different table than the template, that is the record at the end of the path. The choices are therefore the fields of the table of the primary source, not those of the table on which the button sits.

[Image: The window “Manage buttons in Dynamics” in the step “Who receives the email?”. Under the explanatory text are three cards: “As before — the button supplies no recipient” with the sentence that this does not work for “Send email immediately” here, because the template prints no contact, no account, no lead, no user and no queue; “From a lookup of the record” (selected, blue border) and “From an email field of the record”. Below it the label “Lookup” and a selection list with “Kunde (customerid) → account, contact”, below it a note with a warning triangle: “If the field is empty on a record, the button sends nothing for it and says so — it does not guess another recipient.” The footer bar shows “Step 6 of 9”, “Back” and a blue “Continue”.]
Caption: The step for a template for an invoice, with the lookup to the customer.
- Image marker 1: “As before”: The button supplies no recipient. With “Send email immediately”, that works only if the template itself prints a contact, an account, a lead, a user or a queue; not here, hence the sentence in the card.
- Image marker 2: “From a lookup of the record”: for example the customer or a contact person.
- Image marker 3: “From an email field of the record”: a text field in email format.
- Image marker 4: The list of suitable lookups: display name, logical name in parentheses, and after it the tables the lookup points to.

| Card | What it does | Default |
|---|---|---|
| “As before — the button supplies no recipient” (—) | The button supplies no recipient. The text of the card says what then happens. If the template prints a contact, an account, a lead, a user or a queue, it says: “The email goes to the record itself — … and that is a recipient itself.” For any other table, with the purpose “Prepare an email and present it” it says: “The draft opens without a recipient, and the user enters it there.” With the purpose “Send email immediately” it says: “Does not work for »Send email immediately« here: the template prints no contact, account, lead, user or queue — the record is not a recipient itself, and without a recipient the button sends nothing.” Every button without the parameter `to:` behaves this way too, including all that already exist. | preselected |
| “From a lookup of the record” (↗) | “For example the customer or a contact person. The lookup must point to a contact, an account, a lead, a user or a queue; the email goes to its email address.” Below it appear a dividing line and the selection list “Lookup”. | – |
| “From an email field of the record” (@) | “A text field in email format. The email goes to the address it contains; several addresses separated by semicolons work too.” Below it appear a dividing line and the selection list “Email field”. | – |

The button carries the choice as a further parameter with the beginning `to:`, for a lookup for example `to:_customerid_value`, for an email field for example `to:emailaddress1`. The instructions at the end name it for copying (see Adding, changing and removing a button: The steps for creating a button).

#### The selection list

| Setting | What it does | Default |
|---|---|---|
| “Lookup” (label on the left) | Chooses the lookup. Entries: “— please choose —” and, for each lookup, the display name, in parentheses the logical name and after an arrow the tables that the lookup can point to. A lookup is offered as soon as it can point to at least one of the five tables contact, account, lead, user or queue. | “— please choose —” |
| “Email field” (label on the left) | Chooses the text field. Entries: “— please choose —” and, for each field, the display name with the logical name in parentheses. The text fields in email format are offered. | “— please choose —” |

The names in the list come from Dynamics; they are data and stay untranslated in the English interface. If you switch the card, the choice in the list is empty again. As long as the list is at “— please choose —”, “Continue ▸” stays disabled (see The orange line).

#### Notes below the selection

| Note | When and what it says |
|---|---|
| “*Lookup*” can also point to “*table*”. … | Orange. Appears below the selection if the chosen lookup can point not only to contact, account, lead, user or queue but also to a table that is not a recipient itself. The table appears with its logical name, for example “team”. It continues: “If it points there on a record, that is not a recipient: »Send email immediately« then sends nothing and says so, and a draft opens without a recipient.” |
| If the field is empty on a record, … | Appears below every filled list, even before you have chosen anything. With the purpose “Send email immediately”, orange: “⚠ If the field is empty on a record, the button sends nothing for it and says so — it does not guess another recipient.” With the purpose “Prepare an email and present it”, gray: “If the field is empty on a record, the draft opens without a recipient as before; the user enters it there.” What the user sees on click is described under What happens on click: When the button cancels. |

#### If the list is empty or does not load

If the table has nothing to choose, an orange box appears: “»*Table*« has no lookup to a contact, an account, a lead, a user or a queue.” or “»*Table*« has no text field in email format.” You get no further with this card; choose a different one. In the case of a loading error, “The fields of the template’s table could not be fetched: …” appears instead, with the reason and the button “↻ Try again” (see Loading and errors).

### Email template: always the same or depending on a condition

This step appears only for the two email purposes. It determines which email template from Dynamics supplies the subject, text and attachments. The explanatory text says: It supplies the subject, text and its attachments, and the attachments are copied into every email. Two kinds are offered: email templates that are built for the table of the primary source (the text names the table’s logical name), and email templates of the type “User”, which apply to every record. An email template of a foreign table is not available for choosing, because it would silently fill its placeholders with nothing. This also applies to the email templates of the cases and of the otherwise branch.

The assistant fetches at most 250 email templates, sorted by title, and does not say so if there are more. If there is neither a template for the table nor one of the type “User”, an orange box appears: create one in Dynamics, under Settings → Templates → Email Templates. The cards are then missing, and “Continue ▸” stays disabled.

| Card | What it does | Default |
|---|---|---|
| “Always the same template” (✉) | “One button, one template. The simple and more common case.” Below it are a dividing line and the selection list “Email template”. The button gets the email template’s ID as its third parameter. This choice does not delete cases of the template that are already saved. On click, the cases are evaluated anyway, and their warnings can appear. The email template, however, is determined by the parameter on the button; the note about this appears only together with a warning, so users usually do not see it. | preselected as long as the open template contains no if-then cases and no otherwise value, not even unsaved ones |
| “Depending on a condition” (⑂) | “For example: »if the order type is Project, use this template«. The button decides when clicked, based on the record’s data.” Below it follow a note about the fields, the case cards, “Add case” and the otherwise branch. The button gets no parameter for the email template in this case; it reads the cases from the saved template on click. | preselected if the open template already contains cases or an otherwise value |

#### The selection list “Email template”

It appears with “Always the same template”, with the label on the left. The list is based on the template’s primary source, not on the button’s table. The names of the email templates are data.

| Entry | What it means | Default |
|---|---|---|
| “— please choose —” | No choice yet; “Continue ▸” is disabled. | preselected |
| Group “Built for »*Table*«” | The email templates that are built for the table of the primary source (with the logical name of the table). The two group headings appear only if both kinds exist; otherwise a flat list appears. | – |
| Group “Template type »User« — applies to every record” | Templates of the type “User” that apply to every record. | – |
| “⚠ Not in the list — ID *ID*” | A substitute row for an ID that is already set in the template but is not in the list because the email template was deleted, is built for a different table or lies beyond the first 250. It occurs only in the lists “Then this email template” and “Otherwise — if no case applies”, not with “Always the same template”. It stays visible and selected as long as you choose nothing else. If you choose something else, it disappears and does not come back. The tooltip says: This email template is set, but it is neither among those for the table nor among those of type “User”, probably deleted or built for a different table. If so, the button stops with a message when sending; please choose one from the list. | – |

#### Depending on a condition: the cases

With “Depending on a condition” you create if-then cases: if a condition applies, a particular email template applies. The first matching case wins; after that, the search does not continue. The number of a case therefore has a meaning.

[Image: The window “Manage buttons in Dynamics” in the step “Which email template?”. At the top two cards: “Always the same template” with an envelope (not selected) and “Depending on a condition” with a branching icon (selected, blue border). Below it is a note with a gray edge line saying that the 5 fields that the template uses from “Rechnung” are available. Next comes a bordered card “Case 1” with a pale up-arrow button and a button with ✕ at the top right. In it, under “If”, is a builder with the switches “AND” (active, blue) and “OR”, an info icon, a condition row with the field “Bezahlt” and the comparison “is no” and the buttons “Condition” and “Subgroup”. Under “Then this email template” is a selection list with “Zahlungserinnerung”. Under the case card is the button “Add case”, below it a card with a dashed border, “Otherwise — if no case applies”, with the sentence that the button stops without this entry and a selection list with “Rechnung versenden”. The footer bar shows “Step 7 of 9”, “Back” and a blue “Continue ▸”.]
Caption: If-then cases for the email template: one case and the otherwise branch. The first matching case wins.
- Image marker 1: The note with a gray edge line: Only fields that the template uses are available.
- Image marker 2: The buttons “↑” and “✕” in the head of the case: “↑” moves the case up (for the first case it is grayed out), “✕” deletes it at once and without a prompt.
- Image marker 3: The builder under “If”: the same as for the visibility rules, only with the fields of the template.
- Image marker 4: The selection list under “Then this email template”: the email template that applies if the condition applies.
- Image marker 5: “Add case” appends a new, empty case; it is saved only once it is complete.
- Image marker 6: The dashed otherwise branch: the fallback if no case applies. Without it, the button then stops.

| Element | What it does | Default |
|---|---|---|
| Note on the fields | With fields, a note with a gray edge line appears: The fields that this template uses from the primary source are available. If you need another one, add it on the left under “Data”; a field that the template does not know is not even fetched when printing, and the condition would then never apply. If the template does not yet use any fields in its primary source, an orange box appears: There is nothing a condition could judge; add fields on the left under “Data”. Then cases, “Add case” and the otherwise branch are missing entirely. | – |
| Case card (case *n*) | A card with a header row, the builder “If” and the selection “Then this email template”. A case is written into the template only once condition and email template are set. A half-finished case lives only in the window and is gone when you close it. It is written at once into the open template; there is no save path of its own. A case without “Then” is also skipped when printing, and a case that cannot be evaluated is skipped with a warning. | – |
| “↑” in the case card | Tooltip: “Move up — the first matching case wins”. Moves the case up one place and writes the new order into the template at once. For the first case the button is grayed out. There is no button for moving down. | – |
| “✕” in the case card | Tooltip: “Remove this case”. Deletes the case at once and without a prompt, also from the template. | – |
| Builder “If” | It is the builder of the visibility rules (see Conditions: The builder), here with three restrictions: “Choose field …” opens “Choose a field of this row” only with the fields of the template’s primary source, without relationships and without rules; the head reads “Row from »*primary source*«”, the note “Only the fields this template uses are checked — the same ones the document uses.” The switch “123” / “ƒx” does not exist here; comparison is always with a fixed value (see Conditions: Fixed value or value from the data: “123” and “ƒx”). Your own variables do not exist in the field picker (see Data tree and field picker: The field picker). A new case begins with an AND group and an empty condition row. The ⓘ explains AND, OR and subgroups as everywhere in the builder (see Conditions: AND, OR and subgroups). | – |
| Box “Written by hand — and this is the condition that applies: …” | If the template contains a hand-written condition that the condition parts cannot represent exactly like this, the card shows it in this box above empty condition parts. It applies unchanged until you fill the condition parts; then these replace it. Merely opening changes nothing. More under Conditions: Hand-written conditions. | – |
| “Then this email template” | The selection list is the same as “Email template”: the email template that applies if the condition of this case applies. Every choice is written into the template at once, provided the case is complete. | “— please choose —” |
| “Add case” | Button below the case cards. Appends a new, empty case at the bottom. It is saved only once it is complete. | – |
| “Otherwise — if no case applies” | Card with a dashed border and the selection list of email templates: the fallback that applies if no case applies. Text: Without this entry, the button stops if no case applies; it would rather send nothing than the wrong thing. The otherwise branch also works alone: an otherwise value without a single case is enough for “Continue ▸” to become available. The choice is written into the template at once. | “— please choose —” |

> **Caution:** The cases belong to the template, not to the button. After creating or changing a case, they are in the open template as an unsaved change. Then save the template with “Save”, otherwise the button does not know them. The instruction step “Save the template — otherwise the button does not know the cases” reminds you of this (see Adding, changing and removing a button: The steps for creating a button).

The cases do not affect the document. They are evaluated after the document is built, against the same data that the visibility rules see; with a path, that is the data of the record at the end of the path. If a field name is misspelled, the button reports on click a warning that case *n* checks a field that is not in the record’s data. If in the end neither a case nor an otherwise branch determines an email template, and the button carries none either, the action cancels. Which email templates are available for choosing is described under Email template: always the same or depending on a condition. Where else conditions occur is described under Conditions: Where conditions occur.

### The step “Should a Power Automate flow run afterwards?”

The explanatory text says: A cloud flow (Power Automate) can carry on afterward, for example filing the document in SharePoint, starting an approval or notifying Teams. The button starts it as soon as the email is ready, with the purpose “Create and display the document” as soon as the document is ready; nobody has to wait for it. For the purpose “Download e-invoice”, this step is omitted: the action behind it, `st_GenerateEInvoice`, has no input for a flow, and the instructions contain no step for it.

[Image: The window “Manage buttons in Dynamics” in the step “Should a Power Automate flow run afterwards?”. Under the explanatory text are two cards: “No, no flow” with a dash as an icon (not selected) and “Yes, start this flow” with a circular arrow (selected, blue border). After a dividing line, on the left is the label “Flow” and next to it a selection list with the selected entry “Smart Templates – Rechnung · via a document request”. Below it a gray note that begins with “Yours is not there?” and says that only flows from a solution are listed here, below it the blue button “Create flow …” with a flow symbol. Below the button, a gray paragraph explains that “Smart Templates – Rechnung” is started through a document request and its step “Hauptdatensatz holen” is set to “invoices” as a fixed value. The footer bar shows “Step 8 of 9”, “Back” and a blue “Continue ▸”.]
Caption: The Flow step with a chosen flow. The state of a flow is in its name in the list.
- Image marker 1: The chosen card “Yes, start this flow”: Only with this choice do the list and button appear; without a flow, “Continue ▸” stays disabled.
- Image marker 2: The selection list next to “Flow”: The state is in the name, for example “(switched off)”, “· on the email” or “· via a document request”.
- Image marker 3: The gray note “Yours is not there? …”: Only flows that are in a solution count.
- Image marker 4: “Create flow …” opens the flow management over the assistant.
- Image marker 5: The gray paragraph under the button explains what the chosen flow gets on click.

| Card | What it does | Default |
|---|---|---|
| “No, no flow” (—) | “The button does exactly what you chose above — nothing more.” Clears the flow choice. | preselected |
| “Yes, start this flow” (↻) | “The flow learns which record it was about and then carries on by itself.” Below it appear a dividing line, the flow selection, notes and “Create flow …”. The PDF itself is not passed to the flow: a flow on the table “Email” gets the created email with the document as an attachment, a flow on the table “Smart Templates Auslöser” fetches the document itself. Without a chosen flow, “Continue ▸” is disabled. | – |

#### The selection list “Flow”

| Setting | What it does | Default |
|---|---|---|
| “Flow” (label on the left) | Chooses the flow. Entries: “— please choose —” and, for each flow, the name, with an addition after the name depending on its situation: “(switched off)”; “· on the email” (the flow is attached to the table “Email”, in the list only for the email purposes); “· via a document request” (it listens to the table “Smart Templates Auslöser”; this holds for all flows created by the designer and for flows you built yourself on this table); “· table not recognizable” (neither Dynamics nor its trigger names a readable table). The state is in the name because flows that are switched off deliberately stay in the list. | “— please choose —” |

At most 250 cloud flows of the environment are read, sorted by name; those that come last alphabetically are therefore missing. If there are more, the following appears below the selection and its notes: “Only the first 250 cloud flows were loaded. If yours is not there, let us know — the limit can be raised.” If no flow is left after sorting out, this sentence is missing; a flow can then also be missing because it lies alphabetically after the first 250. Only flows that are in a solution count; what is under “My flows” does not exist in Dynamics and cannot be triggered. Create such a flow in a solution or add it to one (in Power Automate: Solutions → your solution → “Add existing” → Automation → Cloud flow). Not offered are:

- the test flow “Smart Templates – Verbindungsprobe”,
- flows that name no table in Dynamics and are not on-demand, so cannot be started from outside (they usually have the wrong trigger, see What happens on click: When the button cancels),
- flows on the table “Smart Templates Auslöser” that do not listen to new rows,
- flows on a different table than the template’s primary source,
- with the purpose “Create and display the document”, also flows on the table “Email”,
- flows created by the designer with a different fixed primary table.

A flow created by the designer carries its template’s table as a fixed value in the step “Hauptdatensatz holen” and is therefore offered only to templates with the same primary table. Flows without a fixed table are available for every template: flows you built yourself without this step and flows that were created for a template whose source carried no table name. If the source of the currently open template carries no table name, the assistant does not sort out by primary table at all. Then flows of a different fixed primary table are also available for choosing, and the note on the chosen flow advises choosing it only with the same primary table. If a flow’s definition cannot be read, it appears with a warning. On click, Smart Templates does not check this binding.

#### Notes below the selection

| Note | When and what it says |
|---|---|
| Yours is not there? Only flows from a solution are listed here. … | Appears below the selection. In substance it continues: What is under “My flows” does not exist in Dynamics at all and therefore cannot be triggered either (see The selection list “Flow”). You can also create a new one here. If needed, the number of flows via a document request that were created for a different primary table and are therefore not available for choosing follows, as does the sentence that flows you built yourself on “Smart Templates Auslöser” could not be read just now. |
| Note on the chosen flow | Explains what the chosen flow gets on click and whether it will run. At most one box appears; the cases are in the list below this table, in the order in which they are checked. |
| Orange note for “all checked rows” | Only at a list place with “All checked rows, one after the other” and a chosen flow: The flow runs per record, four checked rows result in four flow runs. |
| Green or orange box after creating | Appears once, directly after a creation from this step. If a flow was created via “Create flow …” and it appears in the newly loaded list, it is selected, and a green box says: It was created and is selected below; you build what the flow should do in Power Automate, and the button also works as long as only the placeholder is in there; the reminder about the wait after switching on is added, with the same sentence as in “Manage flows” (wording and duration in the tip under Flows: Manage flows). If it is missing from the list, an orange box appears: The flow was created but does not appear yet; wait a moment, go back one step and forward again. It is not selected in this case: what is not listed here is not carried by the button either. |

1. **Switched off** (orange): The note warns that the button cancels with a flow that is switched off before anything is created (see What happens on click: When the button cancels). Switch the flow on in Power Automate. With a flow that is switched off, only this warning appears, even if it also runs via a document request.
2. **On the email:** The flow is attached to the table “Email”. This is the most useful case: it gets the created email and thus the document as an attachment, without you having to pass anything along.
3. **Via a document request:** On click, a request row is created, the flow listens for it and fetches the document itself. Depending on the flow, it says: With a fixed table, that its step “Hauptdatensatz holen” is set to the table name of this template’s primary table and it is therefore offered only for templates with the same primary table. Without a verifiable table name, the advice to choose it only with the same primary table. With free binding, that it carries no fixed table and therefore suits every template. With an unreadable definition, that it could not be read whether the step is set to a table.
4. **Table not recognizable** (orange): The flow names no table in Dynamics. Smart Templates starts it anyway and passes the record of the template’s table; whether its trigger really listens to this table cannot be checked from here. Look in Power Automate before you choose it.
5. **Otherwise:** The flow is passed the record of the table that the click was about.

#### If the list is empty or does not load

In the case of a loading error, “The flow list could not be fetched: …” appears, with the reason and the button “Create flow …”. If the list is empty, an orange box with several paragraphs and the same button appears. It names the reasons, as far as they apply:

- Most often: The assistant sees only flows that are in a solution. A flow under “My flows” never appears here (see The selection list “Flow”).
- One or more cloud flows name no table in Dynamics and are not on-demand, if applicable with the addition that flows you built yourself on “Smart Templates Auslöser” could not be read just now. Flows on this table that do not listen to new rows are likewise sorted out by the list; the box then names them with the same reason, which does not fit here.
- One or more flows are attached to a different table than that of the template. You do not have to rebuild that: flows that the designer creates do not need a trigger on this table.
- One or more flows via a document request were created for a different primary table and are therefore not available for choosing; create one of your own for this template.
- The short way: the button “Create flow …” below. The flow is created there, switched on and fully wired, and it opens right away in Power Automate.
- Only with the email purposes: A flow that is instead attached to the created email still works; it then gets the document as an attachment.

If you prefer to build the flow yourself (the long way), the assistant names the settings; they are listed, with the names from Power Automate and the necessary row filter, under Actions and APIs: Starting a flow.

#### The button “Create flow …”

The button is highlighted and carries a drawn symbol. Tooltip: “Opens the flow management. The flow is created here and opens in Power Automate right away — after that it is in this list.” It appears only with “Yes, start this flow” and is in all three situations: with a loading error, with an empty list and with a filled list, where it is indented. It opens the window Manage flows over the assistant, and every change there arrives here: after a creation, the flow list is fetched anew, and the new flow is selected as soon as it really appears in the new list. After a removal, the list is fetched anew and the selection in the assistant is cleared, whichever flow was removed; “Yes, start this flow” stays checked in that case, and “Continue ▸” is disabled until you have chosen a flow. After that, the content jumps to the top.

### The last step: the instructions

The last step of all branches is called “Step by step”. It is the instructions for the command designer of Power Apps, with the link there, every value to copy and a recording for most steps. When creating, it has 13 to 20 steps, when changing and removing four. It has a page of its own: Adding, changing and removing a button. In the footer bar, “Continue ▸” is missing in this step, and “Close” ends the assistant (see The footer bar).

What the finished button does on click is described under What happens on click. The flows that the button can start you create under Flows.

### What changes in the document?

**On the canvas:** Nothing. The two buttons and all settings in their windows change nothing on the sheet. The assistant writes the email template’s if-then cases into the template, not onto the sheet; they are an unsaved change until you press “Save” at the top.

**In the PDF:** No setting of the two windows changes the PDF. The email template’s if-then cases have no influence on the document, nor does the flow (see Flows: What changes in the document?). What the finished button prints and how it differs from the button “PDF” is described under What happens on click: What changes in the document?; it also says there that no document is created at all if the flow is switched off or removed at the time of the click.

---

## Adding, changing and removing a button

*For users · Printing and Dynamics · Page en/button-einbauen.html*

> **In short:** The assistant does not create the button itself. It leads you with a link to the right place in the command designer of Power Apps and provides every value to copy; you do the steps there yourself. This page describes them: 13 to 20 steps when creating, depending on what you chose in the assistant, and four when changing and removing. Most of them come with a short recording from Power Apps. Which questions the assistant asks beforehand is described under Buttons: the assistant, and what the finished button does on click under What happens on click.

### The process at a glance

For these steps you need the right to edit the app in which the button is to appear (see Rights and roles: Adding a button). The template must be saved. What an administrator otherwise has to prepare is described under Preparing buttons and flows.

1. At the top of the designer, click “🖨 Manage buttons in Dynamics”. Choose the app, the table and the place of the button, for example the main form or the list, whether it applies to one row or to all checked rows, and what it should do: show the document, email draft, send email immediately or, for a template with a switched-on e-invoice, download the e-invoice. For the two email purposes you also choose who the email goes to. Each of these questions is explained in Buttons: the assistant: The steps at a glance.
2. The designer shows instructions with all values to copy and a link. The link opens the command designer at the right place (see The instructions in the command designer).
3. Create a new command there, give it a label and enter the values from the instructions (see The steps for creating a button).
4. In the command designer, click “Save and Publish” and then reload the app with `Ctrl` + `F5`. Even then it can take a few minutes until the button appears, because Dynamics caches the command bar.

When changing and removing, the assistant only asks which button is meant; the steps for that are under Changing or removing a button.

> **Good to know:** Whether a button applies to one or to all checked rows is chosen in the assistant (see Buttons: the assistant: Does it matter what the user checks?). How many rows a button processes at once is described under What happens on click: Several checked rows. Where “Send email immediately” gets the recipient from is described in Buttons: the assistant: Who receives the email?

### The instructions in the command designer

The instructions are the last step of all branches, “Step by step”. The explanatory text says: From here on it is about Power Apps, where the button is created. The images show the command designer; the pink frame encloses what you have to click each time. When changing, it says “changed” instead of “created”, and when removing, “removed”.

[Image: Upper part of the window “Manage buttons in Dynamics” in the last step “Step by step”. Below a short explanatory text there is a light orange box with an orange border, a warning triangle and the bold line “You create the button yourself.”, below it the sentence that the link and every value to copy are ready here. Below that follows a button filled blue across the full width, “▸ Open the command designer at this location”. Below it the copy line: on the left “… or the link”, in the middle a read-only field in monospaced type with the beginning of an address (https://make.powerapps.com/e/…), on the right the button “Copy”, below it “In case the button above is blocked.” After a dividing line, the first card “1 · Open the command designer” begins, with a sentence about the command bar of “Rechnung” in the app “Vertriebshub”, place “Hauptformular”. The image ends with this card.]
Caption: The head of the instructions: The button is created in Power Apps; the blue button leads there. The address in the field is an example.
- Image marker 1: The orange box: The assistant does not create the button; you do that yourself in Power Apps.
- Image marker 2: The blue button opens the command designer in a new tab at exactly the right place.
- Image marker 3: The copy line “… or the link” with the button “Copy”: the same link to copy, in case the browser blocks the new tab.
- Image marker 4: The first card “1 · Open the command designer”: The steps are listed one below the other as numbered cards.

#### The head: notice, link and copy line

| Element | What it does |
|---|---|
| Orange box in large type | When creating: “You create the button yourself.” Below it: Everything is ready here, the link to exactly the right place and every value to copy, each at the step where you have to type it in. When changing and removing: “Changes and removals are made in the same place where buttons are created.” With a link, this follows: The link below takes you to the place where this button is located. Without a link: This button applies in every app, so no link to a specific place can be built; open Power Apps by hand and look for the table there. |
| “▸ Open the command designer at this location” | Highlighted button across the full width. It opens the command designer of Power Apps in a new tab at exactly the right place: environment, default solution, table, app and place. This can take a while, because Power Apps loads the whole app. When changing and removing, table, app and place come from the chosen button. The button appears only if a link can be built, that is, if environment, table and app are known; otherwise an orange box appears: For this button the link cannot be built, it is bound to no app and thus applies in every one; open Power Apps by hand and look for the table there. |
| Copy line “… or the link” | Note: “In case the button above is blocked.” It appears only together with the button and contains the same link to copy, in case the browser blocks the new tab. |

#### The steps for creating a button

Each step appears as a card with the heading “*Number* · *Title*”, for example “1 · Open the command designer”. After many titles, the name as Dynamics shows it follows after a dash, for example “9 · Enter the function — »Function name«”; the table gives the titles without this addition. The numbers count on continuously; the steps for the third parameter, saving the template, the path, the recipient, the flow and the visibility have no fixed number. Cards 1 to 11 always appear; after them come the cards needed depending on your choices, and at the end “Save and Publish” and “Try it out once”. Each card contains the text with paragraphs, if applicable a copy line (above the image, because the image shows only a single case), the image and, if applicable, a closing note with an orange border.

| Step | What you do in the command designer | Value to copy |
|---|---|---|
| “1 · Open the command designer” | Press the blue button at the top. It takes you directly to the command bar of the chosen table in the chosen app, at the chosen place. It may take a moment. | – |
| “2 · Create a new command” | At the top left, click “＋ New” (“+ New”) and then “Command” (“Command”). A window with the properties opens on the right; you enter everything else there. | – |
| “3 · Click the new command and move it into place” | The new command is first called “NewCommand” and usually sits next to the one selected before. Click it once: it gets a colored frame, and everything that follows applies to it. Then drag it with the mouse button held down to the desired place. The order in the bar is what the users will see later; whatever no longer fits, Dynamics hides behind “⋯”. | – |
| “4 · Enter the »Label«” | At the very top right is “Label” (“Label”), the text on the button. As you type, the name in the bar changes immediately. If nothing changes there, you selected the wrong command. | “Suggestion”: “Show document”, “Send by email”, “Send immediately by email” or “Download e-invoice”, depending on the purpose. Note: Just a suggestion, feel free to write your own text here. |
| “5 · Give it an »Icon« (optional)” | Under the label, set “Icon” (“Icon”) to “Use Icon” (“Use Icon”) and look in the field below it for a suitable one, for a document for example “PDF”, for “Download e-invoice” better “Download”. Without an icon the button works just as well; it merely looks plainer in the bar. | – |
| “6 · Choose »Run JavaScript« as the action” | In the list “Action” (“Action”), choose “Run JavaScript” (“Run JavaScript”), not “Run formula” (“Run formula”); that is something different. | – |
| “7 · Check whether the »Library« is already there” | Open the field “Library” (“Library”). If `st_button.js` is listed there, select it and skip the next step. It is always like this if a Smart Templates button has already been built on this bar. | “Library”: `st_button.js`. Note: Write it exactly like this, with .js at the end. |
| “8 · Add the library — »Add library«” (only if it was not in the list in the previous step) | Click “Add library” (“Add library”), type the name into the search box of the window, click the hit and accept it with “Add” (“Add”). If you do not find it there, it is usually already attached: the window shows only what has not been added yet. Then go back one step and look for it in the list. | “Library”: `st_button.js`. Note: Into the search box of the window. |
| “9 · Enter the function — »Function name«” | The field “Function” (“Function name”) takes the name that fits the chosen purpose. If it ends in `All` because you chose “all checked rows”, it is the same operation in a loop; what applies without `All` is described under What happens on click: The eight entries for the field “Function”. | “Function”: one of the eight names from the table under What happens on click: The eight entries for the field “Function”; for the purpose “Download e-invoice” `SmartTemplates.Button.downloadEInvoice`, for “all checked rows” `SmartTemplates.Button.downloadEInvoiceAll`. Note: Exactly like this, with the dots. |
| 10 · Add the first parameter | Click “Add parameter” (“Add parameter”) and choose `PrimaryControl` in the type list; in the subgrid view and the associated view, choose `SelectedControl` instead (there, `PrimaryControl` is the form on which the list sits, and the button would work for that one record instead of for the checked rows). Do not look for the entry in the text field: it is an entry of its own in the list, not a string that you type. This parameter must come first; through it the button learns on which record, or for which rows, it was pressed. At the two list places, a closing note appears under the image: if the image shows `PrimaryControl`, it comes from a button on the form; here you choose `SelectedControl` in the same list. | – |
| 11 · Add the second parameter | “Add parameter” once more, this time as type “String” (“String”). In the field below it goes the identifier of this template. | “Parameter 2”: the identifier of the template. Note: The ID of the template “*Name*”. |
| “Add the third parameter” (only for an email purpose with “Always the same template” and a chosen email template) | “Add parameter” a third time, again as “String”. This is the email template that supplies the subject, the text and its attachments. | “Parameter 3”: the identifier of the email template. Note: The email template “*Name*”. |
| “Save the template — otherwise the button does not know the cases” (only for an email purpose with “Depending on a condition”; no image) | The if-then cases belong to the template, not to the button. Save them at the top of the designer with “Save” before you try out the button. The button deliberately gets no parameter for the email template in this case; it asks for the cases on click. | – |
| “Add the path as the last parameter” (only if the button sits on a different table than the primary source) | “Add parameter” once more, again as “String”. This is the path from the table of the button to the primary source; without it the button would not know which record to print. It must come after the template and the email template; only parameters with `flow:` or `to:` in front of them may come after it. | “Parameter 3” or “Parameter 4” (4 if the third is the email template): the path text. Note: On the left the lookup field, on the right the table behind it; several levels separated by a comma. |
| “Add the recipient as a parameter” (only for an email purpose, if you chose a lookup or an email field in the step “Who receives the email?”) | “Add parameter” once more, again as “String”. With it, the button passes the recipient from the record on click. The `to:` at the beginning belongs to it and must not be dropped: it is how the button recognizes that this is the recipient and not the path. With the prefix, the order does not matter either. For “Send email immediately”, a note follows below: if the field is empty on a record, the button sends nothing for it and says so. | “Parameter 3” to “Parameter 5”: `to:_field_value` for a lookup, for example `to:_customerid_value`; `to:field` for an email field, for example `to:emailaddress1`. Note: Exactly like this, with `to:` in front. |
| “Add the flow as a parameter” (only with “Yes, start this flow” and a chosen flow) | “Add parameter” once more, again as “String”. With it, the button knows which flow to start. The `flow:` at the beginning belongs to it and must not be dropped: it is how the button recognizes that this is a flow identifier and not a template, which otherwise looks the same. With the prefix, the order does not matter either. For “all checked rows”, a note follows below: the flow runs per record, four checked rows result in four flow runs. | “Parameter 3” to “Parameter 6”: `flow:identifier`. Note: Exactly like this, with `flow:` in front. |
| “Switch »Visibility« to a formula” (only at the three list places, also for “Exactly one record”) | The button should appear only if the user has checked anything at all. The command designer can do this itself. On the right, under “Visibility” (“Visibility”), is “Show” (“Show”); open the field and choose the second entry, “Show on condition from formula”. | – |
| “Confirm the prompt about the component library” (like the previous step) | The first time in the app, “Create a component library” appears; click “Continue”. This takes a moment, almost a minute in the recording: do not cancel. After that, the field says “Show on condition from formula”, and the formula bar appears at the top. This happens once per app. | – |
| “Enter the formula” (like the previous step) | The formula bar says “true”. Select that and replace it with the line. For “all checked rows”, the button appears as soon as at least one row is checked; for “Exactly one record” only if exactly one is checked, with two it stays hidden. If the top says “Create component library to enable Power Fx”, that is not an error: it is the prompt from the previous step, which is still pending. | “Formula (Power Fx)”: `CountRows(Self.Selected.AllItems) > 0` for “all checked rows”, `CountRows(Self.Selected.AllItems) = 1` for “exactly one record”. Note: Into the formula bar at the very top, not into a field on the right. |
| “Save the template — otherwise the button does not know the e-invoice” (only for the purpose “Download e-invoice” and only if the template has unsaved changes; no image) | On click, the button reads the saved template. If you switched on the e-invoice only in the open designer and have not saved yet, every click cancels, because it is not yet switched on there. Save the template at the top of the designer with “Save” before you try out the button. | – |
| “Save and Publish” | At the top right, “Save and Publish” (“Save and Publish”). After that, “Saving and publishing in progress …” appears for a while. It can take minutes until the button shows up in the app, because the command bar is cached in the browser. Reload the app; if it is still not there, wait a moment and reload once more. It is not lost. | – |
| “Try it out once” (no image) | First clear the cache: in the Dynamics app, press Ctrl+F5. Then open a record of the chosen table and press the button. If something goes wrong, it says so in plain words in a window (see What happens on click: When the button cancels). At the list places, check the rows instead for which something is to be created. For the purpose “Download e-invoice”, the e-invoice comes as a download, not in a new tab: the browser shows it in its download list, with several rows as a ZIP file. | – |

> **Good to know:** The recordings show example values. What is valid is always what the assistant offers to copy. Whether the visibility formula really takes effect on a subgrid and in the associated view has not been measured; try it out there. On an older command it was observed that the field “Visibility” was missing; whether a new command has it in every app has not been checked. If it is missing, leave the formula out: the button then always appears, and with a wrong selection it reports that on click (see What happens on click: When the button cancels).

#### The images for the steps

Most steps show an animated screen recording from Power Apps that plays by itself. Below it says that the values in it come from an example and that what is valid is what is offered for copying above. If a recording does not load, a drawing of the command designer with a pink frame replaces the image, together with this line. Without an image are the steps “Open the command designer”, “Save the template — otherwise the button does not know the cases” (or “… the e-invoice”) and “Try it out once”. The images cannot be enlarged here, unlike in the instructions for the connection under Flows: The windows “Create a connection” and “First the connection — here is how”. For some steps, for example the third parameter, the path, the recipient and the flow, the replacement drawings highlight the same field “Parameter 2”; that does not fit there, and the text next to it applies.

[Image: Two excerpts from the properties area of the command designer in Power Apps (English interface) side by side. On the left: the heading “Action” with the choice “Run JavaScript”, below it “Library” with the choice “st_button.js” and a pencil icon, the entry “Add library”, a text field with the function name “SmartTemplates.Button.showDocu…”, “Add parameter” and, at the bottom edge, “Parameter 1”. On the right, the same area further down: the text field with the function name, “Add parameter”, “Parameter 1” with the choice “PrimaryControl”, “Parameter 2” with the type “String” and a text field with an identifier (a long string of digits and letters), below it the beginning of “Visibility” with “Show”.]
Caption: The properties area of a fully filled-in command in Power Apps (English interface), in two excerpts: on the left the upper part, on the right the same area further down. The values are an example; what is valid is what the assistant shows for copying.
- Image marker 1: The field under “Action”: the action “Run JavaScript”, not a formula.
- Image marker 2: The field under “Library”: the library of the button, here “st_button.js”.
- Image marker 3: The text field with the function name (“SmartTemplates.Button.showDocu…”); the eight possible names are under What happens on click: The eight entries for the field “Function”.
- Image marker 4: “Parameter 1” with “PrimaryControl”: The first parameter is a type, not a text; in the subgrid view and the associated view it is “SelectedControl”.
- Image marker 5: “Parameter 2” with the type “String” and the text field below it: The second parameter is the identifier of the template.

### Changing or removing a button

In the first step, choose “Change an existing button” or “Remove a button”. The assistant then searches all commands that point to Smart Templates and guides you through the command designer in four steps.

#### Which button do you want to change? / remove?

| Element | What it does |
|---|---|
| Heading with explanatory text | “Which button do you want to change?” or “Which button do you want to remove?” Explanatory text: “We searched for commands that point to Smart Templates.” All commands whose entry in the field “Function” contains “SmartTemplates” are listed. Commands without “SmartTemplates” in the function name do not appear. The assistant reads at most 400 commands; it says nothing about anything beyond that. |
| Button cards | One card per command. The title is the label of the command, or else its name. Below it says “*Table or (without table)* · *Place or ?* · *App name or applies in every app*”. A classic command belongs to no app and applies in every app that contains the table. The sorting is first by table (commands without a table last), then by label. The card shows the place in the interface language. App, table and place of the chosen command determine the link in the instructions; for a command without an app, no link can be built. |
| Orange box “No button was found that points to Smart Templates.” | It continues, in substance: Presumably there is none yet; then “Create a button” is the right way. “Continue ▸” stays disabled (“Please choose a button.”). |

#### The four steps

| Step | What you do | Value to copy |
|---|---|---|
| “1 · Open the command designer” (no image) | The text says: The button above takes you to the place where the chosen button sits on its table and at its place. This is true only if a link can be built; for a command without an app there is no button (see The head), and you look for the table in Power Apps by hand. | – |
| “2 · Find the button in the bar” | On the left, all commands of this bar are listed one below the other. Click the one you are looking for; its properties open on the right. | – |
| “3 · Change what is needed” (only when changing) | On the right you can adjust the label, the icon and the parameters. If you want to print a different template, it is the second parameter. | “This template”: the identifier of the open template. Note: In case you want to switch to it. |
| “3 · Remove” (only when removing) | At the top of the bar, click “Delete” (“Delete”). A prompt appears (“Delete command” — Are you sure you want to delete this command?); confirm it with “Ok”. This removes the command from the solution. The template in Smart Templates is not affected; only the button is gone. | – |
| “4 · Save and Publish” | At the top right, “Save and Publish” (“Save and Publish”); otherwise everything stays as it was. | – |

If an existing email button is to pass a recipient from the record in the future, go through the branch “Create a button” in the assistant up to the instructions: same table, same purpose, your choice in the step “Who receives the email?” (see Buttons: the assistant: Who receives the email?). From the step “Add the recipient as a parameter” there, copy the value `to:…` and append it to the existing command in step 3 with “Add parameter” as a further “String”.

If an existing button should also start a flow, copy the value `flow:…` with “⧉ ID” in the window “Manage flows” (see Flows: The list) and append it in step 3 with “Add parameter” as a further “String”.

The labels in the command designer come from Microsoft and were read off in September 2026; they may change. If the screen differs from the text, follow what you see there.

### What changes in the document?

**On the canvas:** Nothing. What you create, change or remove in the command designer does not touch the sheet.

**In the PDF:** Nothing. The command designer belongs to Power Apps and does not change the template; even when a button is removed, the template in Smart Templates is untouched. What the finished button prints is described under What happens on click.

---

## What happens on click

*For users · Printing and Dynamics · Page en/button-klick.html*

> **In short:** The finished button takes the saved state of the template and the record on which it is clicked, and creates the document from them. What the user sees depends on the purpose: a new tab with the PDF, an email draft, a confirmation or, for an e-invoice, a downloaded file. If the button cannot work, it cancels with a message in a window. With several checked rows, it works through them one after the other; when displaying, a limit applies to the number of rows. If the browser blocks pop-ups, the end of this page explains how to allow them.

### The finished button in the command bar

The finished button sits in the command bar of the place you chose in Dynamics. It takes the saved state of the template (see Full preview and PDF: Full preview and printing in Dynamics) and the record on which it is clicked, with a path, the record at the end of the path, and creates the document from them. What follows describes what your users see: windows, messages, limits, what happens with several rows, and what happens with blocked pop-ups.

[Image: The command bar of a form in Dynamics as a narrow light strip with rounded corners. From left to right: a gray arrow pointing left, an icon of a square with an arrow pointing to the upper right, the button “Create PDF” with a small sheet icon labeled PDF, “Save” with a floppy disk icon, “Save & Close”, “Transaktionen für Rec…” (cut off) with a circular arrow, “Neu berechnen” with a calculator icon and “Flow” with a downward arrow.]
Caption: The finished button in the command bar of a form. You set the label and the icon in the command designer (see Adding, changing and removing a button: The steps for creating a button, steps 4 and 5).
- Image marker 1: The button with the PDF icon. You choose the label yourself, here “Create PDF”; a click creates the document for the open record.

### The eight entries for the field “Function”

In the command designer, you enter one of eight names in the field “Function”. They are in English. The names ending in `All` work through all checked rows in a loop; without `All`, the button works in a list only if exactly one row is checked. The column *calls action* names the Smart Templates action that the entry calls. It has nothing to do with the field “Action” in the command designer, where you choose “Run JavaScript”.

| Entry in the field “Function” | Purpose | calls action | Parameters after the first |
|---|---|---|---|
| `SmartTemplates.Button.showDocument` | Show document, one record | `st_GenerateDocument` (with `Mode` = `pdf`) | Template, path, flow |
| `SmartTemplates.Button.showDocumentAll` | Show document, all checked rows | `st_GenerateDocument` (with `Mode` = `pdf`), once per checked row | Template, path, flow |
| `SmartTemplates.Button.openEmail` | Open email draft, one record | `st_CreateEmail` | Template, email template, path, recipient, flow |
| `SmartTemplates.Button.openEmailAll` | Create email drafts, all checked rows | `st_CreateEmail`, once per checked row | Template, email template, path, recipient, flow |
| `SmartTemplates.Button.sendEmail` | Send email immediately, one record | `st_SendEmail` | Template, email template, path, recipient, flow |
| `SmartTemplates.Button.sendEmailAll` | Send email immediately, all checked rows | `st_SendEmail`, once per checked row | Template, email template, path, recipient, flow |
| `SmartTemplates.Button.downloadEInvoice` | Download e-invoice, one record | `st_GenerateEInvoice` | Template, path |
| `SmartTemplates.Button.downloadEInvoiceAll` | Download e-invoices, all checked rows | `st_GenerateEInvoice`, once per checked row | Template, path |

The first parameter is a type (`PrimaryControl` or `SelectedControl`); all others are strings. The flow carries the prefix `flow:`. It may stand at any position after the template; the instructions put it at the end. The recipient applies only to the four email entries and carries the prefix `to:`: `to:_customerid_value` for a lookup, `to:emailaddress1` for an email field. Like the flow, it may stand at any position after the template; without it, the button passes no recipient, as before. The email template may be missing; then the template’s if-then cases decide, and the path moves to the third position, where the button recognizes it by `<`, `>` or a comma. The path stays empty if the button sits on the template’s table. The two e-invoice entries know neither flow nor recipient: a `flow:…` on the button is not silently swallowed but reported after saving (see The e-invoice), and a `to:…` is dropped.

What the actions accept and return is described under Actions and APIs: From a button in Dynamics.

### The process for each purpose

| Purpose | What the user sees |
|---|---|
| Show document | A new tab opens right on the click, because the browser would not allow it later. It is called “Creating the document …” and, while you wait, shows “The document is being created …” and “The first document after a longer pause takes ten to seventeen seconds.” When warm, a usual document takes less than a second, measured at about 0.7 seconds; many images from the data make this longer (see Images: Time and size). For the first document after a pause, see Problems and messages: The first document takes a long time. How Smart Templates avoids the wait is described under Keep warm. After that, the PDF loads there; it is stored nowhere, so save it in the tab if you want to keep it. If the run fails, the tab closes again. If the PDF is unreadable, the button reports “The document could not be read.” If the record or template is missing, the button reports that before a tab opens. Dynamics shows no progress indicator for a single document, and for “all checked rows” only from two rows on. A success is not reported; the document itself is the feedback. |
| Prepare an email and present it | Dynamics shows “The document is being created and the email prepared …”; for “all checked rows” it begins with “The email is being prepared …”. Then the draft opens as an email form in Dynamics, in place of the current page. If there is a warning, it opens only after its window has been clicked away. If a recipient is set on the button, it is in the draft; if the field yields none, the draft opens as if the button had no recipient. If several records are checked with “all checked rows”, the final message states for how many records the field yielded no recipient (“⚠ For 2 records the field »customerid« gave no recipient — please check the recipient in these drafts.”). No tab opens. |
| Send email immediately | Dynamics shows “The document is being created and sent …”; after sending, the confirmation “The email was sent.” appears; if there are warnings, the window shows the whole feedback for them. If a recipient is set on the button and the field yields none, nothing is sent, no document is built and no flow is started; the message is under When the button cancels. No tab opens. |
| Download e-invoice | Dynamics shows “The e-invoice is being created …”. No tab opens. Afterward the browser offers the XML file for saving; it is in its download list. With “all checked rows”, all e-invoices come in one ZIP file. What happens in detail and which messages there are is described under The e-invoice. |

**Window of the button.** Messages appear in a notice window of Dynamics. The title is “Smart Templates” for notices and warnings and “Smart Templates — canceled” for errors. Error messages over 900 characters are shortened and end with “…”. If the window itself fails, a simple message window of the browser appears. The label of the confirmation button is set by Dynamics. If the feedback contains a warning, the window shows the whole feedback, each warning set off with a warning sign, for example that a flow was not started or that an if-then case checks a field that is not in the data. If the result is missing entirely, “No email was created.” or “No document was created.” appears, each with the message.

**Language of the messages.** The messages the button forms itself, including the page in the waiting tab, follow the interface language of your user in Dynamics: every German setting yields German, everything else English; if the setting cannot be read in the button, it stays German. This manual gives the English sentences and titles. The same rule applies when the e-invoice cancels: for the sentence the server delivers, and for the defects in the PDF with embedded e-invoice. Notes on the e-invoice for which the document is created nonetheless are, by contrast, always English. The other sentences of the server, for example for a missing read right, come in the language in which they are written there. Names and data are never translated.

### The e-invoice

If the template has a switched-on e-invoice (see E-invoice: ZUGFeRD and XRechnung), the buttons deliver what the template sets. An e-invoice comes as a file, not as a tab. The sheet of the template does not change.

| Template setting | Button “Create and display the document” | Button “Download e-invoice” |
|---|---|---|
| no e-invoice, switched off, or “Only if …” does not apply | The document in the tab, as before. | No file. The button states the reason. |
| ZUGFeRD, “PDF with embedded e-invoice” | The PDF/A-3 in the tab. It is the e-invoice. | The XML alone as a file, the `factur-x.xml` from the PDF. |
| “e-invoice only (XML)” | The XML as a file to save. The tab that opens on the click closes again right away. | The XML as a file. |
| “e-invoice only (XML)” with reading copy | The PDF in the tab and the XML as a file. | The XML as a file. |
| Error in the e-invoice | The button cancels with the message from the core. No document and no reading copy is created. | The same. |

#### Download e-invoice: one record

The button shows “The e-invoice is being created …”, checks the e-invoice like printing does, and offers the XML file for saving. The name comes from the standard, for example `XRechnung_R-2026-0042.xml`, or, if the template has a PDF name, from that with `.xml` (see E-invoice: The file name). No PDF is created, and nothing is stored in Dynamics. If the e-invoice has a note, the button shows it after saving.

No tab opens, not even a briefly visible one. The browser’s pop-up blocker therefore does not affect this button (see When the browser blocks pop-ups). The file goes to the browser’s download list, at the top right or at the bottom, depending on the browser.

#### Several checked rows: one ZIP file

With `downloadEInvoiceAll`, one e-invoice is created per checked row, one after the other. All successful ones come together in **one** ZIP file; the browser would not allow several separate downloads after one click. The ZIP file is called `E-invoices_`, date and time, for example `E-invoices_2026-10-23_1405.zip`. With an English Dynamics interface it carries an English name. If two e-invoices carry the same file name, the second gets “ (2)” after the name. During the run, “Creating e-invoices — *n* of *m* …” counts along. There is no limit of 200 rows as with displaying, because there is no tab.

What goes wrong with one row does not stop the others. At the end it states what is missing, with the position among the checked rows. If only one row was checked or the button sits on a form, the XML itself comes and no ZIP file. With `showDocumentAll` and a template “e-invoice only (XML)”, the XML files likewise come in a ZIP file; the reading copies are in the tab like any document.

#### E-invoice messages on the button

They appear in the window “Smart Templates — canceled” unless stated otherwise, in the language of your Dynamics interface (the English sentences are given here). The messages that the e-invoice itself names (mandatory details, amounts, PDF/A) are under Problems and messages: E-invoice.

| Situation | Message and remedy |
|---|---|
| The template has no switched-on e-invoice (with “Download e-invoice”) | “The template does not create an e-invoice: »E-invoice« is not switched on in its template settings. No file was created.” Switch on the e-invoice and save the template; the button reads the saved template. |
| “Only if …” does not apply to this record | “No e-invoice is created for this record: the condition »Only if …« of the template (»…«) is not met. No file was created.” No action is needed if that is intended. |
| Something is missing in the e-invoice | The sentence from the core: “The e-invoice cannot be created – …” with the details and a note on who has to act. No file is created. |
| The action returned no file | “No e-invoice was created.”, followed by the action’s message. With several rows, if no e-invoice was created for any of them, the reason for each row follows. |
| The file did not arrive in readable form | “The e-invoice could not be read.” With several rows, it counts as an error of that row. Press the button again. |
| The e-invoice is ready, but saving fails | “The e-invoice is ready, but could not be saved: …”, with several rows “The e-invoices are ready, but could not be saved: …” with the rows that did not succeed. Nothing is lost in Dynamics; press the button again. |
| Some rows do not succeed (several checked) | “*n* of *m* e-invoices are in the ZIP file »…«.” and below it “Not successful:” with one line per row and its reason. If there were only notes, it reads “*n* e-invoices are in the ZIP file »…«.” with the notes; with no notes and no errors, it stays silent. |
| The button has a parameter “flow:…” | The file is saved, then “The e-invoice is ready.” follows, and: “⚠ A flow was NOT started: »Download e-invoice« delivers only the file. Remove the parameter »flow:…« on the button in the command designer — or use »Create and display the document« for the flow.” |
| With “Create and display the document”, neither a PDF nor an XML was created | “No document was created.”, followed by the message. The tab closes again. |
| When displaying, the XML did not arrive in readable form | “The e-invoice could not be read.” as an error of the row; with one record, the message “The e-invoice is ready, but could not be saved: …”. |

The flow message has a reason: the action behind the button has no input for a flow. If you need the e-invoice in a flow, choose the purpose “Create and display the document” with a flow (see E-invoice: The flow).

### When the button cancels

These messages appear in the window “Smart Templates — canceled”. With “all checked rows”, the messages that concern a single record (path, flow, email) are collected in the final message (see Several checked rows). If the template is missing, no checked row can be read, or the form has unsaved changes, the button cancels beforehand with a window of its own. Unless stated otherwise, neither a document nor an email has been created up to that point.

[Image: A notice window of Dynamics on a white background. At the top left, in bold, the heading “Smart Templates — canceled”, at the top right a thin cross for closing. Below it, in two lines: “This record has not been saved yet — it has no identifier yet, and without it no document can be created. Please save first, then press the button.” At the bottom right is the blue button “OK”.]
Caption: A message of the button in the window “Smart Templates — canceled”, here for a record that has not been saved yet.
- Image marker 1: The title says that nothing was created.
- Image marker 2: The sentence names the reason in plain words and says what to do. “The button” means the button in the command bar.

| Situation | Message and remedy |
|---|---|
| The record has not been saved yet (on a form only) | “This record has not been saved yet — it has no identifier yet, and without it no document can be created. Please save first, then press the button.” |
| The form has unsaved changes | “This form has unsaved changes. The document is created from the saved state and would not show them. Please save first, then press the button.” The button never saves by itself. |
| In a list, not exactly one row is checked (simple button) | “Please select exactly one record. A document is always made for one.” |
| A button whose entry in the field “Function” ends in “All”, and no row is checked | “No row is selected. Select the rows on the left for which something is to be created — otherwise the button does not know what to work on.” |
| The checked rows cannot be read | “The selected rows could not be read. Please reload the list and select the rows again.” If only a single row cannot be read, it counts as an error with its position: nothing was created for it. |
| The record cannot be identified | “The record cannot be identified. Check in the command designer whether the first parameter of the button is »PrimaryControl« — for a button in a subgrid or an associated view »SelectedControl«.” Before that, the button tries a rescue: on a record page it takes the open record, in a list never. |
| No template is set (second parameter missing or consisting only of spaces) | “No template is set for this button. The second parameter must be the identifier of a Smart Templates template.” |
| The path is unreadable or does not lead to the target | The button follows the path step by step: lookups forward, collections backward with the chosen selection. Messages: the stored path is unreadable because a step has only a direction sign or does not follow the pattern “field>table” or “field<table:key:choice”; on this record the named field is empty, from here no path leads to the table; the field points to an entry in the wrong table; the return path lacks the key of the target table or the indication of which entry applies (genau1, neueste or aelteste); this record has no entry in the table, so there is nothing to print; the entry found has no readable identifier. If there is more than one entry although the path is set to `genau1`, the button cancels. The message ends with “Switch it in the designer to »the newest« or »the oldest«.” What is meant is this: in the command designer, in the parameter with the path, change the entry `genau1` to `neueste` or `aelteste`, or put the path together again in the assistant (see Buttons: the assistant: The path) and enter the new path text. The assistant itself does not change an existing button. |
| The flow is switched off | The button cancels before the document or email is created. The message says that the flow is not switched on; switch it on in Power Automate, or delete the parameter with `flow:` on the button in the command designer (see Adding, changing and removing a button: Changing or removing a button). The assistant already warns when you choose the flow (see Buttons: the assistant: Notes below the selection). |
| The flow was removed or the identifier is wrong | The button cancels before the document or email is created. The message reads: “The specified flow was not found. Please check the flow identifier — it is in the address bar of the flow in Power Automate, after »/flows/«.” Users see the same message if the flow was removed in “Manage flows” and a button still points to it (see Flows: Removing a flow); no document or email is created then. So first delete the parameter with `flow:` on the button in the command designer (for how, see Adding, changing and removing a button: Changing or removing a button), or remove the flow only when no button points to it any longer. |
| The flow does not fit the button | The button cancels before the document or email is created. Messages: it is not a cloud flow; it is built for a different table, nothing was triggered; the flow specification is not a valid identifier; it is not on-demand, so it usually has the wrong trigger (what is needed is “When a row is added, modified or deleted”, not “When a row is selected”); it listens to the table “Smart Templates Auslöser” but not to new rows (set “Change type” to “Added” in the trigger). |
| The document is ready, but the flow was not started | If the document goes through and only starting the flow fails (no record, read right missing), it is just a warning that the flow was not started; it appears in the window “Smart Templates”, not in “… — canceled”. The document is not affected. |
| Email: recipient, email template or platform | Sending immediately with no possible recipient: “No recipient was found”. This affects a button with no recipient set on a table that is not itself a recipient. The message names two ways: in the assistant, the step “Who receives the email?” with the parameter `to:…` (see Buttons: the assistant: Who receives the email?) or “Prepare an email and present it”. The email template is missing in Dynamics: it was not found, please check the entry of the email template. Wrong table: the email template is built for a different table, its placeholders stayed empty, nothing was created; templates of the type “User” apply to every record. Neither a parameter nor an applicable case determines an email template: no email template was passed, and the template’s if-then cases have determined none (in substance). If Dynamics refuses to create or send, its message is shown along with the sentence that the document itself was completed. |
| The button has a recipient (`to:…`), but the field yields none (“Send email immediately” only) | Neither a document nor an email nor a flow is created. The message reads: “Nothing was sent: The field »customerid« is empty. This button takes the recipient from this field and does not guess another one. Enter it on the record and press the button again.” If a lookup points to an entry in a table that is not a recipient, the first sentence reads: “Nothing was sent: »customerid« points to an entry in »team«, which is not a recipient.” “customerid” and “team” stand here as an example for the name of the chosen field and of the table it points to. With “all checked rows”, the message appears per record under “Not successful”; the other emails go out. An email draft does not know this message: it opens as if the button had no recipient. |
| The user lacks a read right | No document is created; the English message begins with “NO ACCESS”. Its wording, also for the email purposes, and which read rights are needed are given in Rights and roles: When a right is missing. |
| Too many rows are checked when displaying | The button cancels, and no document is created. The limit and the message are under The limit of 200 rows. |
| The button points to a building block instead of a template | Nothing is created: “»…« is a building block and does not create a document on its own. Nothing was created. A building block is inserted into a template and printed with it – use the template that contains it.” (see Building blocks). |
| A building block area of the template stayed empty, or a building block switched off all rules | A button for an email cancels: “The document is incomplete because of a building block: … — no email was created.” A flow on the button is not started; the PDF comes, and the warning for it is in the window “Smart Templates”. An e-invoice is not created (see Building blocks: When the area stays empty). |
| The browser blocks the tab for the document | The messages are under When the browser blocks pop-ups; that is also where it says how to allow pop-ups. |

Some of these messages are worded a little differently (“Please check …”, “switch it on in Power Automate”); the same is meant. Further messages and how to fix them are under Problems and messages.

### Several checked rows

The entries ending in `All` work through the rows one after the other, each with its path. What goes wrong with one row does not stop the others. The button collects errors with their position among the checked rows (“Record 3: …”); identical warnings are named only once. A flow runs per record: four invoices result in four runs.

| Purpose | What you see at the end |
|---|---|
| Show | All documents are listed one below the other in a single tab, each in a frame of its own with the heading “*i* of *n*”; the tab is called “*n* documents”. Paging, printing and saving work in it as usual. If there were errors, the top says that *x* of *y* documents could not be created and that Dynamics says which ones. If the tab cannot be written to: “The documents could not be shown: …”. Several tabs are not possible because the browser allows only one new window per click. During the run, “Creating documents — *n* of *m* …” counts along. At the end: “*n* of *m* documents are ready. Not successful: • …”, with only warnings “*n* documents are ready.” with the warnings, if all failed “No document was created. • …”. A success without a warning stays silent. |
| Present an email | With exactly one record and no error, the draft opens (after a warning, only after it has been clicked away). Otherwise “*n* of *m* email drafts were created — with the document attached. You find them on the respective record under »Timeline« or »Activities« and can check and send them there.” appears. “Preparing emails — *n* of *m* …” counts along. |
| Send email | “The email was sent.” if exactly one row was checked and it succeeded, otherwise “*n* of *m* emails were sent.”, with errors including “Not successful: …”. During the run, “Sending emails — *n* of *m* …” counts along. |
| Download e-invoice | A ZIP file with all successful e-invoices, with only one checked row the XML itself. If everything succeeds without a note, it stays silent; otherwise the final message names the counts and what did not succeed. See Several checked rows: one ZIP file. |

With the two email purposes, the final message appears as the error window “Smart Templates — canceled” only if nothing at all succeeded. When displaying, it carries this title as soon as even one document is missing; the successful documents are still in the tab.

#### The limit of 200 rows

When displaying, the limit of 200 rows applies. If more are checked, the button does not show the first 200 but cancels, and no document is created at all. The message appears in the window “Smart Templates — canceled” and reads: “*N* rows are selected. A single tab holds at most 200 documents — more becomes unwieldy and takes long. Please print in smaller groups.” Below it, in parentheses: “(This limit does not apply to emails — there every record gets a draft of its own, without a tab.)” So the two email purposes have no limit; the same goes for “Download e-invoice”, because there is no tab to which the limit could apply. The checks run in this order: template, selection, 200 limit, pop-up blocker.

### When the browser blocks pop-ups

A button opens the document in a new browser tab. If the browser does not allow pop-ups for Dynamics, it does not appear. How to allow pop-ups is described under How to allow pop-ups; what the button reports when blocked comes after that. The button “Download e-invoice” opens no tab; the block does not apply to it.

#### How to allow pop-ups

Allow pop-ups for the address of your environment, that is, for the Dynamics page on which the button sits. This usually works via the pop-up icon on the right of the address bar: click it, choose “always allow” and then “Done”. Then repeat the action, with a button that means pressing the button. You need the same setting when the browser blocks a window that the designer opens, for example with the AI assistant (see Working with the AI assistant in Copilot: Opening the assistant).

#### What the button reports when blocked

- **Single document without a tab:** The button keeps running and then reports: the document is ready, but the browser blocked the tab for it. Allow pop-ups for this Dynamics page, usually via the pop-up icon on the right of the address bar with “always allow”, and then press the button again. If the button has a flow, it adds that every further press starts the flow again.
- **Waiting tab closed in between:** The document is ready, but the browser blocked the new tab because the waiting tab was closed in between. Please press the button again and leave the tab open. With a flow, it adds that this button starts the flow on every press and that a further press starts it again.
- **“All checked rows” without a tab:** The button cancels beforehand: the browser blocked the tab for the documents, nothing has been created yet.
- **Collective tab closed during the run:** Without a flow, it says that the tab for the documents was closed, nothing is lost, press the button again and leave the tab open. With a flow, the warning is added that every further press starts the flow again for every record.

### What changes in the document?

**On the canvas:** Nothing. The finished button is a command in Dynamics; it does not change the sheet in the designer.

**In the PDF:** The button prints the same document as the button “PDF”, but from the saved state of the template and with the record on which it is clicked, instead of with the sample record; with a path, with the record at the end of the path. What else differs (user, time, messages) is under Full preview and PDF: Full preview and printing in Dynamics. The template’s email if-then cases and the flow have no influence on the document. If the flow is switched off or removed at the time of the click, no document is created at all (see When the button cancels).

---

## Flows

*For users · Printing and Dynamics · Page en/flows.html*

> **In short:** A flow runs in Power Automate and can carry on after the document. In the window “Manage flows” you create it as a scaffold, open it, copy its ID and remove it. What it should do, you build in Power Automate. The page guides you through creating a flow, the list and the connection through which the flow reaches your data, and shows how to assign a connection to a flow. Which flow a button starts, you choose in the assistant.

### Manage flows

A flow in Power Automate can carry on after the document, for example by filing it in SharePoint, sending it as an attachment or starting an approval. In the window “Manage flows” you create such a flow, open it, copy its ID and remove it. The flow is created here; what it should do, you build in Power Automate. Only what is in the solution “STFluesse” (display name “Smart Templates – Flows”) is shown and created. Other flows you manage in Power Automate.

The button “↻ Manage flows” in the header bar is described in Buttons: the assistant: The two buttons in the header bar. The window also opens from the assistant, with the button “Create flow …” (see Buttons: the assistant: The button “Create flow …”).

1. At the top, click “↻ Manage flows”. The list shows the flows of the solution, switched on or switched off.
2. Click “Create a new flow”. Enter a name and choose the “Connection”. “↻ Check” looks up which connections can still be used.
3. Click “Create ▸”.
   → After about ten seconds, the flow is set up, switched on and opens in Power Automate. If you did not choose a connection, the designer first shows how to assign one in Power Automate; until then the flow does not run.
4. If the flow has no connection to Dataverse yet, assign one to it in Power Automate. The steps are described, step by step, under The windows “Create a connection” and “First the connection — here is how”.
5. In Power Automate, replace the step “Hier Ihre Schritte” (your steps here) with what is to happen, for example “Save file to SharePoint”, and save the flow.
6. In the assistant “Manage buttons in Dynamics”, in the step “Should a Power Automate flow run afterwards?”, choose the flow under “Yes, start this flow” (see Buttons: the assistant: The step “Should a Power Automate flow run afterwards?”). The assistant offers it only for templates with the same primary table with which you created it (details under Buttons: the assistant: The selection list “Flow”); without a primary source, no flow can be created. The instructions for the button then already contain the chosen flow. If you enter it by hand, “⧉ ID” in “Manage flows” copies the same value (see The list).

> **Tip:** After switching on, it takes up to a minute until the trigger is ready and Dynamics delivers requests to the flow (measured: not yet after 5 seconds, yes after 45 seconds). A click on the button before that does not reach it. So try the flow with a button only about a minute after switching it on. The designer reminds you of this after creating the flow, in the message box of “Manage flows” and in the green box of the assistant, with the same sentence: “⚠ After switching on, it can take up to a minute until Dynamics delivers requests to the flow — a button click before that does not reach it.”

A flow that is switched off or removed makes the buttons that point to it cancel. What applies then and what you can do is described under Removing a flow.

### The window

| Element | What it does |
|---|---|
| Window “Manage flows” | A wide window that adapts to the window width on narrow screens. The content scrolls, the footer bar stays fixed. A click next to it or Escape closes it without a prompt, even while something is running. A creation that has already been submitted keeps running and reports its result to the assistant. A running connection check stops after the current step. The state lives only in the window, not in the template: a flow belongs to the environment, not to the document. |
| Loading screen | Instead of the list and buttons, a spinning circle and a sentence appear in the middle: “Searching for flows …”, “Creating the flow and switching it on …” or “Removing …”. If “Reduce motion” is set in the operating system, it spins more slowly. As long as it is showing, the footer bar is empty; Escape and a click next to it still close the window. |
| Orange error box | In Dynamics it says “Flow management could not be loaded. The reason:” with the reason, for example a missing read right or throttling. Without Dynamics it says “This window needs Dynamics. The flow features are not available locally.” The box also appears if only reading the connections fails. The footer bar stays in that case; “Create a new flow” then remains visible, but the creation view again shows only the error box. Without Dynamics, no flow can be created. Open the designer in Dynamics. |

### The list

Above the list are “The flows in this environment” and the sentence “These are the flows this designer created. Other flows belong to Power Automate and are managed there.” Strictly speaking, the window lists all cloud flows of the solution “STFluesse”, newest first, including those that someone put there by hand. Flows outside this solution never appear. There is no upper limit of its own.

If Dataverse does not deliver everything at once (over 5,000 entries), an orange note appears: “The list may be incomplete: Dataverse did not deliver all entries at once. You can find further flows in Power Automate in the solution »STFluesse«.” If the solution is missing or contains no cloud flow, it says “No flow created yet. Start with »Create a new flow« below.”

[Image: The window “Manage flows”. Under the heading “The flows in this environment” is the sentence “These are the flows this designer created. Other flows belong to Power Automate and are managed there.” Below it, three cards one below the other. Each shows the flow name in bold on the left (“Smart Templates – Rechnung”, “Smart Templates – Angebot”, “Beleg in SharePoint ablegen”) and below it the state: “switched on · via a document request” for the first two, “⚠ switched off · via a document request” for the third. On the right of each card are three buttons: “Edit” with a pencil, “ID” with two small boxes and a narrow button with a red ✕. At the bottom left is the blue button “Create a new flow” with a flow symbol, at the bottom right “Close”.]
Caption: The list in “Manage flows”. Names and states are examples.
- Image marker 1: Name and state of the card: The state is in plain words under the name.
- Image marker 2: “Edit” opens the flow in Power Automate; it is built there.
- Image marker 3: “ID” copies “flow:…” for the parameter on the button.
- Image marker 4: The red “✕” removes the flow after a prompt.
- Image marker 5: “Create a new flow” switches to the creation view.

Each flow is a card. The name is in bold; without a name it says “(no name)”. Below it is the state in plain words: “switched on” or “⚠ switched off”, followed by “via a document request” (the flow listens to the table “Smart Templates Auslöser”), “can be triggered” (on-demand) or “⚠ not on-demand”. A flow you built yourself on the table “Smart Templates Auslöser” can wrongly carry “⚠ not on-demand” there, because with very many flows the window checks only the 250 newest for it. On the right are three buttons:

| Button | What it does |
|---|---|
| “✎ Edit” | Tooltip: “Opens the flow in Power Automate — that is where it is built.” Opens the flow editor in a new tab. |
| “⧉ ID” | Tooltip: “Copy the flow ID — it goes on the button as »flow:…«.” Copies `flow:ID` to the clipboard; only once that has worked does the button show “Copied ✓” for 1.4 seconds. Otherwise the window “Flow ID” opens with “Select to copy:”, a field with the value and the buttons “Cancel” and “Done”. The button is meant for entering it by hand in the command designer; the assistant itself writes `flow:ID` in its instructions. |
| “✕” (red) | Tooltip: “Remove this flow”. See Removing a flow. |

#### Removing a flow

The button “✕” first asks in the window “Remove flow?”: “»*Name*« will be removed from Power Automate. This cannot be undone.” The buttons are “Cancel” and, in red, “Remove”; the focus is on “Remove”, so the Enter key confirms. Escape or a click next to the window cancels. After the confirmation, “Removing …” appears: the flow is switched off and deleted. Afterward the message box says “»*Name*« was removed.” or “Not removed: *error*”, and the list is reloaded. The connection reference stays in place. If the call came from the assistant, it clears its flow selection, whichever flow was removed.

> **Caution:** The prompt ends with: “Buttons that point to this flow will then stop with a message — neither a document nor an email is created. So first delete the parameter with »flow:« from these buttons in the command designer.” Users then see only the error message “The specified flow was not found. Please check the flow identifier …”. What you should do before removing is described under What happens on click: When the button cancels.
>
> A button whose flow is merely switched off cancels in the same way. What users then see and what you can do is described at the same place; how to delete the parameter is described under Adding, changing and removing a button: Changing or removing a button.

### Message box and other buttons

| Element | What it does |
|---|---|
| Blue message box | It appears above the list or the form, but only after an action. It shows the result of the last action: removed, created, check result, progress of the check or error. |
| “→ Switch to the flow” | It appears below the box, but only if the editor tab was actually filled when creating. Tooltip: “The flow is already open — this button brings the tab to the front.” It brings the editor tab to the front or opens the flow again if the tab is closed. |
| “Create a new flow” | Highlighted button with a drawn symbol, at the left of the footer bar, in the list view, also next to an error box. It switches to the view “Create a new flow”. In doing so, the window forgets the target of the previous creation and clears the message box. |
| “Close” | At the right of the footer bar, in the list view only. Closes the window. |

### The “Create a new flow” view

The explanatory text says: The flow is created here and opens in Power Automate right away; you build in there what should happen, we only create the scaffold. The flow belongs to the account with which you create it (its owner). Which license this account needs and which role belongs to creating is described under Rights and roles: Creating a flow. If the account lacks the read right on the table “Smart Templates Auslöser”, the flow gets no requests (see Rights and roles: Printing documents).

If the license is missing, switching on fails with “Microsoft does not allow this flow to be switched on: The signed-in account lacks a license that allows Dataverse in flows (a Dynamics 365 license or Power Automate Premium). The System Administrator role does not replace a license.” The half-created flow is then removed again.

- **Template without a primary source:** An orange box replaces the form: “This template has no primary source yet — without one, no flow can be created: the flow’s step »Hauptdatensatz holen« (get primary record) enters its table as a fixed value, and under »Manage buttons in Dynamics« the flow is only offered for templates with the same primary table. Create a data source first.” Name, table and connection are then missing, and “Create ▸” is disabled. Create a primary source first, see Data sources and relationships: The primary source.
- **No connection yet:** An orange box says: There is no connection yet that the flow can point to; you can create it anyway and then assign the connection in Power Automate. Below it are the buttons “Create a connection …” (highlighted, with a symbol; tooltip: “Shows step by step how a connection is created — with a link to get there.”, opens the window Create a connection) and “↻ Search again” (tooltip: “Check again whether a connection exists now.”, reloads the connections). Below that follow a dividing line and the form as usual, with “— none yet · assign in Power Automate —” as the only choice.

[Image: The window “Manage flows” in the view “Create a new flow”. An explanatory text says that the flow is created here and opens in Power Automate right away, that it belongs to the creating account and that its license must be a Dynamics 365 license or Power Automate Premium. Below it, three rows with labels on the left: “Name” with a text field “Smart Templates – Rechnung Standard” and the note “This is what the flow will be called later in Power Automate.”; “Table” with a dimmed, non-editable field “Rechnung (invoice)” and a longer note; “Connection” with a selection list (“Smart Templates – Dataverse”), a small button with an arrow pointing to the upper right and the button “Check” with a circular arrow; below it the note that the flow reaches the data through it and that a connection that has just been created appears only once it has been used in a solution. Below that, “None that fits? How to create one.” with an underlined link. At the bottom left the button “Back”, at the bottom right a blue button “Create ▸”.]
Caption: Creating a flow: name, table of the template and connection.
- Image marker 1: The field “Name”: This is what the flow will be called later in Power Automate; the suggestion can be changed.
- Image marker 2: The dimmed field “Table”: the table of the template. It cannot be changed.
- Image marker 3: The selection list “Connection” with the buttons “↗” and “↻ Check” next to it: The connection is how the flow reaches the data; “Check” hides connections that can no longer be used.
- Image marker 4: The link “How to create one”: It opens the instructions on how a connection is created.
- Image marker 5: “Create ▸” creates the flow and opens it in Power Automate.

| Setting | What it does | Default |
|---|---|---|
| “Name” (text field) | This is what the flow will be called later in Power Automate (note below). The name is stripped of spaces only at the edges and is not checked otherwise. What is in the field is what is created; if you leave the suggestion, the flow is called that. If you empty the field and create right away, the flow is called “Smart Templates – Flow”. If the window rebuilds beforehand, for example through “↻ Check”, the suggestion is back in the field. After a creation, the field keeps the name last used as long as the window is open; the suggestion returns only after reopening. | “Smart Templates – *template name*”, without a template name with the logical table name |
| “Table” (read-only, dimmed) | Shows “*name of the primary source* (*logical name*)” and cannot be changed. Note below: The table of this template, the document is generated from it. The flow is tied to it: its step “Hauptdatensatz holen” enters it as a fixed value, and in the assistant it is therefore only offered for templates with the same primary table. It is started by a document request. In rare cases the flow carries no fixed table, for example with a source with incomplete details; it is then offered to every template. On click, Smart Templates does not check the binding anyway. | the primary source of the template |
| “Connection” (selection list with the buttons “↗” and “↻ Check” next to it) | Chooses the Dataverse connection through which the flow reaches the data. Entries: “— none yet · assign in Power Automate —” and, for each existing connection reference, its display name. Details are under The connection in detail. | the connection reference offered that was created last; if you explicitly choose “none yet”, this choice stays, even while “↻ Check” is running |
| “↗” next to the selection | Opens the chosen connection in Power Automate (detail page) in a new tab. The button follows the selection immediately and is grayed out for “none yet”. Tooltip with a connection chosen: Open this connection in Power Automate, where state, owner and “Reconnect” are shown; if it no longer exists, you land in the connection list. With “none yet”: Choose a connection first, there is nothing to open. | – |
| “↻ Check” next to the selection | Checks which connections can still be used. Anything that fails is no longer offered. The check runs only on a button press. Details are under The connection check. | – |
| Note “None that fits? How to create one.” | It is always below the selection, with or without connections. The link “How to create one” opens the window Create a connection. If you close it with “↻ Done — search again”, the window reloads flows and connections. | – |
| “◂ Back” (at the left of the footer bar) | Back to the list. Clears the message box. | – |
| “Create ▸” (right, highlighted) | Creates the flow. Disabled if the template has no primary source. See What happens at “Create ▸”. | – |

#### The connection in detail

- **What is in the list:** The existing connection references with a connection are listed, not the connections themselves. Several flows share one reference: an existing reference of the same connection is reused instead of creating a new one. The window reads at most 50 connection references and does not say so if there are more.
- “none yet”**:** Creates a reference without a connection or takes an existing empty one. The flow then runs only once the connection is assigned in Power Automate.
- **Hidden connections:** Connections that were noticed as “no longer exist” during checking or creating are missing from the list. The tooltip then says, in substance: A number of connections are hidden because they no longer existed at the last check; “↻ Check” looks again and brings them back if they exist again. The browser remembers which ones are hidden; the list therefore applies only in this browser.
- **Note below:** If there are connections, it says: This is how the flow reaches your data; a connection you have just created only appears here once it has been used in a solution, otherwise choose “none yet”. If there are none, it says: None there yet? No problem, the flow is created anyway, and you assign the connection when you edit it in Power Automate.

#### The connection check

“↻ Check” has the tooltip: Creates a test flow as a draft for each connection and removes it again immediately; anything that fails is no longer offered; this takes a few seconds per connection. The button first forgets which connections were hidden, reloads the connections and checks them one by one. The draft flow is called “Smart Templates – Verbindungsprobe” (connection test) and is never switched on. There is never more than one test flow at a time.

- **While it runs**, the button carries “… *n*/*m*” and is disabled. The message box says “Checking: *name* (*n* of *m*)”.
- **Result** in the box: “Found *n* new — there are now *m*.” or “Checked — *m* connection(s).”, plus “All of them can be used.” or the statement that one or *n* of them no longer exist and are no longer offered, with names. If applicable, these follow: that some could not be checked and stay in the selection, and that a test flow was left behind and has to be removed in Power Automate. If everything fails, it says “Not checked: *error*”.
- **Prerequisites and duration:** The check briefly writes to the environment and needs the right to create flows (see Rights and roles: Creating a flow). Only what the platform clearly reports as “no longer exists” counts as dead; other errors leave the connection in the list. Healthy connections take, as measured, three to nineteen seconds, dead ones about one. The check runs only on a button press, never on opening. If you close the window, it stops after the running step.

### What happens at “Create ▸”

1. If a connection is chosen, an empty tab opens right on the click. It carries the title “Flow …” and shows a spinner. If “none yet” is chosen, the window “First the connection — here is how” opens first (see The windows “Create a connection” and “First the connection — here is how”); the flow is created only after its “Continue ▸”.
2. The window shows the loading screen “Creating the flow and switching it on …” (measured at about ten seconds). The sequence: the solution “STFluesse” (created the first time, display name “Smart Templates – Flows”), the connection reference (an existing one is reused, otherwise a new one is created as “Smart Templates – Dataverse”), the flow, switching it on.
   → The editor opens in Power Automate in the prepared tab, and the window returns to the list. The message box says: “The flow is set up and switched on.”, below it the steps, for example “Solution was already there. · Existing connection reference reused. · Flow created. · The step »Beleg erzeugen« is already in. · Switched on.”, and the reminder about the wait after switching on (see the tip under Manage flows).
3. On an error it says “Did not finish: *reason*”, below it “What is already in place: *steps*”. The window then stays in the creation view. A half-created flow is removed again, the empty tab is closed.

If the call came from the assistant, it selects the new flow. If the browser blocks the tab, it says: Your browser blocked the new tab; open the flow via “✎ Edit” in the list or allow pop-ups for this page. How to allow pop-ups is described under What happens on click: How to allow pop-ups.

Known errors of the platform are translated:

- “The trigger does not cope with this table. The connection is fine — the problem is the table.”
- “The chosen connection no longer exists — it was deleted in Power Automate. Choose »none yet« or another one.” The connection is hidden afterward.
- The license sentence from The “Create a new flow” view.
- If the publisher with the prefix “st” is missing on the first creation, it says “The publisher »st« is missing in this environment.”

Notes on the setup are under Preparing buttons and flows.

#### The scaffold of the created flow

The trigger is called “Wenn Smart Templates einen Beleg anfordert” (when Smart Templates requests a document): a Dataverse row trigger on the table “Smart Templates Auslöser”, change type “Added”, scope “Organization”, with a row filter on the identifier of exactly this flow. The following steps come next:

- “Beleg erzeugen” (create document): builds the document as a PDF with the values from the trigger row (template, table, record) and returns it as text, its file name in `FileName` (see Template settings: PDF name). If the template has an e-invoice “XML only”, the XML is in `XmlBase64` as text (name in `XmlFileName`), and the PDF is missing or is the reading copy (see E-invoice: The flow);
- “Hauptdatensatz holen” (get primary record): fetches the record, the table is entered as a fixed value;
- “Hier Ihre Schritte” (your steps here): a placeholder with an explanatory text that you replace with your own steps. The text says where the document is (`body/PdfBase64`, name in `body/FileName`) and, for an e-invoice “XML only”, the XML (`body/XmlBase64`, name in `body/XmlFileName`). It also runs if “Hauptdatensatz holen” fails, but not if the document fails.

The flow does not influence the document: it builds the document once more itself with “Beleg erzeugen”.

What the scaffold looks like in Power Automate is shown in the figure under Preparing buttons and flows: Creating a flow. How to build such a flow yourself without the designer is described under Actions and APIs: Starting a flow.

### The windows “Create a connection” and “First the connection — here is how”

The instructions show how to assign a Dataverse connection to a flow in Power Automate. The window has two modes:

- **Create a connection** (for reference): opened with the button “Create a connection …” or the link “How to create one”. The footer bar shows only “Close”.
- **First the connection — here is how** (as a gate): The window opens by itself at “Create ▸” with “none yet”. Escape, a click next to it and any other closing count there as cancel: no flow is created.

The content scrolls, the footer bar stays in place.

> **Caution:** Assign the connection only through the trigger of the flow, as the six steps below describe. A connection that you create on the page “Connections” of Power Automate does not produce a connection reference and does not appear in the designer under “Connection”, so not in the selection.

| Element | What it does |
|---|---|
| Orange bold box (as a gate only) | It first says why the window opened: You have not chosen a connection yet; without one, the flow is created but does not run, and you still have to assign the connection to it in Power Automate. Here is how: |
| Introduction and pop-up warning | A connection tells Power Automate who may access your data. The easiest way is to create it where you are editing the flow anyway. The warning for this: your browser must not block pop-ups for Power Automate, the sign-in window is one. If a red message appears instead, allow pop-ups for Power Automate and choose “Done”. How to allow pop-ups is described under What happens on click: How to allow pop-ups. |
| “↗ View connections” | Opens the connection list of Power Automate in a new tab. Grayed out if the environment ID is missing (for example without Dynamics). Tooltip, in substance: Shows the existing connections in Power Automate; one newly created there does not appear in the designer’s selection, the steps below are for that. |
| “↻ Done — search again” | Tooltip: “Closes this window and searches for the connections again.” As instructions for reference, it closes the window and reloads flows and connections in “Manage flows”. As a gate, it only closes the window; that acts like “Cancel”, no flow is created and nothing is searched again. |
| The six steps (blue circles 1 to 6, steps 2 to 6 with a photo) | (1) Create the flow here, even without a connection. It then opens in Power Automate. (2) There, click the first step, “Wenn Smart Templates einen Beleg anfordert”. At the very bottom of the window, below all the fields, is “Change connection reference”. (3) Click it. In the window that opens, click “Add new”. (4) Give it a name and click “Sign in”, then sign in with your Dynamics account. (5) The new connection is now in the list. Select it and confirm. (6) The bottom now shows the connection instead of the bare reference. Save the flow, done. If a photo does not load, steps 2 and 3 show a drawing, and for the others the image is omitted. The photos of steps 2 and 3 still date from the time of the old trigger and show “When a row is modified”; the text gives today’s name. |
| Enlarge image | Tooltip on the image: “Click to see the image enlarged.” A click shows the photo large on a dark background; a click or Escape closes the large view. Presumably Escape also closes the instructions in that case, as a gate thus with cancel; this has not been measured. So close the large view with a click. |
| Link “Microsoft describes connections in detail: Add and manage connections” (at the end) | Opens Microsoft’s page on adding and managing connections (learn.microsoft.com) in a new tab. |
| “Close” (for reference only) | Closes the window. |
| Status line “Please read down to the bottom once — then you can continue.” or “Read — you can continue.” (as a gate only) | “Continue ▸” becomes available only once you have scrolled all the way down and the images have loaded. If everything fits into the window without scrolling, the button becomes available as soon as the images are in place. If an image does not load, the window waits at most 6 seconds for it. |
| “Cancel” (as a gate only) | Closes the window. No flow is created. |
| “Continue ▸” (as a gate only, highlighted) | Tooltip at first: “Read down to the bottom first.” Disabled until the instructions count as read. The click immediately opens an empty tab for the flow editor, closes the window and starts the creation with “none yet”. |

The labels in the command designer and in Power Automate come from Microsoft and were read off in September 2026; they may change. If the screen differs from the text, follow what you see there.

### What changes in the document?

**On the canvas:** Nothing. The button “↻ Manage flows” and all settings in its window change nothing on the sheet. The state of the window lives only there, not in the template.

**In the PDF:** No setting of the window changes the PDF, and the flow has no influence on the document that the button prints. How else a document from a button differs from the PDF from the designer is described under Full preview and PDF: Full preview and printing in Dynamics. If the flow is switched off or removed at the time of the click, no document is created at all.

---

## Problems and messages

*For users · Help and reference · Page en/meldungen.html*

> **In short:** When creating a document, Smart Templates checks whether the PDF looks the way the template describes it. It reports whatever does not match: as a warning if the document looks different from the template, or as a note if something is noteworthy but nothing is missing. This page has three parts. First come the common problems, each with what helps and a link to the page that explains it. Then comes where and how the designer and the print report: cards, notes, windows and confirmation prompts, their colors and how long they stay. Last come all messages of the print with their wording, their meaning and the remedy. The messages of the print are mostly in English; some, such as those on variables and flows, come in German.

### Common problems and what helps

Always check a document with the “Full preview”: it shows the real PDF with all the data, while the canvas shows only an excerpt. If there is a message you do not understand, look it up under All messages.

#### A table is empty in the PDF

- **The rule delivers only one record.** If the rule of the table says “Only the first”, “Only the last” or “The one at a specific position” under “Selection”, a table based on it stays empty. Choose “The first N” or uncheck “Keep only specific records” (see Rules: “Selection” tab: sorting and selecting).
- **The rules read each other in a cycle.** Then all rules are skipped, and every table based on a rule stays empty. The designer reports the cycle (see Rules: When rules read each other in a cycle).
- **The filter lets no row through.** Open the rule and check the conditions, ideally with a sample record that has matching rows.
- **The row source is missing.** If a source or rule was deleted, the table points to nothing. Select the table, in the section “Data” click “⚙ Data source & sorting” and in the window click “Change…”, and choose a new row source (see Data tables: Changing the row source).

#### A field stays empty

- **The record contains nothing.** Empty stays empty; check the field in Dynamics.
- **The field no longer exists.** In the area “Data” it carries the suffix “missing”. Insert a different field.
- **A linked record could not be read.** It was deleted, or the user who creates the document lacks the read right. The document reports this as a warning (see Rights and roles: When a right is missing).
- **The field belongs to a rule.** A field of a rule on a source shows a value in the text only if the rule delivers exactly one record, for example with “Only the first” under “Selection”. A field of a rule that sits on a list, for example on the line items, currently cannot be dragged onto the page. If you insert it in the window “Edit text”, it does appear as a marker in the text, but currently delivers no reliable value; the spot can stay empty in the PDF. Show a sum there as a total row or, in running text, through a custom variable with “Sum of” (see Rules: Using the result).
- **A variable does not exist.** The spot stays empty; before the full preview and the PDF, the designer reports this (see Variables: The check before full preview and PDF).

#### Text or table is cut off

The spots where the PDF cuts off are listed under Position, size, rotation and arrangement: Where the PDF really cuts off. For a group with a fixed height, turn on “Automatic height (fit to content)” (see Position, size, rotation and arrangement: Automatic height and limits). An object that begins entirely below the fixed bottom edge is missing, with a warning. If it only extends over the edge at the bottom, it is, depending on the object, cut off, shortened or refitted; cut-off or shortened text, shapes, lines and images are reported by the document with the missing millimeters; a table loses rows and reports it (see Position, size, rotation and arrangement: What the wall does to an object).

A text with a fixed height (without “Automatic height”) is cut off on the canvas, with a hatched strip below it. The PDF prints it in full and reports that it needs more space than its box. If it sits in a group, cell or table row with a fixed height, the bottom edge of that cuts it off in the PDF too (see Texts: Width and height).

#### Something extends over the bottom margin or is missing at the bottom

The first object of a page does not move to the next page if it fits on a page, but extends over the edge; whatever reaches beyond the paper edge is missing in the PDF. A code is not cut off there, but omitted; a GiroCode then prevents the document (see Barcode, QR code and GiroCode: Page edge and fixed bottom edge). Exceptions apply to tables, to a page that a letterhead makes narrower, and to objects that are taller than a page. Place the object on the next page on the canvas, or move it up far enough that it fits (see At the page edge: The first object on a page and At the page edge: When the first object moves or is split after all). An object with “Fixed position” also stays where it is drawn (see Positioning behavior: Fixed position).

#### Objects are in a different place in the PDF than on the canvas

If a text or a table grows with the real data, the objects below it move down, depending on their positioning behavior. If an object is to keep its distance from the table above it, choose “Flowing”; if it is only to move out of the way, “Flowing on contact” (see Positioning behavior: The three options).

#### A sum does not match the rows

- The canvas calculates with only the first 20 rows of a list. What counts is the full preview (see Data sources and relationships: What the canvas loads and what is printed).
- The rule of the sum filters differently from the rule of the table. Create the same filter in both.
- The sum comes from a custom variable with “Sum of”. It calculates over all rows of the list, without the filter of the table. If the sum is below a filtered table, use a total row with the same filter (see Rules: Example: the sum below the items table).
- Sums are formed from the rounded values so that they match the printed rows (see Rules: Round first, then sum).

#### Date or number in the wrong format

Date, numbers and Yes/No follow the template language and the settings in the “Numbers & date” tab (see Numbers, currency and dates: “Numbers & date” tab). The four settings under “Currency & numbers”, that is, currency symbol, decimal places, notation and thousands separator, can be switched per customer with condition branches (see Numbers, currency and dates: Condition branches: different per customer); there are none for template language and date format.

A single date field can have a format of its own (see Numbers, currency and dates: The date format of a single field). For a single number or amount there is no format window of its own; for a value of the printed record, you get other decimal places or another symbol through a custom variable; for a field in a table row this is not possible (see Numbers, currency and dates: Decimal places and symbol for a single field).

#### The font looks different

If a font is not uploaded, the template prints with Arimo. If a font lacks a style, such as italic, italic text appears upright (see Template settings: Default font). The designer reports both; upload the missing file (see Image library and fonts: The “Manage fonts” window).

#### A code is missing, or a document with a GiroCode is not created

- **The code is missing, the spot is empty.** Either its content is empty, in which case the spot stays silently empty with “print nothing”, or it is invalid, for example with a wrong check digit for an EAN. In the second case, the feedback contains a warning with the kind of code, its content from the template and the reason (see Barcode, QR code and GiroCode).
- **The document with a GiroCode is not created.** A visible, invalid GiroCode prevents the document; the reason names every defect, such as the check digit of the IBAN. Correct the data, or hide the GiroCode for this document with a visibility rule, for example for a credit note (see Barcode, QR code and GiroCode: What is checked).
- **The code cannot be read.** Check size and color: a bar at least 0.25 mm wide, a dot of the QR code at least 0.4 mm, dark bars on a light background and “White margin (quiet zone)” on (see Barcode, QR code and GiroCode: Fitted print-sharp). For codes that are too small, the document writes a note on the data.

#### A document with an e-invoice is not created

- **A message appears that begins with “The e-invoice cannot be created”.** An e-invoice is created only if it is complete and consistent; otherwise nothing is created, not even a normal PDF. The message names the details and says who must act: whoever maintains the record or whoever maintains the template (see E-invoice).
- **You want to know what is missing before a user notices.** Check the template in the “E-invoice” tab with “Check with sample record”, ideally with an invoice, a down payment invoice and a credit note (see E-invoice: Checking with a sample record).
- **The full preview shows the PDF, but the button cancels.** The full preview is milder: for gaps it shows the PDF without an e-invoice and a warning (see Full preview and PDF: With e-invoice).
- **The document is created without an e-invoice and without a message.** Then “Only if …” does not apply to this record, or the e-invoice is turned off (see E-invoice: “Only if …”).

#### The first document takes a long time

After a longer break, the first document takes ten to seventeen seconds; every further one is fast. Keep-warm helps against this (see Keep warm).

#### Header or footer is missing on a page

On the repeated group, check “Show on pages” and “Exclude these pages” (see Pages, header and footer: On which pages). If the group has a visibility rule that does not apply to the printed record, it is missing on all pages even though the canvas shows it (see Visibility: Per object).

#### There is a blank page at the end

A page added with “Blank page” or “Add page” sets a minimum number of pages: It is printed as long as the content alone fills fewer pages. Remove it with “🗑 Blank page” if you do not need it (see Pages, header and footer: Appending blank pages and removing pages).

A blank last page also arises when nothing follows after a page break (see Pages, header and footer: Page break: What it does). Then remove the break (see Pages, header and footer: Page break: Selecting, moving, removing).

#### The designer does not start or shows no template

Most messages at startup stay at the top as a persistent message (see Messages, prompts and windows).

- **The designer does not start.** Reload the page with Ctrl+Shift+R. If it stays that way, the exact message is in the browser console (F12). If it says the page was not opened within a Dynamics 365 app, open the designer through the app (see Opening Smart Templates).
- **The templates cannot be loaded.** The message “The templates could not be loaded – …” names the reason, and an empty document appears instead of a template. Reload the page as soon as the cause is fixed; open a saved template file through “Import”. If not a single template can be retrieved, the read rights are often missing (see Rights and roles: When a right is missing).
- **There is no template yet.** Then the window “Welcome to Smart Templates” appears, with “Create first template” and “Import template file” (see Managing templates: If there is no template yet). If you know that templates already exist, your read right probably applies only to a part of the templates, for example only to your own (see Rights and roles: When a right is missing).
- **The link names a template, but none can be retrieved.** A warning (yellow card) reports: “The link names a template, but none can be retrieved at all — are read permissions missing? An empty document is shown.” The card disappears after a few seconds; above it appears the window “Welcome to Smart Templates” (see Managing templates: If there is no template yet). Check the read rights (see Rights and roles: When a right is missing) and then open the link again.
- **The time zone cannot be read.** Dates on the canvas are then calculated in the time zone of your computer, the PDF in the one from Dynamics. The two can be a day apart.

### Where the messages appear

The designer reports in two ways. It tells you itself what is happening right now or what it needs, with cards, notes, windows and prompts; the first four sections describe that. And it shows what the print reports about a created document; the sections after that describe that. Here the kinds, colors and durations of all messages are in one place.

#### Messages, prompts and windows

The designer communicates in three ways and uses four kinds of windows. All areas use the same messages and windows; they are described once here.

| Kind | Appearance and place | Duration |
|---|---|---|
| Note (card) | A small card at the top center that also lies over windows; several stack one below the other. There are four kinds with a colored left edge and an icon: error (red) and warning (yellow) with a warning triangle, success (green) with a check mark and information (blue) with a small “i”. With “×” you close them immediately. | Error 6.5 s, all others 4.2 s |
| Yellow note | A yellow note that lets clicks through. It floats in the middle just below the ribbon and moves nothing. Only one note is shown at a time; a new one replaces the previous one immediately. If a window is open, including the group designer, the note appears at the top of that window. | Default 2.8 s; other messages 3.5 to 12 s |
| Persistent message (main window only) | Looks like the yellow note, but stays until the next yellow note replaces it or an import hides it. It appears for startup errors (see The designer does not start or shows no template) and when the time zone is not readable. At startup it is at the top center and lets clicks through. | until the next note |

[Image: Four note cards one below the other, each with a colored edge on the left, an icon, a sentence and a × on the right. At the top the red error card with a warning triangle: “The template was NOT deleted. It is still open and unchanged.” Below it the yellow warning with a warning triangle: “Vertical alignment only works with objects on ONE page — the selection spans several pages.” Below it the green success card with a check mark: “Link copied — whoever opens it lands directly in this template.” At the bottom the blue information card with “i”: “Headers and footers stay in place when several objects are moved together — they belong to every page. Drag them one at a time.”]
Caption: The four kinds of note cards.
- Image marker 1: Error (red): stays the longest, 6.5 seconds.
- Image marker 2: Warning (yellow).
- Image marker 3: Success (green).
- Image marker 4: Information (blue). Warning, success and information stay 4.2 seconds; with “×” you close any card immediately.

The messages of the print after creating (red with the prefix “Warning: ”, yellow with “Note on the data: ”) are described in the section Notes and warnings; the text after the prefix is in English. What individual error texts mean and what you do then is described under All messages. That the card kind warning is not the same as the warning of the print is explained under Two meanings of “warning”.

Error texts from the service consist of a statement of what failed and the plain text of the service, for example “Saving failed – …”. If the plain text is missing, in Dynamics the advice “please reload the page (Ctrl+Shift+R). If it keeps happening, the exact message is in the browser console (F12).” appears. Technical error pages and texts over 600 characters are not shown by the designer as plain text.

#### The windows

| Window | Structure and operation |
|---|---|
| Confirmation window (prompt) | Title (default “Please confirm”), text and buttons: on the left “Cancel” or as named, on the right the main button, blue or, for dangerous actions, with red lettering. The focus is on the main button, Enter triggers it. Esc and a click next to the window count as “Cancel”. Pure notices have only one button, for example “Got it”. |
| Name window | Text, a prefilled and selected text field, an error line and the buttons “Cancel” and main button. An empty name is rejected with “Please enter a name.”, in a red line in the window. Enter confirms, Esc and a click next to the window cancel. |
| Selection window (card above the canvas) | Most dialogs are cards that stand in the middle. As soon as you work in them, they keep their position; the button you clicked does not jump away. Some have a ✕ at the top right (tooltip “Close”). On all edges you can resize them with the mouse, down to a smallest size and at most almost to the size of the browser window. If a window opens above another, it lies over the highest open one, and its veil is only light. |
| Loading window | A small card with a spinner and text without buttons, for example “Loading sample data...” or “Loading data source...”. It closes itself. |

#### The most important confirmation prompts at a glance

These windows ask before anything is lost or happens. Each one is described where its command is. Confirmation prompts when deleting or discarding individual objects, rules, variables and sources are described with those.

| Window | When it appears | More |
|---|---|---|
| “Unsaved changes” | When switching the template in the selection, at “New”, at “Import” (after choosing the file) and when changing the language, if the template has unsaved changes. | Managing templates: Prompt when leaving |
| “Discard the loaded file?” | Before “New”, if the open template comes from a file. | Managing templates: After opening |
| “The template can be opened – please note” | When importing, if the check finds only notes; buttons “Copy list”, “Cancel” and “Open”. | Managing templates: The report windows |
| “Discard new template?” | When canceling “New”, as soon as something has been entered. | Creating a new template: Canceling |
| “Please confirm” with “Delete the template ‘…’?” | At “Delete”. | Managing templates: Deleting |
| “Discard changes that were not applied and close?” | When closing the template settings with changes. | Template settings: Opening, applying or discarding the window |
| “Please confirm” for a rule cycle, for variable problems or for incomplete conditions | Before “Full preview” and “PDF”; buttons “Cancel” and “Generate anyway” (labeled in red). | Full preview and PDF: Confirmation prompt for rules and variables |
| “Choose sample record” | Before “Full preview” and “PDF”, if no sample record is stored or the stored one was deleted in Dynamics. | Full preview and PDF: Without a sample record |
| “Welcome to Smart Templates” | When the designer is opened and there is no template yet, and after the last one is deleted. | Managing templates: If there is no template yet |
| “Primary source required” | When the template has no primary source. | Data sources and relationships: The “Primary source required” window |
| “Not yet saved in Dynamics” | At “🖨 Manage buttons in Dynamics”, if the template is not stored in any record. | Buttons: the assistant: The window “Not yet saved in Dynamics” |
| “Discard the changed text?” | When closing the text editor with “Cancel” or Esc, if the text has been changed. | The “Edit text” window: Cancel, Apply and Esc |
| “Leave this window?” | When closing the window “Manage data sources” with “Close” or Esc, if something has changed there. | Data sources and relationships: Confirming, discarding, closing |

#### Messages of the canvas

The canvas also reports some things itself, as a yellow note under the bars, each message once for about nine seconds. These messages concern only the canvas, not the document:

- “Preview: »…« has more than 20 rows — the canvas loads only the first 20 of them. Rules, totals, »The first N« and conditions use only these on the canvas; the printed document uses all of them.”
- “Preview: the canvas shows at most 50 rows of »…«. All are printed — up to the upper limit, which the document reports when it is reached.” This concerns further sources.
- A message that the sample record or a further source could not be read just now. The canvas then shows no sample values there; the document fetches the data anew when it is created.

When a template is opened, the following also appear, if they apply: findings from converting older templates to today’s structure, such as old headers and footers to groups that repeat on every page, and the calm note “Data sources updated from Dynamics: 12 new field(s) and 3 new relationship(s) added.” This note appears at almost every opening and is not an error: Only the fields used are saved; the designer fetches the rest when opening.

What the limits of 20 and 50 rows mean is described under Data sources and relationships: What the canvas loads and what is printed. Further messages of the designer are where the operation is explained, for example when expanding in the data tree (Data tree and field picker: Expanding, loading, depth), when comparing with Dynamics (Data tree and field picker: Fields that no longer exist in Dynamics) and for the data sources (Data sources and relationships: The question “Additional data source without a condition”).

#### Notes and warnings

If the print notices something when creating, it reports it after the full preview and after every download at the top center, also above the window of the full preview. There are three kinds:

| Kind | What it looks like | What it means |
|---|---|---|
| Warning | White box with a red edge on the left and a warning sign; the text begins with “Warning: ”. Disappears after 6.5 seconds. | The document looks different from what the template promises: Something is missing, cut off, overprinted or shifted. |
| Note on the data | White box with a dark yellow edge on the left and a warning sign; the text begins with “Note on the data: ”. Disappears after 4.2 seconds. | Something noteworthy about the document that, in the print’s assessment, does not falsify it. |
| Error (in Dynamics only) | White box with a red edge on the left and a warning sign; the text begins with “FEHLER: ”. Disappears after 6.5 seconds. | No document was created (see When no document is created). |

[Image: Two message boxes one below the other on a light background, as they appear at the top center of the designer. The upper box is white with a thick red edge on the left, a red warning sign and the English text “Warning: text ‹Vielen Dank für Ihren Auftrag. Zahlbar innerhalb von 14 Tagen ohne Abzug.› needs 12.1 mm but its box is only 6 mm high - the elements below it that flow were pushed down | field 'Region' does not exist on 'invoice' - it was not queried and stays empty. Please check the spelling.”; a gray × at the top right. The lower box is built the same way, but with a dark yellow edge and a yellow warning sign: “Note on the data: table 'Items': it reaches 4.5 mm into the right page margin - nothing is lost, it still fits on the 210 mm sheet.” with a gray × at the top right.]
Caption: A warning (red) and a note on the data (yellow) after a full preview; sample texts with invented numbers.
- Image marker 1: Warning: The document looks different from what the template promises. The text begins with “Warning: ”; several sentences stand in one box, separated by “|”.
- Image marker 2: Note on the data: something noteworthy that, in the print’s assessment, does not falsify the document.
- Image marker 3: With the × you close a box earlier; after that, the feedback in Dynamics is only in the browser console.

- Several messages of the same kind stand in one box, separated by a vertical bar “|”. The warnings are always shown in full. At most six of the yellow notes appear; if there are more, the end says, for example, “(+3 more note(s))”.
- If you closed a box earlier with “×”, the feedback in Dynamics is only in the browser console (F12).
- The plain figures, such as how many pages the document has, are not shown by the designer.

Which warnings and notes exist and what you can do about them is described under All messages. Also read the yellow notes: A few of them name values that stay empty. Warning here means the message kind of the print, not the yellow card kind of the designer (see Two meanings of “warning”). What the message kinds of the designer generally look like is described under Messages, prompts and windows.

> **Good to know:** The texts of these messages come from the print and are mostly in English. Some come in German, for example “Die Variable »…« ließ sich nicht berechnen: …” or messages on flows. The prefixes “Warning: ” and “Note on the data: ” are put in front by the designer.

#### Two meanings of “warning”

The word “warning” stands in this manual and in the messages for two different things. A message kind of the print is called warning, and a card kind of the designer is called warning. The two are not the same.

| What is meant | How to recognize it | Appearance and duration |
|---|---|---|
| The warning of the print about a document | The text begins with “Warning: ”. The document looks different from what the template promises. In the output “Message” of a flow, it comes after “WARNING:”. | The designer shows it as a card of the kind error: red edge, 6.5 seconds. |
| The card kind warning of the designer | A card with a yellow edge and a warning triangle. It carries either a message of the designer itself, for example “Vertical alignment only works with objects on ONE page — …”, or the note on the data that the print reports; it begins with “Note on the data: ” and, in a flow, comes after “NOTE:”. | Yellow edge, 4.2 seconds. |

A card with the prefix “Warning: ” is therefore a warning of the print, even if it is red and belongs to the card kind error. A yellow card is never a warning of the print. In the directory All messages, warning always means the warning of the print.

#### Where the feedback on a document arrives

Where you see the feedback on a document depends on how it was created:

| Where | What you see |
|---|---|
| In the designer, after “Full preview” or “PDF” | At the top center a red card “Warning: …” with the warnings and a yellow one “Note on the data: …” with the notes. What they look like and how long they stay is described under Notes and warnings. If no document is created at all, the reason is reported differently (see When no document is created). |
| Beforehand, in the designer | For rules that read each other in a cycle, for problems in the custom variables and for incomplete conditions, the designer asks before it creates the document: “Generate anyway” or “Cancel” (see Full preview and PDF: Confirmation prompt for rules and variables). |
| With the button in Dynamics | If there are warnings, a window “Smart Templates” opens with the whole feedback; notes alone are never shown by the button. With several checked rows, the warnings come together in the final message. If the button cancels, the window is called “Smart Templates — canceled” and names the reason. Which windows and final messages exist per purpose is described under What happens on click. |
| In a flow | In the output “Message” of the action (see Actions and APIs: Markers in Message). |

The feedback itself, for example the output “Message” in a flow, begins with “OK:”, the number of pages and bytes and the origin of the data. Then come the warnings after “WARNING:”, then the notes after “NOTE:” and at the end the times. How many of each appear and how they are separated is described under Notes and warnings. The same message appears only once.

#### When no document is created

| Where | What appears |
|---|---|
| Window “Full preview” | Instead of the document, in white lettering “PDF generation failed – …” with the reason. |
| Button “PDF” and “Download PDF” | A yellow note “PDF failed – …” with the reason, for six seconds: after “PDF” under the bars, after “Download PDF” at the top of the window of the full preview. No file comes. |
| In Dynamics additionally | At the top center the message “FEHLER: …” (see Notes and warnings). |

If Dynamics names no reason, the advice under Messages, prompts and windows applies. Common reasons and what you do then are described under Reasons when no document is created at all.

### All messages

The tables give a piece of each message by which you recognize it, as it appears in the feedback. English messages are set as code, German ones in quotation marks. Where a name is inserted, “…” stands. What comes as a warning changes the document; what comes as a note only describes it (see Two meanings of “warning”). The designer already shows some of these messages on the canvas, then also in English, for example those on hand-written conditions.

#### Loading data

| Message | Meaning | What helps |
|---|---|---|
| `field '…' does not exist on '…' - it was not queried and stays empty. Please check the spelling.` | A placeholder names a field that does not exist on the table, usually a typo. The spot stays empty. A summary over a list of the document within a row of that list (`{{count(Positionen)}}` in a line items table, also in a cell condition, a row of the e-invoice or an if-then text) is not a typo and is not reported. Still reported are the name in the wrong spelling (`count(positionen)` prints 0) and the bare list name in the row (`{{Positionen}}` prints nothing). Also still reported is the summary in an if-then text if the template otherwise does not use the list itself anywhere else, for example in a table on a rule; there it currently prints 0. | Insert the field again from the area “Data”. |
| `option labels in language … could not be read (…) - option fields of … show the label in the language of the user who creates the document` | Warning: The labels of the option fields in the chosen language could not be read from Dynamics. The named tables print option fields in the language of the user who creates the document. | Create the document again; if it stays that way, check the rights on the table definitions (see Rights and roles: When a right is missing). |
| `… referenced record(s) could not be read (deleted or no access)` | A linked record, such as the customer, is missing: It was deleted, or the user may not read it. | Check the record and the read rights (see Rights and roles: When a right is missing). |
| `… row budget 20000 reached - not all rows were loaded. …`, for a further source `source '…': row budget 20000 reached - loading STOPPED here …` | A query, such as a very long list or a large further source, has more than 20,000 rows; the rest was not loaded. Sums and counts over it, in a table, a text or a condition, and the selection of a rule do not cover all rows; the document names the affected summaries individually. | For a list, a filter in its rule that already applies when loading, as long as nothing else needs the whole list; for a further source, a smaller table (see Data sources and relationships: What the canvas loads and what is printed). |
| `time budget … s for loading data reached` | Loading took too long and was aborted; the document is incomplete. | Load less, for example with filters. |
| `depth limit 6 reached` | Relationships deeper than six levels were not loaded. | Fetch the data by a shorter path. |

#### Building blocks

These messages name the building block by its name. The designer already shows most of them as a label on the building block object (see Building blocks: Labels on the building block object).

| Message | Meaning | What helps |
|---|---|---|
| `WARNING: Baustein-leer - … building block area stays empty (…) - the document is not complete; an e-mail action does not send it, and no flow is started.` | Warning: A building block area stayed empty, or a building block switched off all rules (`all rules of the document are switched off by a building block`). The document is incomplete; it is not sent by email, and a flow is not started. | The message before it names the reason; see the rows below. |
| `building block '…' was not found - its area stays empty`, `… could not be read …`, `the building blocks could not be retrieved …` | The building block no longer exists, or it could not be fetched. The space stays free. | Create or import the building block again, or delete the object from the template. |
| `building block '…' is bound to '…', which is not a lookup (N:1) relation …`, `… needs '…', but its binding points to '…' …` | The binding is missing in the template or points to a different table. | Insert the building block again and choose the matching binding. |
| `… the prefix '…' is not valid …`, `… is already used by another building block …`, `… has the same name as a variable of the template …` | The prefix is invalid, duplicated or has the same name as a custom variable. | Rename the custom variable or insert the building block again with a different prefix. |
| `building block '…': the name '…' already exists in the template - its area stays empty` | A name that the building block brings along (a relationship, a rule, a further source or a variable, each with its prefix) already exists in the template. The area stays empty. The sentence names the name as the building block brings it (with its prefix); upper and lower case do not count in the comparison, so in the template it can be written differently. It names and compares the name of a rule in internal form: spaces become “_”, characters such as “-” or parentheses are dropped (“Chancenkopf_Produkte” for the rule “Chancenkopf Produkte”, “Chancenkopf_TopProdukte” for “Chancenkopf Top-Produkte”). | Rename the entry with the same name in the template or insert the building block again with a different prefix. |
| `a building block reference on an element of type '…' has no effect here - only a group can hold one` | The entry “baustein” is on an object that is not a group (for example on a text, after a change made by hand to the file); only a group can hold a building block. The entry has no effect: The object itself is printed as before, a building block is not inserted there. The document is still considered incomplete (row “Baustein-leer”). | Remove the entry “baustein” from the object, for example in the template file (see Managing templates: Importing); do not delete the object itself. If a building block is to be there, insert it again at that place. |
| `building block '…': these references in its rules are not known in the building block: … - a rule may only read what the building block itself has, so its area stays empty.` | A rule of the building block names a name that it does not have, or one that only the template puts on the record of the binding. The area stays empty. | Correct the rule in the building block (see Building blocks: What a building block may read). |
| `building block '…': each of these references is not known in the building block: … - inserted they stay empty.` | A reference in the content of the building block does not resolve; it stays empty, the rest is printed. | Correct the reference in the building block. |
| `building block '…' contains a circular rule dependency (…) - all rules of the document are switched off` | Rules of the building block presuppose each other. Then no rule of the document calculates, not even those of the template. | Correct the rules in the building block. |
| `building block '…' bound to '…' reaches the depth limit 6 - these relations are NOT loaded: …` | Under the binding, a chain of the building block goes deeper than six levels; this part stays empty. | Choose a binding closer to the main record or shorten the chain in the building block. When inserting, “Choose binding” does not even offer such a deep binding. |
| `building block '…' could not be inserted safely (self-check: …) - its area stays empty` | Smart Templates could not make sure that every reference was rewritten correctly and rather leaves the area empty. | Check the content of the building block, especially summaries in table cells. |
| `'…' is not a building block …`, `… does not consist of exactly one group …`, `… contains another building block, which is not supported …`, `… sits inside a table, which is not supported (not per row) …` | The reference points to an ordinary template, the building block is damaged, contains a building block or sits in a table cell. | Move the object to a permitted place or check the building block. |
| “»…« ist ein Baustein und erzeugt allein keinen Beleg. Es wurde nichts erzeugt. …” | A button, a flow or an action points to a building block instead of a template. | Set the button or flow to the template that contains the building block. |
| “The document is incomplete because of a building block: … — no email was created.”, “The template is incomplete because of a building block: … — no file was created.” | The email action or the e-invoice aborts because a building block area is empty (see Building blocks: When the area stays empty). The sentences are in the language of your Dynamics interface; in a German one they read “Der Beleg ist wegen eines Bausteins unvollständig: … — es wurde keine E-Mail erzeugt.” and “Die Vorlage ist wegen eines Bausteins unvollständig: … — es wurde keine Datei erzeugt.” | Fix the reason from the message. |

#### Rules

| Message | Meaning | What helps |
|---|---|---|
| `circular rule dependency (… -> …) - rules were skipped` | Rules read each other. All rules are dropped; tables on rules stay empty. | Take out one of the references (see Rules: When rules read each other in a cycle). |
| `rules '…', '…' and '…' could not be calculated in a valid order - '…' reads the result of '…' before it is ready; the rules were calculated in the order in which they are loaded` | Rules read each other across neighboring lists in such a way that there is no valid order, without a cycle. The rules calculate anyway, in the order in which they are loaded; the named rule reads a result that is then still missing. | Take out one of the references (see Rules: When there is no valid order). |
| `rule '…': … was deleted - it reads rule '…' from a level ABOVE …` | A rule reads a rule above it. The reference upward was left out, and this part is dropped: a part of the filter (the filter becomes looser), a sort level, the whole summary (the rows stay individual, their calculations are missing) or the formula of a variable (it stays empty). | Create the key figure as a rule of its own on the same level (see Rules: What a rule may read). |
| `rule '…': '…' is not a known field, relation or rule` | A filter or a variable of the rule names an unknown name; it counts as empty. The list of a further source (`count(Lager)`) counts as known; it is reported only if the spelling is not exactly right (`count(lager)`). | Check the spelling; rebuild the condition in the builder. |
| `rule '…': '…(…)' reads '…' of the additional source '…' - for a rule on a relation this column is not queried and stays empty …` (on a source: `for a rule on the source '…'`) | A rule on a relationship (such as on the line items), on another further source or on the source itself, which only summarizes its own list, calculates with a column of a further source (`min(Lager.menge)`) that the document does not fetch for it. The summary sees no values there; the rule compares against empty. If `… is not a field of that source …` appears instead, the column does not exist in the source. | Bind the column in the document — the sentence names the summary itself as an example (such as `{{min(Lager.menge)}}`); for “is not a field”, check the spelling or open the template once and save it. |
| `rule '…': '…' reads a field of the list of the additional source '…' outside an aggregate …` | A rule reads a field of a further source without a summary — in the filter (`Lager.name == 'Nord'`) or in a rule variable (`{{Lager.name}}`). A further source is a LIST, it has no single field: The value is empty on every row, a comparison with a fixed value comes out the same on every row (with `!=` always true). | Use a summary, such as `first(Lager.name)` (the first entry) or `count(Lager) > 0`. |
| `… has the same name as …` | Two rules, variables or fields have the same name; one of the values is lost. | Rename one of them. |
| `rule '…' of relation '…' has the same name as its own relation '…'`, likewise `… as the relation '…'`, `… as the field '…'` and `… as the list of the source '…'`; for a rule of the main source `rule '…' of the main source has the same name as … at document level …` | Warning: The rule has the same name as its own relationship, as another relationship or a field on the same record or, for a rule on the main source or on one of its relationships, as the list of a further source. Its result replaces the list or the field there: Tables, counts and sums under this name calculate only with the rows of the rule, and a field no longer shows its value there. When importing, the check gives a note about this (see Template format: What the check reports on import). | Rename the rule (see Rules: The name and renaming). |
| `rule '…': the sorting field '…' has no effect here …` | After summarizing, the sort field no longer exists. | Sort by a grouping field or a calculation. |
| `rule '…': the rows of '…' under '…' were dropped …` | A rule below it summarizes by itself. Its rows are left out of the summary. | Do the summarizing in the outer rule. |
| `rule '…': '…' under '…' selects a single record …` | A rule below it delivers only one record (“Only the first”, “Only the last” or “The one at a specific position”). It stays empty in the summary. | In this rule, choose “The first N (e.g. the top 5)” or turn off the selection. |
| `rule '…': the merged list '…' has no sorting of its own …` | A merged list was ordered by its first column. | If needed, set a sort order in its rule. |
| `rule '…': the calculation '…' has the same name as a grouping field …` | A calculation has the same name as a grouping field and overwrites its value. | Rename one of the two. |
| `rule '…': the variable '…' has the same name as a field of the record …` | A variable of the rule has the same name as a field of the row and replaces it. | Rename the variable. |
| `rule '…': the variables '…' and '…' both become the field '…' …` | Two variables of the rule result in the same spelling; only the one calculated last is printed. | Distinguish the names more clearly. |
| `rule '…': the variables '…', '…' read each other in a cycle …` | Variables of a rule presuppose each other; they stay empty. | Break the cycle. |
| `rule '…': the variable '…' reads '…', but after grouping …` | A variable of a summarizing rule reads a field that no longer exists and stays empty. | Use a calculation or a custom variable of the document. |
| `rule '…': the calculation '…' … adds up whole records, not values - nothing was printed.` | A sum or an average points to a list or a record instead of a number field; this occurs only in hand-edited templates. | Choose a number field. |

The messages that the designer shows when editing rules are described under Rules: Messages at a glance.

#### Variables and conditions

| Message | Meaning | What helps |
|---|---|---|
| “There are several variables named »…« — only the first one is used.”, “The variable »…« uses itself.” or “The variables depend on each other: …” | Two custom variables have the same name; only the first one is used. Or a variable uses itself, or several presuppose each other: A cycle between custom variables, all involved stay empty. The prompt of the designer before full preview and PDF names the same sentences. | Rename one or break the cycle (see Variables: The check before full preview and PDF). |
| “Die Variable »…« ließ sich nicht berechnen: …” | An unexpected error occurred while calculating. | Check the content of the variable. |
| `formula '…': division by zero` | A calculation divides by zero; the value stays empty instead of 0. | Check data or calculation. |
| `formula token '{{…}}': '…' is a variable, but without '@'` | In a calculation, the @ is missing in front of the name of a variable; it counts as 0. | Insert the variable again. |
| `placeholder '{{…}}': '…' is not a known format` | Typo in the format of a placeholder; the spot stays empty. | Insert the field again. |
| `placeholder '{{@…}}': there is no variable with this name` | A variable does not exist (any more); the spot stays empty. | Insert the variable again. |
| `variable '@…' in a condition: there is no variable with this name - every comparison with it counts as not true (also with '!=' and '!')` | Warning: A condition names a custom variable that does not exist (any more). The condition does not apply, even with “!=” and “!”; an if-then takes the else branch. | Create the variable or rebuild the condition (see Variables: The check before full preview and PDF). |
| `variable '@…' is set to 'number' but … could not be calculated` (for a currency variable: `… is set to 'currency' …`) | A number or currency variable contains text, often a number with a comma; the text is printed as it is. | Write decimal numbers with a point, for example 1.19. |
| `condition '…': a single '=' is not a comparison`, `… is not known - use '&&'`, `the brackets do not match`, `a decimal comma is not a number here`, `condition '…': it is incomplete`, `condition '…': '{{' and '}}' do not belong in a condition`, `condition '…': 'isEmpty' is not known - write '!field'` | A hand-written condition has a typo, for example a single “&”, a field in “{{ }}” (see Conditions: Fields in “{{ }}”) or a word such as “isEmpty” (see Conditions: Checking for empty in a condition written by hand), or a part is missing (“it is incomplete”, see Conditions: Incomplete conditions); it then never or uncertainly applies. The designer also shows these messages at the top of the canvas; the PDF reports the same. | Rebuild the condition in the builder (see Conditions: Conditions written by hand). |
| `the aggregate '…' has no rows here` | Note: A sum in a condition runs over an empty or misspelled list; it counts as 0. | Check the names. |
| `summary '…' could not be calculated - '…' is not a field. A summary works over ONE field of a list …` | Warning: In the parentheses of a summary there is a calculation, a comma or a second summary, for example `sum(Positionen.netto * Positionen.menge)`. A summary works over only one field; it stays empty (`count` keeps counting the rows), and within a calculation it counts like an empty field as 0. This is reported in the text, in a condition (where it is empty, not 0), in a rule formula, in the value of a custom variable, also if the variable appears only in a condition, a condition branch or a rule filter, and in a detail of the e-invoice, there also if the calculation continues in the same placeholder (`{{sum(a * b) * 2}}`). In the text and in the value of a variable, this notation (the calculation within the same curly braces) currently stays silent. Continue calculating after a summary by writing the calculation outside the braces into the value of a variable of the type number or currency, for example `{{sum(Positionen.netto)}} * 2`, and insert the variable (`{{@Name}}`); the text itself does no calculating, there `{{sum(Positionen.netto)}} * 2` prints the sum and, after it, “ * 2”. | Create the calculation per row as a variable of a rule and summarize over its result (see Rules: “Variables” tab). |
| `template setting '…' is circular: a condition in its branches reads a custom variable whose value itself depends on the number format of the template …` | Warning: A condition branch of the template settings reads a custom variable that itself depends on the number format, such as a sum. Calculated with the fixed settings of the template, one value applies; with the printed format, the other would; the first is printed. | In the condition, use the field or give the variable its own decimal places (see Numbers, currency and dates: Condition branches). |
| `template setting '…' is circular: its value reads the custom variable '@…', whose value itself depends on the number format of the template …` | Warning: The value of a template setting (currency symbol, decimal places, number style or thousands separator), fixed or in a condition branch, reads a custom variable that itself depends on the number format. Calculated with the fixed settings of the template, one value results; with the variable as it is printed, the other; the first is printed. The sentence names both. | In the value, use the field instead of the variable, or give the variable its own decimal places (see Numbers, currency and dates: Condition branches). |

#### Numbers, date and values

| Message | Meaning | What helps |
|---|---|---|
| `date calculation '…': … - nothing was printed` | A date calculation delivered no date: The starting date is empty or not a date, the number is not a number, the unit is unknown, or the result would lie outside the calendar. | Check the variable (see Variables: Calculating with dates); if only the field is empty, there is nothing to do. |
| `… is a list, not a single value`, `… is a linked record` | A placeholder points to a list or a whole record instead of a field; nothing is printed. If it points to an image, the message is under Images and fonts. | Use a table or a field of the linked record. |
| `color '…' in a text passage is not a known color code - the passage keeps the color of the text around it.` | A passage in the text carries a fixed color that is not a color code, such as “red” (usually from pasted or hand-written markup). It is printed in the color of its surroundings. | Recolor the passage in the window “Edit text” or enter a code such as #C0392B (see Border, background and colors: Invalid color). |
| `background-color '…' in a text passage is not a known color code - the passage gets no highlight of its own.` | A highlight in the text carries a color that is not a color code, such as “yellow” or “rgb(255,255,0)” (usually from pasted or hand-written markup). The spot is printed without a highlight of its own; a highlight around it stays. | Mark the spot again in the window “Edit text” with the box “Highlight” or enter a code such as #FFF59D (see The “Edit text” window: Highlight). |
| `color '…' is not a known color code - it was treated as no color: where it is used, no fill or no line is drawn (a line or arrow is left out), and a text in that color prints black. The other colors of the element stay. Use a code like #C0392B.` | When creating the document, if a color field of a shape has a fixed value that is not a color code. Where the color is needed, the fill or the line is dropped, for a line or an arrow the whole object, and a text in this color is printed black. The other colors of the object stay. | Enter a color code (see Border, background and colors: Invalid color and Shapes: Colors for shapes). |
| `template setting 'optionLabelLanguage': '…' is not a known language - option fields print their labels in the template language instead` | Warning: Under “Option label language” there is a value that is not a language, such as a typo from an imported file. The option fields print in the template language. | Choose the language again in the “Numbers & date” tab (see Numbers, currency and dates: Option label language). |
| `culture '…' is not a known language code` | The template language is unknown; German is printed. | Choose the template language again (see Numbers, currency and dates: Template language). |

#### Pages and space

| Message | Meaning | What helps |
|---|---|---|
| `… element reaches past the bottom paper edge (up to … mm beyond the … x … mm sheet) - that part is cut off in the PDF.` and `… reach(es) past the … paper edge … - that part is cut off in the PDF` | Something extends beyond the paper edge, for example a shape as the first object of a page or with “Fixed position”; that part is missing. What a fixed height (group, cell, “Max. height”) has already cut off does not count here; the message about the fixed height says that. | Move or shrink the object (see At the page edge: What happens at the page edge and Position, size, rotation and arrangement: Where the PDF really cuts off). |
| `… sits in the page margin` | Note: A text extends into the page margin, but is printed. | Nothing, if it is intended. |
| `text ‹…› needs … mm but its box is only … mm high` | A text with a fixed height needs more space than its box. The message can continue with `… the elements below it that flow were pushed down`: Whatever below it is set to “Flowing” was pushed down. If the text is set to “Fixed position”, for example in a group, it continues instead with `… what is below is overprinted`: The text overprints what lies below it. If the message says `… was NOT printed`, the fixed bottom edge of a group cuts off the rest. In a table cell it continues with `… the row height decides what happens to the part that does not fit`; if a fixed row, header row or cell height cuts off the rest, a message of its own says how much is missing (see Tables). | Increase the height or turn on “Automatic height”. If the message names the edge of a group, give the group more height or turn on “Automatic height (fit to content)” there; “Automatic height” on the text alone still lets the group cut off; that is then reported by `group '…' has a fixed height of … mm, so … mm of the text in it was not printed …`. |
| `text ‹…› is limited to … mm by its maximum height` | The “Max. height” of the text cuts off; the rest is missing. | Increase “Max. height” or shorten the text (see Texts: Min. height and max. height). |
| `group '…' has a fixed height of … mm, so … mm of the text in it was not printed …` | The fixed height of a group cuts off text; the number says how much is missing, the quote names the first cut-off line and so shows which group is meant; below half a millimeter, no message appears. Also applies to a group in a table or grid cell and to headers and footers; the fixed height of a cell itself is reported by a sentence of its own. If the fixed bottom edges of an inner and an outer group coincide, the message appears once: If the outer group itself cuts something off, it is named in the message, otherwise the inner one. | Turn on “Automatic height (fit to content)” on the group or make the group taller (see Position, size, rotation and arrangement: What the wall does to an object). |
| `group '…' has a fixed height of … mm, so a rectangle in it is cut off at that edge, up to … mm were not printed …`, likewise `… a line in it lies below that edge and was not printed …` and `… the box of a picture in it is cut off at that edge by up to … mm, so the picture is fitted into the shorter box …` | The fixed height of a group shortens or cuts off a shape, a line, an image or the frame of an inner group; the number says how much is missing. Instead of the rectangle, the message names what is affected, for example “an ellipse”, “a line”, a rotated image as “a picture” or the frame of an inner group as “the background or border of group '…'”, the gray placeholder of an empty code as “a code placeholder”. An unrotated image is refitted into the shorter box. A line whose stroke lies below the edge is missing entirely. Below half a millimeter no message appears; a line that is missing entirely is always reported. As with the message about the text, it also applies to a group in a table or grid cell and to headers and footers; the fixed height of a cell itself is reported by a sentence of its own. | Turn on “Automatic height (fit to content)” on the group, make the group taller or move the object up (see Position, size, rotation and arrangement: What the wall does to an object). |
| `group '…' has a fixed height of … mm - the element '…' starts below that edge and was NOT printed.` If the cutting edge is in a surrounding group or cell, the message is `the element '…' in group '…' starts below the bottom edge of the SURROUNDING area …` | An object begins below the fixed height of its group (or of the surrounding group or cell) and is missing in the PDF. | Turn on “Automatic height (fit to content)” on the group, move the object up or make the surrounding group or cell taller (see Position, size, rotation and arrangement: The fixed bottom edge and where the PDF cuts off). |
| `the rotated element '…' lies completely below the fixed bottom edge around it and was NOT printed. Move it up, or give its group more height.` | A rotated object lies completely below the fixed bottom edge of its group. | Move the object up or make the group taller. |
| `block '…' is marked 'keep together' but is taller than the tallest page area` | A kept-together object is taller than a page and was split. | Shrink the object or uncheck “Keep together at page break” (see At the page edge: The checkbox “Keep together at page break”). A grid does not have the check mark: There the only help is to make the grid shorter or split it into two grids. |
| `block '…' was split across pages, but … element(s) of it could not be placed on either side of a page break - … not printed (first: …)` | A split block contains something that could not be placed on either side of the cut, usually a vertical or slanted line that runs across the cut. It is missing in the PDF; the parenthesis names the first of them and where it lies in the block. | Check “Keep together at page break” if the block fits on a page, or let the line end above the cut (see At the page edge: Images, shapes and lines in a split block). |
| `the repeating area '…' … grows down into the bottom margin` | Note: With the real page numbers, the footer needs more space and grows into the bottom margin. | Make the field with the page number wider. |
| `the page exclusion '…' contains '…'` | Under “Exclude these pages” there is something that is not a page number, such as “-1”. | Count from the front or choose “All except the last page”. |

#### Tables

| Message | Meaning | What helps |
|---|---|---|
| `table '…': the row source '…' was not found - no rows were printed.` | The row source is missing: The table points to a rule that no longer exists and has no rows. | Choose the row source again, through “⚙ Data source & sorting” and “Change…” (see Data tables: Changing the row source). |
| `… is a SINGLE record, not a list …` | The table is on a rule with a single record and prints no row. | Under “Selection” choose “The first N (e.g. the top 5)” or uncheck “Keep only specific records” (see Rules: “Selection” tab: sorting and selecting). |
| `… is an EMPTY record …` | The table is on a rule with “Only the first”, “Only the last” or “The one at a specific position” that found nothing: The chosen position does not exist because the rule has fewer rows, or the filter lets no row through. Such a rule is then empty; no row is printed. | Check the selection and the filter of the rule. |
| `table '…' has no columns at all` | The table has no column. | Create a column. |
| `table '…': not enough usable height` | Header and footer leave no space for the table. | Shrink the header or footer. |
| `table '…': the row height is limited to … mm - … line(s) of a cell were not printed …` | A fixed row height cuts off text that sits directly in the cell; the number says how many lines are missing. | Increase the row height or let it adjust automatically (see Data tables: “General” tab: “Cells” section). |
| `table '…': a line needs … mm, but the row leaves only … mm after padding and border (row height limit … mm) - it is printed but reaches beyond the row …` | Already the first line of a text that sits directly in the cell needs more space than the fixed row leaves after padding and border, for example because of a large font. It is printed in full anyway and reaches into the row below; this comes as a warning. If the sentence ends with `… it still fits inside the row …`, it reaches only into the bottom padding and stays in the row; this comes only as a note. If the first line is empty because the text begins with a line break or consists only of spaces, this message does not appear. | Increase the row height, reduce the font or reduce the padding (see Data tables: “General” tab: “Cells” section). |
| `table '…', header cell '…': a line needs … mm, but the header row leaves only … mm after padding and border (header height limit … mm) - it is printed but reaches beyond the header row …` | Already the first line of a header text that sits directly in the column needs more space than the fixed header row leaves after padding and border, for example because of a large font. It is printed in full anyway and reaches into the first data row; this comes as a warning. The message appears once per header cell. If the line reaches only into the bottom padding, it stays in the header row, and no message appears. If the first line is empty because the header text begins with a line break or consists only of spaces, this message does not appear either. | Increase the header row height, reduce the font or reduce the padding (see Data tables: “General” tab: “Header row” section). |
| `table '…', column '…': the row height is fixed, so … mm of the cell content was not printed …` | A fixed row height cuts off the content of a designed cell: text, shapes, lines, images, rotated objects or the frame of an inner group. The number says how much is missing; the message appears from 0.05 mm on. A data table reports once per column for all rows and names the number of the first row in which something is missing; an extra row reports for itself (`extra row 1`), a free-form table per row and column (`row 2`). | Increase the row height or let it adjust automatically (see Position, size, rotation and arrangement: Where the PDF really cuts off). |
| `table '…': the header height is limited to … mm - … line(s) of the header were not printed …` | A fixed header row height cuts off header text that sits directly in the column; the number says how many lines are missing. | Increase the header row height or let it adjust automatically (see Data tables: “General” tab: “Header row” section). |
| `table '…', header cell '…': the header height is limited to … mm, but the cell content needs … mm - the rest was not printed …` | A fixed header row height cuts off the content of a designed header cell: text, shapes, lines, images, rotated objects or the frame of an inner group. The first number is the fixed height, the second the height the cell needs; what is missing is the difference. The message appears from 0.05 mm on, once per header cell. | Increase the header row height or let it adjust automatically (see Data tables: “General” tab: “Header row” section). |
| `… the cell content reaches … below the row`, `… past the column` | Cell content reaches into the next row or column and overprints it. | Make the row taller or the column wider. |
| `… the cell has a fixed height of … mm, so … mm of the cell content was not printed …`, likewise `… so a line in it lies below that edge and was not printed …` | The cell has a fixed height and cuts off what does not fit, also in a taller row. The number says how much is missing; a rectangle shortened at the edge or an image refitted counts. Below half a millimeter no message appears; a line that is missing entirely because its stroke lies below the edge or exactly on it is always reported. Applies to cells of free-form tables, in the cell designer and in the header designer. | Turn on “Automatic height (fit to content)” on the cell or make the cell taller (see Position, size, rotation and arrangement: Where the PDF really cuts off). |
| `table '…': a rectangle or background in the row is taller than the space left on the page - it was shortened, so its lower … mm were not printed …`, likewise `a line …` | A row is taller than a page, and a rectangle, the background of a group or a line in it fits on no page: It is shortened to the space; the number says how much is missing. Reported once per table (data table) or per row (free-form table); for a free-form table the row follows the name, for example `row 3`. | Make the object lower than a page or split it into several. |
| `… ends … mm past the right paper edge` | The table is wider than the page; the rest is missing. | Make the columns narrower. |
| `table '…': it reaches … mm into the right page margin - nothing is lost …` | Note: The table reaches into the right page margin without anything being lost. | Nothing, if it is intended. |
| `table '…': a surrounding box has a fixed height` | The table sits in a group with a fixed height; rows are missing. | Turn on “Automatic height” on the group (see Position, size, rotation and arrangement: What the wall does to an object). |

#### Images and fonts

The messages come in English, as a warning or as a note on the data. For data images, the sentences contain `image from Tabelle.Spalte` or `image from a data field`; for images of the library, the short name.

| Message (beginning) | Meaning | What helps |
|---|---|---|
| `image '…' was not found - the picture is missing in the document.` | An image with this short name does not exist in the library, or its entry carries no file. With two entries with the same short name, it is enough that the one changed last carries no file. The box keeps its space, the spot stays empty. | Check the short name (see Image library and fonts: The image library) or upload the image. If only the file is missing, replace the image as for the message “could not be read by the PDF printer” in this table. |
| `image '…' has the same name as another image record. The most recently changed one is used; …` | Two records of the library have the same short name. The one changed last applies. | Remove the duplicate image in Dynamics so that the document does not alternate between two runs. |
| `image '…' could not be loaded: …` | An image of the library could not be loaded; the reason follows. | Read the reason, check rights and connection. |
| `image '…' could not be read by the PDF printer (unsupported format?) …` | The file is not a PNG, JPEG or BMP (see Images: Formats) or is damaged. The spot stays empty. | Save as PNG or JPEG and replace the file. How to replace an image of the library is described under Fonts and images: Uploading your logo and images. For an image from the data, replace the file on the record. |
| `image from …: the file is not a printable image (only PNG, JPEG and BMP can be printed).` | A file column contains something that is not a printable image. | Save a file in one of the three formats. |
| `image from …: only a small preview (at most 144 x 144 px) is stored - it was printed instead of the original and may look blurry. …` | The image column does not store an original image. The preview image was printed; this comes as a note. | In Dynamics, turn on the setting “Can store full images” on the column and upload the image again, or choose “low quality” right away (see Fonts and images: Images from records). |
| `image from …: no full-size image stored - the column may not have 'Can store full images' enabled.` | Neither the original nor the preview image is there, or a file column is empty; this comes as a warning. | Check the setting on the column, upload the image again. |
| `image from … could not be loaded (…) - the small preview … was printed instead of the original and may look blurry.` | Fetching the original image is disrupted; the preview image steps in. | Read the reason; for many images choose “low quality”. |
| `image from … could not be loaded: …` | Fetching is disrupted, and there is no preview image. | Read the reason, check rights. |
| `time budget … s for loading images reached - …` | Loading the images took too long. The number is the time that remained for images, at most 30 seconds. Depending on the sentence, the preview image was printed instead of the original, or images without a preview image are missing. | Fewer or smaller images, low quality. |
| `one picture alone is … MB - the document may become hard to send.` and `the pictures in this document add up to more than 15 MB - …` | An image takes up 4 MB or more in the PDF, or all images together add up to 15 MB or more in the PDF. It is measured after downsizing to print resolution. | Use smaller images. |
| `image: no picture is stored for this record - …` | Only with “print nothing and report”: There is no image for this record. | No action needed. |
| `image shape '…' is not known - the image is drawn without a shape. Known shapes: …` | The shape has an unknown value. The image is printed without a shape. | Choose the shape again in the interface. |
| `image fit '…' is not known - 'einpassen' is used instead. Known values: …` | The fit has an unknown value. It is printed as with “fit”. | Choose the fit again in the interface. |
| `image position '…' is not known - 'mittig' is used instead. Known values: …` | The position has an unknown value. The image is centered. | Choose the position again in the interface. |
| `image position has no effect here - it only works with fit 'einpassen', … The image stays centred.` | A position has no effect with “fill” or “Original size”. | Set to “fit” or leave out the position. |
| `table '…', column '…': a picture from the data cannot be used in the header - a header row has no record. It was not printed.` | An image from the data is in the simple header text of a table. The print never fills this text with data, not even with a field of the main record. | Put a fixed image into the header text, or design the header cell in the header designer and insert the image there as an image object of its own; it then refers to the row above it, on the page to the main record. |
| `an image in a text is … mm wide, but its box or column has only … mm - it was scaled down to … x … mm, keeping its proportions.` | An image in the text is wider than its space and was scaled down. | Adjust the width in the window “Image in text”. |
| `field '…' holds a picture, not text - nothing was printed. …` | An image field is in a text as a placeholder. | Use an image object or an image in the text. |
| `font '…' could not be loaded - a substitute was used (Arimo)` | The font is not uploaded; Arimo is printed, line breaks can differ. | Upload the font (see Image library and fonts: The “Manage fonts” window). |
| `font '…' has no bold / italic face` | A style is missing; the text is in the regular style. | Upload the missing style (see Image library and fonts: The “Manage fonts” window). |

The messages on unknown values for shape, fit and position come once per value, not per image. Such values do not arise through the interface; they can only be in a hand-written template (see Template format).

#### Barcode, QR code and GiroCode

The messages come in English. The code is named with its kind, for example `barcode (EAN-13, content '{{productnumber}}')`; if the object carries an identifier (`id`, for example from a template written with AI), it follows, for example `barcode 'ean' (…)` or `GiroCode 'zahlung'`. Codes created in the designer mostly have none; the content in ‹ › is a value from the document, the template in ' ' a placeholder. A barcode or QR code that cannot be printed comes as a warning; reasons that only make a remark, as a note on the data; an invalid, visible GiroCode (EPC QR code per EPC069-12, known in Germany as GiroCode) as an error. What a code otherwise does is described under Barcode, QR code and GiroCode: Empty and invalid.

| Message | Meaning | What helps |
|---|---|---|
| `barcode (EAN-13, content '…') was not printed: … - the space stays empty.` | Warning. A barcode could not be formed with the data of a document or does not fit into its box. The spot stays empty and keeps its space. The reason is in the sentence; the common reasons are in the next table. `QR code` may stand instead of `barcode`; if the object carries an identifier, it follows, for example `barcode 'ean'`. | Read the reason, change the content or the box. |
| `… The same happened for … more value(s) of this code.` | Hangs after the warning if the same reason occurred for several values of the same code, for example for many table rows. The warning comes once per object and reason. | Check the data of the rows, for example the EAN of the articles. |
| `QR code error correction '…' is not known - 'M' was used instead. Known values: L, M, Q, H.` | Warning. The error correction has an unknown value. M is used for printing. | Choose the error correction again in the interface. |
| `barcode setting 'wennLeer' = '…' is not known - 'still' was used instead. Known values: still, notiz, platzhalter.` | Warning. The setting for an empty content has an unknown value. It is printed as with “print nothing”. | Choose the setting again in the interface. |
| `barcode position '…' is not known - the code is centered in its box instead. Known values: …` | Warning. The position in the box has an unknown value. The code is centered. | Choose the position again in the interface. |
| `barcode plain text size … pt has no effect here - … pt was used instead; possible are 5 to 14 pt.` | Warning. The font size of the plain text is outside 5 to 14 pt; the limit is used for printing. | Enter a size from 5 to 14 pt. |

After `was not printed:` comes the reason, one of these sentences:

| Reason (after “was not printed:”) | Meaning | What helps |
|---|---|---|
| `unknown barcode type '…'` | The kind of barcode is none of the five kinds. This can only be in a hand-written template. | Choose the kind again in the interface. |
| `Code 128 cannot show ‹…› - allowed are letters without umlauts, digits, space and the usual punctuation (ASCII)` | The content has a character that Code 128 cannot do, such as an umlaut. An invisible character appears as `U+…`, for example a zero-width character as `U+200B`. | Remove the character from the field. |
| `Code 128 cannot show ‹…› - is there a formatter like {{Currency:…}} in the content?` | The content has a character that Code 128 cannot do, and looks like the output of a formatter: It contains a €-sign, a non-breaking or narrow space (`U+00A0`, `U+202F`, `U+2009`, `U+2007`) or a number with thousands separator and decimal sign such as “1.486,91”. A currency formatter puts a non-breaking space before the €-sign; the message then usually names `U+00A0`. If the character is a letter such as “ü”, it does not come from the formatter: Then the question stands after the explanation of which characters Code 128 can do (`… - allowed are letters without umlauts, digits, space and the usual punctuation (ASCII) - is there a formatter like {{Currency:…}} in the content?`). | Leave out the formatter, for example `{{totalamount}}` instead of `{{Currency:totalamount}}`. |
| `Code 128 cannot show control characters (line break, tab)` | The content has a line break or a tab. | Remove the break from the field. |
| `Code 39 cannot show lower-case letters (‹…›) - use Code 128`, `Code 39 cannot show ‹…› - allowed are digits, capital letters A-Z, space and - . $ / + % …` | Code 39 accepts only digits, capital letters and a few characters. Lowercase letters are not silently capitalized. | Choose Code 128, or adjust the content. |
| `EAN-13 takes digits only - ‹…› is not one`, `ITF takes digits only - ‹…› is not one` | An EAN or ITF content has a character that is not a digit, also a space (which appears as `U+0020`). | Check the number in the record. |
| `EAN-13 needs 12 digits (the check digit is added) or 13 including the check digit - found …` | The EAN has the wrong length. For EAN-8 it is 7 and 8. | Check the number in the record. |
| `EAN-13 ‹…›: the last digit should be …, not … - probably a typo in the product data` | The check digit of the EAN is wrong. The message names the correct digit and the one present. | Correct the number in the product master. |
| `ITF needs an even number of digits (found …)` | ITF accepts only an even number of digits. No zero is prepended. | Check the number in the record. |
| `the content is too long for a QR code (… characters, at most … fit with error correction …) - shorten the content` | The content fits into no QR code. The message names the length and the maximum for the chosen error correction. | Shorten the content or choose a lower error correction. |
| `the content contains a broken character at position … (damaged data)` | The content contains a damaged character from broken data. | Check the field in Dynamics. |
| `the box has no size (width and height must be above 0 mm)` | The width or height of the box is 0. | Enter width and height. |
| `the box is too small for this code - it needs at least … mm (one printer dot of 1/600 inch per module), the box has … mm`, `the box is only … mm high, the plain text below the bars alone needs … mm` | The box is too small for bars or dots or too low for bars and plain text. The message names what the code needs at minimum. | Make the box larger, reduce the plain text or shorten the content. |
| `it would reach … mm below the fixed bottom edge of the group around it, and a cut code cannot be read safely - give the group more height` | The code extends beyond the fixed bottom edge of a group or cell. A code is never shortened. | Turn on “Automatic height (fit to content)” on the group or make the group taller. |
| `it would reach … mm past the bottom paper edge, and a cut code cannot be read safely - move it so that it lies completely on the sheet` | The code reaches more than 0.5 mm beyond the paper edge, for example as the first object of a page. `top`, `left` or `right` may stand instead of `bottom`. A code is never cut off. | Place the code so that it lies entirely on the page, or put it on the next page on the canvas. |
| `the content contains {{Page.Total}}, and the total number of pages is only known after the whole document is laid out - … {{Page.Total}} works in a code only in a group that repeats on every page (page header or footer)` | The content contains the total number of pages, and the code is in the main part of the document. There the number is not yet known when drawing. | Put the code into the header or footer or take the page number out of the content. |

The notes on the data print the code anyway:

| Note on the data | Meaning | What helps |
|---|---|---|
| `barcode (…): one module is only … mm wide - below … mm hand scanners often fail to read it reliably; make the box larger.` | Note. A bar is narrower than 0.25 mm (for EAN 0.264 mm). For a QR code it says `QR code …` and `phone cameras`, the limit is 0.4 mm. It is printed anyway. | Make the box larger. |
| `barcode (…): it is turned by …° - only right angles (0°, 90°, 180°, 270°) are safe to scan, many scanners do not read slanted bars; turn it by a right angle.` | Note. A barcode is slanted; the template contains an angle other than 0°, 90°, 180° and 270°, for example written by hand or by an AI. It is printed anyway. A QR code and a GiroCode do not get the note; they stay readable when slanted. | Set a right angle (selection “Rotation”). |
| `barcode (ITF, …): it holds fewer than 6 digits (…) - many scanners read ITF only from 6 digits on, to avoid partial reads; …` | Note. An ITF code carries only 2 or 4 digits; many scanners read ITF only from 6 digits on. It is printed anyway; with many table rows, the note comes once per object. | Check whether the scanner accepts the code, otherwise use Code 128. |
| `GiroCode is only … mm wide - the guideline for payment codes on invoices asks for at least 20 mm; make the box larger.` | Note. The GiroCode, measured with the white margin, is narrower than 20 mm. It is printed anyway. | Make the box larger. |
| `…: the content is empty for this record - the box counts as 0 mm high: …` | Note, only with “print nothing and report”: The content is empty for this record, the code takes up no space. | No action needed if it is intended. |
| `GiroCode: field '…': a line break or tab was replaced by a space (it would shift all following fields).` | Note. A field of the GiroCode contained a line break or tab. It was replaced by a space; the code is created. | Remove the break from the field. |
| `GiroCode: field '…' contains ‹…› - many banks do not take over such characters.` | Note. A field contains a character that many banks do not take over. An invisible character appears as `U+200B`. The code is created. | Remove the character from the field. |

A GiroCode does not make a warning but, if it is visible and invalid, an error. Then no document is created (see When no document is created):

| Error (no document) | Meaning | What helps |
|---|---|---|
| `GiroCode is not valid: … A visible GiroCode must be valid and printed in full, so the document was not created. Correct the data or the box - or, where nothing is to be paid (credit note, amount 0, another currency), hide the code with a visibility rule.` | Error. A visible GiroCode is invalid; the reasons of all invalid GiroCodes of the document are in one message, the reasons of one GiroCode separated by ;, several GiroCodes by \|. In Dynamics it is preceded by “Das Dokument konnte nicht erzeugt werden:”. For data protection reasons, values from the document, such as IBAN and amount, do not appear in the text but as ‹…›. | Correct the data or hide the GiroCode with a visibility rule (see Barcode, QR code and GiroCode: What is checked). |
| `GiroCode cannot be printed: …` | Error. The data is valid, but the code does not fit into its place: The box is too small, or the code extends beyond the fixed bottom edge of a group or beyond the paper edge. The reason follows as with the barcodes and QR codes. If the GiroCode begins only at or below the fixed bottom edge of a group, it reads `… cannot be printed: it starts below the fixed bottom edge of the group '…' around it and would be left out - give the group more height, or move the code up`. | Make the box larger, the group taller, or place the code so that it lies entirely on the page and entirely above the bottom edge of its group. |
| `field '…' is empty - it is mandatory and gives nothing for this record` | Recipient or IBAN result in nothing with this record. | Enter the field; for a variable, check whether it delivers a value. |
| `field '…' is … characters long, at most … are allowed` | A field is too long: recipient and note 70, reference 35, remittance text 140 characters. | Shorten the text. |
| `IBAN ‹…› is not an IBAN (two letters, two check digits, then letters and digits)`, `IBAN from ‹…›: this country is not part of SEPA - no SEPA credit transfer is possible`, `IBAN ‹…›: an IBAN from … has … characters, this one has …`, `IBAN ‹…›: the check digits are wrong` | The IBAN is malformed, belongs to a country outside SEPA, has the wrong length for its country or a wrong check digit. | Check the IBAN. |
| `BIC ‹…› is not a BIC (8 or 11 characters, e.g. COBADEFFXXX)`, `the BIC is missing - it is mandatory for an IBAN from …` | The BIC is malformed, or it is missing for an IBAN from AD, AL, CH, GB, GI, MC, MD, ME, MK, RS, SM or VA. | Enter the BIC. |
| `amount ‹…› is not a number - insert the field without a formatter (e.g. {{totalamount}} instead of {{Currency:totalamount}})` | The amount is not a number with a point, for example because a formatter formats the amount, also in a variable of the type text. A variable of the type number or currency delivers its value and is not affected. | Insert the field without a formatter (see Barcode, QR code and GiroCode: The amount). |
| `amount ‹…›: at least 0.01 euro must be transferred - for credit notes and documents without payment, hide the code with a visibility rule`, `amount ‹…› is too large: at most 999,999,999.99 euro` | The amount is 0, negative or too large. | For credit notes and documents without payment, hide the GiroCode. |
| `currency ‹…›: only euro can be transferred - for other currencies, hide the code with a visibility rule` | The field “Currency (check)” results in something other than EUR. | For other currencies, hide the GiroCode. |
| `purpose code ‹…›: four capital letters are expected (ISO 20022, e.g. GDDS)` | The purpose code does not have four capital letters. | Correct the purpose code or empty the field. |
| `reference ‹…› is not a valid RF creditor reference (RF, two check digits, up to 21 letters or digits)`, `reference ‹…›: the check digits of the RF creditor reference are wrong` | A reference that begins with RF is not a valid RF creditor reference or has wrong check digits. | Check the reference. |
| `reference and remittance text are both filled - only one of them is allowed` | Reference and remittance text are both filled. | Empty one of the two; the selection “Purpose of payment” switches. |
| `the content is … bytes long, at most 331 are allowed - shorten the remittance text (umlauts count twice)` | All fields together are longer than 331 bytes. | Shorten the remittance text. |
| `the field '…' contains {{Page.Total}}, and the total number of pages is only known after the whole document is laid out - …` | A field of the GiroCode contains the total number of pages, and the code is in the main part of the document. | Remove the page number from the field. |

#### E-invoice

If the e-invoice is not created, the document aborts with a sentence in the language of your Dynamics interface (see When no document is created; the English sentences are given here): a head, one entry or value per line, at the end a sentence on who must act. In the assignment window, the same sentences appear during the check, there in groups (see E-invoice: Checking with a sample record). If the message would become longer than 900 characters, the remaining lines appear before the closing sentence as “… and *n* more”. Where a name or a value is inserted, “…” stands.

**Head and closing.** The head names the kind of defect, the closing says who must act:

| Message | Meaning | What helps |
|---|---|---|
| “The e-invoice cannot be created – one entry is missing:”, “… *n* entries are missing:” | All defects are missing mandatory entries. | Read the lines below. |
| “The e-invoice cannot be created – the amounts do not add up:” | All defects are arithmetic checks of the standard that do not add up. | Check the assigned totals and taxes. |
| “The e-invoice cannot be created:” | The defects differ, for example an invalid code and a negative unit price. | Read the lines below. |
| “Please complete the entries on the record.” | The defect lies in the data of the document. | Fill the field on the record. |
| “Please have the template adjusted under »Template settings › E-invoice«.” | The defect lies in the template, for example a missing assignment. | Have the template adjusted (see E-invoice: Assigning entries). |
| “Please complete the entries on the record or have the template adjusted under »Template settings › E-invoice«.” | Both occur. | Check both. |
| “Please have the assignment checked.” | Only arithmetic checks are affected. | Have the assignment of the totals and taxes checked. |
| “Please report this to the vendor of Smart Templates.” | A fault in the program, not a defect of the data or the template. | Report the fault. |

**The lines.** The names are in everyday language, for an item with its number, for example “Unit, line 2”:

| Message | Meaning | What helps |
|---|---|---|
| “…: empty on the record” | A mandatory entry is assigned but empty in the record. If it applies only under a condition, “(required …)” follows. | Fill the field on the record. |
| “…: not set up in the template” | Nothing is assigned to the mandatory entry. In a list, the entry the line comes from counts: If the entry is missing, for example, in a fixed entry or in the part “If …” that applies to this document, this sentence appears, even if another entry has it. | Assign something in the assignment window, in a list in exactly this entry (“Next open mandatory entry ›” jumps there). |
| “…: the template provides no value for this case (if-then)” | The entry has an if-then, and for this document a branch without a value applies, or “ELSE” is empty. This is set up that way in the template, for example so that a reminder never goes out as an invoice. For a list within a list, such as a discount per item, this sentence appears only if it is so for all items; if the entry is empty in the record for one item, it says “empty on the record”. | Look at the if-then of the entry in the assignment window (see E-invoice: If-then on an entry). If no e-invoice is to be created for such documents, exclude them under “Only if …” at the switch. |
| “…: the summary »…« cannot be calculated — its brackets hold a calculation instead of a field, so the entry stays empty. …” | A mandatory entry is assigned to a summary in whose brackets a calculation is done, such as `{{sum(Positionen.preis * Positionen.menge)}}`. A summary works over only one field; the entry stays empty, and that is due to the template, not the record. | Create the calculation per item as a variable of the rule and summarize over its result (see Rules: “Variables” tab). |
| “…: the condition »…« cannot be evaluated as written: …” | A condition in the if-then of an entry is misspelled or names a custom variable that does not exist, for example “the variable »@…« does not exist in the template”. All branches are checked, also those that do not apply to this document. | Correct the condition in the assignment window. |
| “… cannot be evaluated as written: »{{ }}« does not belong in a condition: there the field is written without curly braces, e.g. »betrag > 100« instead of »{{betrag}} > 100« (as written the field is not read at all, and the condition is usually never met)” | In a condition of the e-invoice, a field is in double curly braces: in “Only if …”, on a list, on a fixed entry or in a branch of an if-then. Until now such a condition silently counted as “no” (with “is not” as “yes”). | Rebuild the condition in the assignment window (see Conditions: Fields in “{{ }}”). |
| “… cannot be evaluated as written: »isEmpty« does not exist in a condition: for »is empty« write »!field«, for »is filled« »field« (as written a field is read that does not exist, and the condition is usually never met)” | In a condition of the e-invoice, there is a word such as `isEmpty`, `notEmpty` or `isNotEmpty`: in “Only if …”, on a list, on a fixed entry or in a branch of an if-then. A condition does not know such words; until now it silently counted as “no” (with `!` in front as “yes”). | Rebuild the condition in the assignment window, for “is empty” with `!field` (see Conditions: Checking for empty in a condition written by hand). |
| “… cannot be evaluated as written: a single »=« is not a comparison, you probably mean »==« …”, likewise “… »<>« does not exist in a condition, you probably mean »!=« …”, “… »UND« does not exist in a condition: write »&&« for AND and »\|\|« for OR …”, “… the brackets do not match …”, “… a number with a decimal comma is not a number here …” and “… it is incomplete: …” | A condition of the e-invoice written by hand or by an AI has a typo: in “Only if …”, on a list, on a fixed entry or in a branch of an if-then. Until now the English sentence of the print stood here (“condition '…': a single '=' is not a comparison …”); in the print itself it stays so (see Variables and conditions). | Correct the condition in the assignment window or rebuild it in the builder. |
| “… cannot be evaluated as written: »[BT-3]« is an entry of the e-invoice — a condition only asks for fields of the sources and own variables (as written nothing is read there, and the condition is usually never met); use the field or variable the entry comes from” | In a condition of the e-invoice, there is the identifier of an e-invoice entry, such as `[BT-3] == '381'` or `BT-3 == '381'`, also in lowercase, a group such as `count([BG-3]) >= 1` or a list such as `L-BT-29`: in “Only if …”, on a part “If …” of a list, on a fixed entry or in a branch of an if-then. A condition, however, reads only fields of the sources and custom variables; at the identifier it reads an empty value. Until now such a condition therefore silently never applied, with “is not” (`!=`) silently always. The designer does not write such a thing; it comes from a file written by hand or by an AI. | Use the field or the variable it comes from instead of the entry, such as `@Rechnungsart == '381'` instead of `[BT-3] == '381'`. When opening a file or an AI answer, the designer rejects it: correct the condition in the file and import again. For a template that is already saved like this (the message then comes from the check, a button or a flow, and no document is created): rebuild the condition in the assignment window. |
| “eRechnung.listen.BG-21.eintraege[0].Wenn: unknown key; a fixed entry only knows »name«, »wenn« (the condition), »werte« and »listen« — did you mean »wenn«? …”, likewise “… a list only knows »itemsPath« …” and, on a case of a list, “eRechnung.listen.BG-3.faelle[0].Wenn: unknown key; a case only knows »name«, »wenn« (the condition of the case), »itemsPath« …” | In the template file, there is on a list, a case or a fixed entry a key that does not exist there, usually a mistyped “wenn”. Until now no condition then applied, and the entry appeared in every e-invoice. If, instead of “did you mean »wenn«”, the message says “the template contains »Wenn« in addition to »wenn«”, the mistyped one is next to a valid “wenn”: Its condition stays, only the additional key must be removed. The designer writes only the known keys; such a thing comes from a file written by hand or by an AI. | When opening a file or an AI answer (the designer then rejects it): correct the key in the file (upper and lower case count) and import again. For a template that is already saved like this (the message then comes from the check, a button or a flow): in the assignment window open the list (in the result of the check, “to the entry ›” leads there) and, in response to the red note, choose “Use as condition” or “Remove” (on a fixed entry under its row or in its window), then “Apply” and save the template (see E-invoice: “Only if …”). |
| “eRechnung.listen.BG-3.faelle: must be a list of cases ([ { … } ]).”, likewise “… faelle[0]: must be an object …” and “… faelle[0].faelle: a case cannot have cases of its own; »faelle« belongs to the list itself.” | In the template file, `faelle` is not a series of cases, or a case is not an object or itself carries `faelle`. This comes from a file written by hand or by an AI. The e-invoice is not created until it is corrected. | When opening a file or an AI answer (the designer then rejects it): correct the file and import again. For a template that is already saved like this: in the assignment window open the list (in the result of the check, “to the entry ›” leads there) and, in response to the red note, choose “Remove”, then save the template (see E-invoice: Different depending on the case). |
| “eRechnung.Wenn: unknown key; the section »eRechnung« only knows »aktiv«, »standard«, … and »zuPruefen« — did you mean »wenn«? …” | At the top of the e-invoice of the template there is a key that does not exist there, usually a mistyped “wenn” for “Only if …”. Until now no condition then applied, and every document got an e-invoice, also one that the condition was meant to exclude. If, instead of “did you mean »wenn«”, the message says “the template contains »Wenn« in addition to »wenn«”, the mistyped one is next to a valid “wenn”: Its condition stays, only the additional key must be removed. Without one of these suffixes it is another unknown key. | When opening a file or an AI answer (the designer then rejects it): correct the key in the file (upper and lower case count) and import again. For a template that is already saved like this: in the template settings, “E-invoice” tab, in response to the red note, choose “Use as condition” or “Remove” and save the template (see E-invoice: “Only if …”). |
| “eRechnung.wenn: must be a text — a condition is written in quotes, e.g. "statecode_code == 0"; here it is false without quotes. …”, likewise on a list (“eRechnung.listen.BG-23.wenn: …”) and on a fixed entry (“eRechnung.listen.BG-21.eintraege[0].wenn: …”) | At “wenn” there is no condition in quotes but a yes/no (`false`, `true`), a number, an object (“an object ({ … })”) or a list (“a list ([ … ])”). Such a thing comes from a file written by hand or by an AI; with `false`, “no condition” is often meant. Until now it silently counted as a condition that never applies: No e-invoice was created, without anyone saying so. | When opening a file or an AI answer (the designer then rejects it): put the condition in the file in quotes or, if it is always to apply, leave out “wenn” and import again. For a template that is already saved like this: in response to the red note “⚠ The condition in the template is not a text but …”, choose “Remove” (in the “E-invoice” tab under “Only if …”, on a list in the box “Where do the entries come from?”, on a fixed entry under its row or in its window) or set a new condition with “Change condition …”, then save the template (see E-invoice: “Only if …”). |
| “eRechnung.werte.BT-3.rules[0].when: must be a text — a condition is written in quotes, e.g. "statecode_code == 0"; here it is true without quotes. If the branch should always apply, write "when": "". …”, likewise in a list (“eRechnung.listen.BG-23.werte.BT-118.rules[0].when: …”) | In the branch of an if-then there is no condition in quotes but a yes/no (`false`, `true`), a number, an object or a list. Such a thing comes from a file written by hand or by an AI. Until now `true` silently counted as “always” and `false` as “never”, without anyone saying so. | When opening a file or an AI answer (the designer then rejects it): put the condition in the file in quotes or, if the branch is always to apply, write `"when": ""` and import again. For a template that is already saved like this: in the assignment window, in response to the red note under the branch, choose “Remove” or, in the window “If-then …”, set the condition again with “Rebuild with the condition builder” or remove the branch with “✕”, then save the template (see E-invoice: If-then on an entry). |
| “…: no entry — the source returned nothing for this record” | A list that needs at least one entry, such as the items, has none for this record. | Check the record and the rule of the list. |
| “…: not set up in the template” for a list | Neither a rule nor a fixed entry is assigned to the list. | Choose a source for the list (see E-invoice: Lists). |
| “…: too many entries (…)” | The list has more entries than the standard allows. | Reduce the entries. |
| “…: »…« is not a valid code (list EINHEIT) — please correct the value or add a mapping in the template.” | A country, a unit or another code is unknown. It is never guessed. | Correct the value or set it under “Countries and units” (see E-invoice: Countries and units). |
| “…: »X9« is not a valid code (list STEUERART) — it is fixed in the template; please correct the code in the template.” | The unknown code is fixed in the template, also as the value of a branch of an if-then. It cannot be fixed on the record; therefore the closing sentence names the template. If the same code comes from the data at a place, it reads as above. | Correct the code in the assignment window. |
| “…: …” with the reason of the standard | A value has a wrong format, for example a date that does not exist, or is too long. | Correct the value on the record. |
| “line 3: The unit price is negative (−50.00). In an e-invoice a price is never negative; a reduction is a negative quantity or an allowance.” | A unit price is negative. | Show the reduction as a negative quantity or as an allowance. |
| “… (BR-CO-14). Involved: Total tax 1,190.00; …” | An arithmetic check of the standard does not add up. Before the parenthesis is the sentence of the rule, in the parenthesis its identifier, then the entries involved with their values. | Compare the named entries, for example whether the tax per rate matches the total tax. |
| “The list BG-25 (Positionen) comes from the rule »…«, which selects only part of the rows (»first N«, N = 2). An e-invoice must not leave out rows — …” | The rule of a list leaves out rows. For the items, the same applies to a rule that selects exactly one row. | Take the selection out of the rule or create a copy without limit. |
| “While loading the data the limit of 20000 rows was reached, and the e-invoice reads from the truncated set (…). An e-invoice with missing rows is never created — …” | A query reached the limit; some of the rows were missing. | Narrow the amount of data in the rule with a filter. |
| “Internal error of the e-invoice: …” | A fault in the program. | Report the fault. |

**The PDF with embedded e-invoice.** With “PDF with embedded e-invoice”, the head “The PDF with embedded e-invoice (PDF/A-3) cannot be created:” appears, after it one line per defect (see E-invoice: The PDF with embedded e-invoice):

| Message | Meaning | What helps |
|---|---|---|
| “The character »✓ (U+2713)« in the text »Bezahlt ✓« (page 1) does not exist in the font »…«; a PDF with e-invoice (PDF/A) must not contain missing characters. Please remove or replace the character, or choose a font that contains it.” | A text contains a character that the font does not have. For several characters it says “The characters …”, a control character as “control character U+…”. The message names the beginning of the text and the page. | Remove or replace the character, or choose a font that has it. |
| “… is saved in CMYK for printing; ZUGFeRD requires RGB. Please save the image as RGB (e.g. as PNG) and upload it again.” | An image is saved in CMYK. | Save the image as RGB and upload it again. |
| “The font »…« must not be embedded in documents according to its license information (fsType 0x0002); a PDF/A must embed every font. Please choose another font in the template.” | The license of the font forbids embedding. | Choose another font in the template. |
| “… and *n* more places with characters the font does not contain.” | More than ten places with missing characters; the first ten are named. | Fix the named characters and check again. |

**On the button and in the action `st_GenerateEInvoice`.** The sentences appear in the window “Smart Templates — canceled” (see What happens on click: The e-invoice), in the language of your Dynamics interface; the English ones are given here:

| Message | Meaning | What helps |
|---|---|---|
| “The template does not create an e-invoice: »E-invoice« is not switched on in its template settings. No file was created.” | The button “Download e-invoice” or the action hits a template without the e-invoice switched on. This also happens if it is only switched on in the designer, but the template is not yet saved. | Turn on the e-invoice in the template settings and save the template. |
| “No e-invoice is created for this record: the condition »Only if …« of the template (»…«) is not met. No file was created.” | The condition of the template excludes this record. | No action needed if it is intended; otherwise check the condition (see E-invoice: “Only if …”). |
| “The e-invoice could not be created: …” | The call that builds the document failed. The sentence after it names the reason. | Read the sentence after it. |
| “The e-invoice would not have been created from the real data: … — no file was created.” and “The template does not match the record: … — no file was created.” | The action builds the e-invoice only from a real record of the table the template is meant for. | Use the right record and the right template; with a path, check the path. |
| “No e-invoice was created.” | The action delivered no file. The message below it names the reason. | Read the message below it. |
| “The e-invoice could not be read.” | The file arrived damaged. With several checked rows, it counts as a failure of that row. | Press the button again. |
| “The e-invoice is ready, but could not be saved: …” and “The e-invoices are ready, but could not be saved: …” | The file was created, but Dynamics or the browser refused to save it. | Press the button again; allow downloads for the Dynamics page. |
| “*n* of *m* e-invoices are in the ZIP file »…«.” with “Not successful: …” | With several checked rows, some failed; the others are in the ZIP file. | Check the named records individually. |
| “⚠ A flow was NOT started: »Download e-invoice« delivers only the file. …” | On the button there is a parameter “flow:…”. | Remove the parameter, or use the purpose “Create and display the document” with the flow. |

**In the designer.** When saving, in the assignment window, in the full preview and when uploading a standard:

| Message | Meaning | What helps |
|---|---|---|
| “Warning: For the e-invoice 1 assignment is still missing: … You can save anyway; documents with e-invoice are only created once everything is assigned.” | When saving: With the e-invoice turned on, something is not assigned to all mandatory entries. For more than eight, eight names and “and *n* more” appear. The template is saved anyway. | Assign the missing entries. |
| “The standard »…« does not exist in this environment – please upload it. Until then no e-invoice is created.” | The template names an own standard that does not exist here, for example after an export to another environment. | Upload the standard (see E-invoice: Own standards). |
| “Your document shows 3 decimal places; the e-invoice rounds amounts to 2. Totals can then differ by a cent, and the arithmetic check reports it.” | When saving, a note: The template prints amounts with a different number of decimal places than two. The e-invoice rounds its amounts to two; the template is saved anyway. | Nothing, if the totals are right. Otherwise round totals in the rule to two places (see E-invoice: Taxes and totals). |
| “With this record no document is created.” | In the assignment window: The check found errors. | Read the groups below it and choose “to the entry ›”. |
| “»Only if …« does not apply to this record. The document is created as before, without e-invoice.” | In the assignment window: The condition on the switch excludes this record. | No action needed if it is intended. |
| “Discard assignments not applied and close?” | Prompt when closing the assignment window with changes. | “Discard” or keep working. |
| “Not saved — 2 errors:” with locations | When uploading: The file has errors; nothing was saved. Each line names the location (file, row, column) and the finding. | Correct the file and upload it again. |
| “To upload a standard, you lack the right on the table »st_erechnungstandard« (create or write; included in the role »Smart Templates Designer«). Nothing was saved.” | The user lacks the right on the table of own standards. | Assign the role “Smart Templates Designer” (see Rights and roles: Designing templates). |
| “Warning: … e-invoice: the PDF was made WITHOUT e-invoice. The e-invoice cannot be created: …”, if only the PDF/A fails: “… WITHOUT e-invoice - the PDF/A could not be created: …” (in English, as a warning) | In the full preview and with the button “PDF”: The e-invoice has gaps; the PDF was created without it. The sentence after it names the reason. | Look with “Check with sample record” at what is missing. |

#### Call and flow

| Message | Meaning | What helps |
|---|---|---|
| “… → Client-Daten …” | The document was created without a real record, for example because the template has no data source. | Check the call and the primary source. |
| “Fremde-Tabelle — diese Vorlage ist für … gebaut …” | Template and record belong to different tables. | Choose the matching template on the button. If the button is deliberately on a different table than the template, it needs a path to the record of the template (see Buttons: the assistant: The path). |
| “Der Flow … wurde NICHT …”, “Der Flow … ließ sich nicht anstoßen: …” | The flow was not started; the reason is in the sentence. The document itself is not affected. | Fix the named reason (see What happens on click: When the button cancels; for a call from a flow, Actions and APIs: Starting a flow). |
| “Nothing was sent: The field »…« is empty …”, “Nothing was sent: »…« points to an entry in »…«, which is not a recipient …” | A button for “Send email immediately” with a stored recipient found none in the field. For this record, neither a document nor an email nor a flow was created. | Enter the recipient on the record and press the button again (see What happens on click: When the button cancels). |

#### Reasons when no document is created at all

Then the print aborts and names the reason, for example: The template is set to inactive, it has no content, the record was not found, or the user lacks the right to read the data (`NO ACCESS`; see Rights and roles: When a right is missing). A flow named in the call that cannot be used (not found, switched off, wrong table) also aborts the print before a document is created. Where you see the message is described under When no document is created and, for the button, under Where the feedback on a document arrives. The cancellations of the button and what helps against them are described under What happens on click: When the button cancels.

Common reasons in the designer:

- **The sample record is deleted**, and you chose “Continue without a sample record”. The reason says, in English, that the record was not found and no document was created. Choose a different record, or take the old one out with “Remove”.
- **A visible GiroCode is invalid:** In Dynamics the reason begins with “Das Dokument konnte nicht erzeugt werden:” and names, in English, the GiroCode and every defect, such as wrong check digits of the IBAN. Correct the data, or hide the GiroCode for this document (see Barcode, QR code and GiroCode).
- **Something is missing for the e-invoice:** The reason begins with “The e-invoice cannot be created” or “The PDF with embedded e-invoice (PDF/A-3) cannot be created”, is in the language of your Dynamics interface (German or English) and names the entries (see E-invoice). Complete the entries on the record, or have the template adjusted.
- **A read right is missing:** The reason begins with “NO ACCESS”. It does not name which table is affected. Contact your administrator (see Rights and roles: When a right is missing).

---

## Keyboard shortcuts

*For users · Help and reference · Page en/tastenkuerzel.html*

> **In short:** This page lists all keys and mouse gestures of the designer in one place. The keys for working with objects, such as Ctrl+Z, Ctrl+C, Del and the arrow keys, work in the main window and in the group designer, but not while the cursor is in an input field or a window is open over the canvas. Esc closes the topmost open window; what happens afterwards and which window cannot be closed this way is described under Esc in detail. The keys in the window “Edit text” are described on the page for that window (The “Edit text” window: Keyboard in the editor). The designer does not assign Ctrl+S and Ctrl+A.

### The keys at a glance

The shortcuts apply in the main window and in the group designer. On a Mac, Cmd also works for the Ctrl shortcuts, but not for the mouse wheel.

- The shortcuts for working with objects (Ctrl+Z through the arrow keys) do not work while the cursor is in an input field, a text box or editable text (for Del and the arrow keys also in a selection list), and not while a window is open over the canvas; the group designer does not count as a window here.
- Esc and the keys in windows (Enter, Space), by contrast, apply exactly there.
- Ctrl+mouse wheel zooms even when the cursor is in an input field; what it does over windows is described under The header bar: Zoom.

| Key | Effect |
|---|---|
| Ctrl+Z | Undo: takes back the last step. In the group designer it undoes and closes the designer. See Working on the canvas: Undo and redo. |
| Ctrl+Y or Ctrl+Shift+Z | Redo: applies a step that was taken back once more. |
| Ctrl+C | Copies the selected object or the multiple selection to the designer’s clipboard, not to the computer’s clipboard; the clipboard survives a reload and also applies in another browser window or tab with the designer. Without a selection, the browser copies selected text as usual. |
| Ctrl+V | Pastes what was copied and selects it. Where it goes is described under Working on the canvas: Copying, pasting and deleting. |
| Ctrl+D | Duplicate: copies and pastes immediately, following the rules of Ctrl+V. Works only with a selection and replaces the content of the clipboard. |
| Ctrl+X | Cut: copies the selection and deletes it without asking. |
| Del or Backspace | Deletes the selection without asking; with a selected table cell or column, it only empties the content. Ctrl+Z brings it back. |
| Arrow keys, with Shift: larger steps | Move the selection in small steps; without a selection they scroll as usual. Step size and limits are described under Arrow keys on the selected object. |
| Esc | Closes the topmost window. After that, Esc clears a multiple selection and, in the group designer, goes back one level. See Esc in detail. |
| Enter or Space on “Structure” or on an ⓘ | Expands or collapses the structure or opens the help for the entry (see Working on the canvas: The structure). |
| Enter or Esc in the field “Template” | Enter opens the first match, Esc closes the list (see Managing templates: Choosing the template). |
| Enter in naming and confirmation windows | In the naming window (“Duplicate”, “Rename”), Enter confirms the entry. In confirmation questions the focus is on the main button; Enter therefore triggers it, even “Delete” or “Discard”. |
| Enter or Space in the record list of the window “Choose sample record” | Selects the row that has the focus (see Data sources and relationships: The “Choose sample record” window). |
| In the window “Edit text” | It has keys of its own there, also for undo and redo; they are described under The “Edit text” window: Keyboard in the editor. |
| In the formula window | Ctrl+Enter applies the formula like “✓ Insert”; Esc closes the window without applying (see The “Edit text” window: Mathematical formulas). |
| Not assigned | The designer does not assign Ctrl+S, Ctrl+A and the function keys: Ctrl+S does not save, Ctrl+A does not select all objects. The designer leaves these keys, and Ctrl+D without a selection, to the browser. If the browser opens a dialog of its own, for example to save the page or for a bookmark, close it again. |

### Arrow keys on the selected object

The arrow keys ← ↑ → ↓ move the selected object by 0.5 mm, with the Shift key held down by 2 mm; with a multiple selection they move all selected objects. If nothing is selected, they keep their usual effect, for example scrolling. How far an object may go depends on where it is:

- In a group or cell, it simply may not go below 0.
- Directly in the document, the object stays horizontally within the printed area and vertically above 0.
- Headers and footers move the same way, and so does a selected table.
- A page break selected on its own and a selected table column do not move.

> **Good to know:** Unlike dragging and the field “Y (mm)”, the arrow keys do not check whether a header or footer is there, and they never change the sheet. An object can therefore slip under a header or past the end of the sheet. Check the position afterwards in the “Full preview”.

### Esc in detail

Esc closes the topmost open window; the exception is described below the list. The order:

1. Small windows that lie over everything: the formula window, the special characters, the ⓘ help, the color picker (Esc cancels, the color last dragged to does not apply) and the date format.
2. The larger text window that the button “⛶” next to some fields opens (for example with custom variables) handles Esc itself.
3. The field picker, the window “Dynamic text” and the editor for custom variables.
4. Renaming a field marker in the text editor (cancels).
5. A selection window over the text editor; after that the text editor itself, with the question “Discard the changed text?” if something has been changed.
6. A window over the window “Manage data sources”; after that this window itself, like “Close”, with a confirmation question if necessary.
7. The full preview.
8. The topmost selection or dialog window; Esc counts there as “Cancel”.
9. The “Visibility rule”, the window “Data source & sorting” and the “Template settings”, each like their close button.

After that, Esc clears a multiple selection (see Working on the canvas: Several objects at once), and in the group designer it goes back one level. Esc does not clear a single selection. The windows “Welcome to Smart Templates” and “Primary source required” and the shapes menu cannot be closed with Esc. If the full preview does not close with Esc, for example because the PDF viewer in it has just been clicked, close it with “Close”.

### Mouse gestures

| Gesture | Effect |
|---|---|
| Click on an object, click on empty space | A click selects the object; a click on empty space clears the selection (see Working on the canvas: Selecting). What Esc does with a selection is described under Esc in detail. |
| Ctrl+click (Cmd+click) on objects | Adds an object to the multiple selection or removes it (see Working on the canvas: Selecting several objects). For table cells, see Cells, header row and page break: Selecting, filling and emptying cells. |
| Dragging a selection rectangle | Dragging a rectangle from a free spot, that is, from the empty sheet or the gray margin, selects all objects it touches (see Working on the canvas: Selecting several objects). |
| Dragging an object | Moves the object; it snaps to margins, centers and neighbors, with “▦ Gridlines” also to the grid (see Working on the canvas: Moving, snapping, attaching and detaching). |
| Dragging the rotation handle | Rotates the object; with Shift in steps of 15°. Tooltip: “Drag to rotate · Shift = 15° steps”. More under Working on the canvas: Handles. |
| Double-click | Depending on the object, opens the text editor, the group designer or the column or cell designer (see Working on the canvas: The double-click). |
| Ctrl+mouse wheel | Zooms by 10 percentage points (see The header bar: Zoom). |

---

## Glossary

*For users · Help and reference · Page en/begriffe.html*

> **In short:** This page lists the words that come up again and again in the designer and in this manual, each with a short explanation and a link to the page where it is described in detail. The terms are arranged by topic; to search alphabetically through all headings and labels in the program, use the Index A–Z.

### Template and interface

| Term | Meaning | More |
|---|---|---|
| Template | Defines once what a document looks like and what data goes into it; Dynamics fills it in anew for each record. | The basic idea |
| Document | The finished document for a record, as a PDF, such as a specific quote. | Full preview and PDF |
| Designer | The program in which you design templates; it runs in the browser, and in Dynamics in the “Smart Templates” app. | The designer at a glance |
| Canvas | The middle of the designer with the sheets of the template; fields appear there as markers with their name. | The designer at a glance: Middle: the canvas · Working on the canvas |
| Header bar | The top bar with zoom, gridlines, undo and redo, full preview, PDF, the buttons for buttons and flows, and the language selection. | The header bar |
| Template row | The second bar; its buttons apply to the whole template: choose template, template settings, New, Import, Export, AI package, Upload AI changes, AI assistant, Duplicate, Rename, Building blocks, Delete and Save. | Managing templates: The template row |
| Ribbon | The third bar, with the buttons for inserting text, image, shapes, codes, groups, building blocks, tables and pages. | The ribbon |
| Properties | The area on the right; it shows the settings of whatever is selected. | The properties panel |
| Structure | The list of all objects in the template, on the left below the data tree, collapsed at first; a click selects the object. | Working on the canvas: The structure |
| ⓘ | The small “i” in a circle next to a setting; it explains the setting in detail. | The properties panel: Sections, collapsible areas and the ⓘ |
| Handles | The small squares on the border of a selected object; you drag them to change the size. | Working on the canvas: Handles |
| Double-click | The way into an object: into a group, into a table, into a text, or to the content of a code. | Working on the canvas: The double-click |
| Template settings | What applies to the whole template: page, font, numbers and date, e-invoice, data. | Template settings |
| Guides | Dashed outlines of groups, areas and table cells; they appear only in the designer, never in the PDF. | Working on the canvas: Grid, snap lines and guides |
| Multiple selection | Several objects selected at once, with Ctrl+click or a selection rectangle; they can be moved, aligned, distributed, colored, copied and deleted together. | Working on the canvas: Several objects at once |
| Color field, color picker | You set every color through the same color field; a click on the color box opens the window “Choose a color”; a color can be fixed, translucent or come from a color variable. | Border, background and colors: Color field and color picker |

### Designing

| Term | Meaning | More |
|---|---|---|
| Object | Everything that sits on the sheet: text, image, code, shape, group, table. | The properties panel |
| Layer order | A number from −50 to 50 in the section “Arrangement”: the higher it is, the further to the front an object lies when it overlaps others, on the canvas and in the PDF. | Position, size, rotation and arrangement: The layer order |
| Automatic height | The checkbox “Automatic height (fit to content)” for text and group, with which the height follows the content; without it, the fixed height under “Height (mm)” applies. | Position, size, rotation and arrangement: Automatic height and limits |
| Field marker, placeholder | The blue marker for a field on the canvas and in the window “Edit text”; in the PDF, the value from the record appears there. | The “Edit text” window: Markers in the text: select, rename, delete · Your first template: Inserting a field |
| Content depending on a condition | A whole text in several versions, such as “Payable by …” or “Already paid”; the first version whose condition is met is printed. | Texts: Content depending on a condition |
| Dynamic text | A single place in the text that reads differently depending on the data: a default and cases “Except when …”; on the canvas and in the window “Edit text” it appears as a green pill. | Texts: Dynamic text |
| Visibility rule | A condition under which an object is printed; otherwise it is left out. | Visibility |
| Code (barcode, QR code, GiroCode) | An object that draws a barcode, a QR code or a GiroCode; the content comes from a field, a variable or fixed text. | Barcode, QR code and GiroCode |
| GiroCode | A QR code for SEPA transfers in euros (EPC QR code according to EPC069-12, known in Germany as GiroCode); the customer’s banking app uses it to fill in the transfer. | Barcode, QR code and GiroCode: The GiroCode |
| Quiet zone, white margin | The free margin around a code that scanners need; it lies inside the box. | Barcode, QR code and GiroCode: The white margin |
| Image rule, “Except when” | A different image when a condition is met. | Images: A different image depending on a condition |
| Group | A container for objects that belong together, with a background and border if you like. | Groups |
| Group designer | The window that a double-click on a group opens; there you edit its content. | Groups: Editing the content · Groups: The window at a glance |
| Building block | An area that is the same in selected templates, such as a header or a footer, with its own data source or without data. You edit it once; every change takes effect immediately in all templates that use it. | Building blocks |
| Building block object | The reference to a building block in a template: it can be moved, and its size and content come from the building block. | Building blocks: The building block object in the template |
| Connection, prefix | Where the record of a building block in the template comes from (the main record or an N:1 lookup), and the name in front of its variables: “@Prefix.Name”. | Building blocks: Inserting a building block |
| Data table | A table with one row per record, for example per line item; its rows come from a rule. | Data tables: The new data table |
| Free-form table | A table whose rows and contents you enter yourself. | Free-form tables |
| Row source | The rule from which a data table gets its rows. | Data tables: The row source |
| Sample row | The one row with which a data table appears on the canvas, with the fields as markers instead of values; all rows are shown only by the full preview and the PDF. | Data tables: The new data table |
| Column designer | The window that a double-click on a data cell of a data table opens; what you design there applies to this column in every row. | Cells, header row and page break: Designing with the double-click |
| Header designer | The window for the heading of a column in a data table or a free-form table, opened with a double-click on its header cell. | Cells, header row and page break: Designing the header row |
| Extra row | A further row below the main row of a data table, for every record, for example for a long description. | Data tables: Extra rows |
| Cell designer | The window that a double-click on a cell of a free-form table or an extra row opens; it works like the group designer. | Cells, header row and page break: The window of the cell designer |
| Totals row | A single-row table below the line-item table, based on a second rule with the total; the table has no built-in totals row. | Data tables: A totals row below the table · Rules: Example: the sum below the items table |

### Data

| Term | Meaning | More |
|---|---|---|
| Primary source | The table in Dynamics whose records the template prints for, such as “Quote”; in the area “Data” it is marked with a star. | Data sources and relationships: The primary source |
| Sample record | A record of the primary source with which the full preview and the PDF work in the designer. | Data sources and relationships: The sample record |
| Additional source | A whole table that is loaded in addition, such as the currencies; it is always a list. | Data sources and relationships: Additional sources |
| Relationship | The connection to other records: N:1 is a lookup to exactly one record, 1:N a list. | Data sources and relationships: Relationships |
| Lookup field | A field that points to another record. In the data tree it appears as “… (Name)”, which prints the name of that record, and “… (ID)” with its internal identifier. | Data sources and relationships: Relationships |
| Data tree | The tree in the area “Data” on the left with everything you can bring into the template: data sources, fields, relationships, rules and variables; from it you drag fields into the template. | Data tree and field picker: The data tree |
| Rule | A named selection from a list: filter, group, calculate, select. | Rules |
| Filter | The conditions of a rule that determine which rows it keeps. | Rules: “Filter” tab: which rows come in |
| Calculated field | The result of a calculation in a rule, such as a total; it appears like a field below the rule. | Rules: “Calculate” tab: grouping and calculating |
| Grouping | Rows with the same attribute are combined into one row in a rule. | Rules: Grouping rows |
| Round first, then sum | Each value is rounded before adding up, so that the document adds up. | Rules: Round first, then sum |
| Custom variable | A value that you set yourself or have calculated, as “@Name”; it applies to the whole document. | Variables |
| Rule variable | A value that is calculated individually for each row of a rule. | Rules: “Variables” tab: values per row |
| System variable | A value that the system fills in: page number, total pages, date, time, user. | Variables: System variables |
| Condition branch | An exception with a condition: if the condition under “IF” is met, the value under “THEN” applies; if no branch is met, the value under “ELSE” applies, for a variable as for a template setting. | Variables: Condition branches · Numbers, currency and dates: Condition branches: different per customer |
| Condition | A small sentence made of field, comparison and value, such as “Discount greater than 0”; you combine several in the condition builder with AND or OR. | Conditions: The builder · Conditions: Where conditions occur |
| Field picker | The window behind the button “Choose field …”, in which a click chooses a field; depending on where it is, it shows as “Choose field” the whole data tree, or as “Choose a field of this row” only what belongs to the row currently being checked. | Data tree and field picker: The field picker |
| AND, OR | How several conditions work together: all of them must be met, or one is enough. | Conditions: AND, OR and subgroups |

### Pages and printing

| Term | Meaning | More |
|---|---|---|
| Sheet | A page on the canvas; the document often has more pages than sheets are designed. | Pages, header and footer: Sheets on the canvas and in the document |
| Page break | Forces a new sheet at one place. | Pages, header and footer: Page break |
| Header and footer | Groups with the checkbox “🔁 Repeat on every page”; they appear on every page or on selected pages. | Pages, header and footer: Header and footer |
| Positioning behavior | How an object reacts when something above it grows: “Flowing on contact”, “Flowing” or “Fixed position”. | Positioning behavior |
| Keep together | An object moves as a whole to the next sheet instead of being split. | At the page edge: The checkbox “Keep together at page break” |
| Page edge | The lower end of the printed area of a sheet, above a footer; what no longer fits there completely moves to the next sheet, is split or stays where it is, depending on its kind and positioning behavior. | At the page edge: What happens at the page edge |
| Move along | An object that lies on a larger one, such as a label on a colored box, moves along with it when the document is generated and keeps the distance as drawn. | Positioning behavior: Move along |
| Minimum lines | How many lines of a split text stay on each sheet at least. | At the page edge: Minimum lines when text is split · Template settings: Minimum lines when text is split |
| Page border | A border around every page, different on the first or last page if you like. | Pages, header and footer: Page border |
| Full preview | The real PDF with the sample record, shown in the designer. | Full preview and PDF: The full preview |
| Warning | The word stands for two different things: the warning from printing, in the designer a text with the prefix “Warning: ”, when the document looks different from what the template promises, and the yellow card type Warning of the designer. | Problems and messages: Two meanings of “warning” |
| Template language | Determines how date, numbers and yes/no are written in the document. | Numbers, currency and dates: Template language |
| Language | The word means five different things. You choose the language of the interface in the header bar. The template language determines how the document writes date, numbers and yes/no. The option label language determines in which language choice and yes/no fields from Dynamics print their label in the document; the default is the template language. The language of the user who generates the document determines the texts of choice and yes/no fields that a condition compares with. The fifth is the language in which the AI assistant answers. | The header bar: Language selection · Numbers, currency and dates: Template language · Numbers, currency and dates: Option label language · Conditions: Text, choice field and lookup · Working with the AI assistant in Copilot: Language |
| Keep warm | A trial document every 30 minutes, so that even the first document after a pause is quick. | Keep warm |

### E-invoice

| Term | Meaning | More |
|---|---|---|
| E-invoice | The document as an XML file in a standardized format that the recipient’s software reads in; with ZUGFeRD it is embedded in a PDF. | E-invoice: ZUGFeRD and XRechnung |
| ZUGFeRD | The standard in which the XML is embedded in a PDF (PDF/A-3). Smart Templates produces it in the EXTENDED profile. | E-invoice: The standard |
| XRechnung | The standard for invoices to German public authorities: a pure XML file, with the recipient’s Leitweg-ID. | E-invoice: The standard |
| Leitweg-ID | The identifier with which a public authority assigns the invoice to its recipient. It is usually in a field of its own on the customer and is assigned for the XRechnung. | E-invoice: Applying suggestions |
| Assignment (e-invoice) | What the template assigns to each entry of the e-invoice: a field, a variable, a fixed value or, for lists, a rule. | E-invoice: Assigning entries |
| Reading copy | The ordinary PDF that can additionally be produced with “e-invoice only (XML)”. | E-invoice: The output |
| EN 16931 | The European standard whose data model the e-invoice implements. | E-invoice: The standard EN 16931 |

### Dynamics and AI

| Term | Meaning | More |
|---|---|---|
| Button in Dynamics | A button on a record that generates a document, or prepares or sends an email. | Buttons: the assistant · Adding, changing and removing a button · What happens on click |
| Flow | A process in Power Automate that, for example, continues working after a document is generated. | Flows |
| Image library | The images stored in Dynamics, such as your logo; each image has a short name. | Image library and fonts: The image library · Fonts and images: Uploading your logo and images |
| Role “Smart Templates Designer” | The right to design templates. | Rights and roles |
| AI assistant | An agent in Microsoft 365 Copilot that changes templates according to your wishes. | Working with the AI assistant in Copilot |
| AI package | A file with the template and the data structure for any AI; you bring its answer into the open template with “Upload AI changes”. | Working with an external AI · AI package: structure of the file |
| Template format | How a template is built as a file (JSON); for developers and AIs. | Template format |

---

## How to get Smart Templates

*For administrators · Page en/so-bekommen.html*

> **In short:** In five steps to Smart Templates: request a trial on our website, download the solution and import it into Power Apps, open the designer and test free of charge for 30 days, buy on the page “License & updates” and finally verify the environment so that you can see your invoices there. An administrator of your Dynamics environment does all the steps.

### What you need

- Dynamics 365 or another environment with Dataverse in the cloud. An installation on your own servers is not possible.
- In this environment, the role “System Administrator”. With it you import the solution, test and buy.
- For the purchase: company and address for the invoice, an email address for invoices and a card or a bank account for SEPA direct debit.

> **Tip:** Install the solution in a test environment first. The trial period and, later, the license apply to all environments of your Microsoft organization anyway.

### Step 1: Requesting a trial

1. On our website, open the form “Request a trial”: smart-templates.eu/en/contact?anliegen=demo.
2. Enter name, company and email address; position and comments are optional. Check the box “The license terms apply to the trial.” and click “Request a trial”. If the Cloudflare spam protection still appears above it, wait until it has finished. [Image: The form “Request a trial” on the Smart Templates website: at the top the heading and the sentence “Try it for 30 days, in your own environment and with all features. …”, below it the selection field “Your request” with “Request a trial”, the fields “Name” with “Erika Beispiel”, “Company” with “Contoso GmbH”, “Position” with “IT-Leitung”, “Email address” with “erika.beispiel@contoso.com” and the empty field “Comments (optional)”. Below it the checked box “The license terms apply to the trial.” and the blue button “Request a trial”; required fields carry an asterisk.] Example with invented details.
   → The page confirms your request with a reference number and offers the solution for download right away. You receive the same number and the link by email. [Image: The confirmation on the website, outlined in green: “Thank you, we have received your request.”, “Your reference number: ST-261105-4KQX”, the sentence “You can download the “SmartTemplates” solution here.” with the blue button “Download solution”, below it “We are also sending you the link and a short guide by email, together with this number. …” and the button “To the home page”.]

> **Good to know:** If the confirmation says “We’ll get in touch with you personally and send you the solution for the trial.” instead of the button, you receive the solution from us by email. If our email does not arrive, please also check the spam folder.

### Step 2: Downloading and installing the solution

You get the solution “SmartTemplates” with the trial: through the button “Download solution” in the confirmation on the website or through the link in our email “Your Smart Templates trial”. Both lead to the same page.

#### Downloading the solution

1. In the confirmation, click “Download solution”, or click the link in the email. The page “Your Smart Templates trial” opens. [Image: The page “Your Smart Templates trial” with the Smart Templates logo: “Download the “SmartTemplates” solution for your 30-day trial here.”, below it, small, “File: SmartTemplates_1_0_787_0_managed.zip (10,8 MB), version 787”, the checksum (SHA-256) and “The link is valid until 19.11.2026, 10:00 Uhr (Berlin). You can download the file 5 more of 5 times.”, then the blue button “Download solution” and the sentence “Next steps: import the file in Power Apps under “Solutions” → “Import solution”. …”.] Version, date and checksum are an example; yours shows the current version.
2. Click “Download solution”. Your browser saves a ZIP file, for example “SmartTemplates_1_0_787_0_managed.zip”; the numbers give the version.

> **Caution:** Do not unzip the file. Power Apps needs the ZIP file exactly as it was downloaded.

> **Good to know:** The link is valid for 14 days and for at most five downloads. If it has expired, simply request the trial again.

#### Importing the solution into Power Apps

1. Open Power Apps at make.powerapps.com and sign in with your Microsoft account.
2. At the top right, click the name of the environment and choose the environment in which you want to install Smart Templates.
3. On the left, click “Solutions”. If the entry is not there, you find it under “More”.
4. At the top, click “Import solution”.
5. Click “Browse”, choose the downloaded ZIP file and click “Next”.
6. Power Apps shows the details of the solution, including its name and version. Click “Next”.
7. Power Apps asks for a connection to Microsoft Dataverse; Smart Templates needs it for its AI assistant. Choose an existing connection or create a new one. If Power Apps also shows the field “Smart Templates: Adresse des Lizenzdienstes”, do not change the entered value `https://lizenz.smart-templates.eu`: With any other address, Smart Templates cannot check its license.
8. Click “Import”. The import takes a few minutes.
   → When it is finished, Power Apps reports at the top that the solution was imported, and “SmartTemplates” appears in the list of solutions.
9. At the top, click “Publish all customizations”.

### Step 3: Opening the designer and testing

After the import, the app “Smart Templates” is ready in Dynamics. The trial period begins with the first opening of the designer: 30 days free of charge, with all features and for all environments of your Microsoft organization.

> **Caution:** The trial period begins with the first opening of the designer, even in a test environment, and each organization is entitled to it only once. Open the designer only when you really want to test. Opening the page “License & updates” does not start the trial period.

1. Open Dynamics 365 and, in the bar at the top, click the name of the app that is currently open. In the window “Apps”, type “Smart Templates” into the search box and click the tile of the app. [Image: The window “Apps” above the app: at the top the search box with “Smart Templates” as well as “Create new app”, “Refresh” and “Filter”, below it “Published apps (1)” and a single tile with the Smart Templates symbol on a dark blue background, the name “Smart Templates” and the line “Vorlagen-Designer und Verwaltung”.]
2. On the left in the navigation of the app, click “Designer”.
   → The designer opens, and the trial period begins.
3. In the navigation, click “License & updates”. If you open the page for the first time, it first asks in which language we should send you invoices and emails. Click “Deutsch” or “English”; without this choice, the window does not close. [Image: The window “Sprache wählen · Choose your language” with the sentence “In welcher Sprache sollen wir Ihnen Rechnungen und E-Mails schicken? Diese Seite erscheint dann ebenfalls in dieser Sprache. …” on the left in German and the same sentence on the right in English, below it the buttons “Deutsch” with the German and “English” with the American flag.]
4. Under “Your license” you see the state “Trial — … days left” and the day on which it ends. [Image: The page “License & updates” with the button “Check again” at the top right and the card “Your license”: “Status: Trial — 23 days left” in green, “Trial ends on 28.11.2026”, “Installed version 787” and “Organization (tenant ID)” with an identifier and the button “Copy”, plus the sentence “The trial covers all environments of your organization. After it ends, no more documents are created; your templates are kept.” and the checked toggle “Synchronize automatically with the license service — for license, updates and news (recommended)”.] Example with invented data.

After the 30 days, no more documents are created until you buy or subscribe. Your templates, images and settings are kept.

> **Good to know:** Anyone besides you who is to design templates and is not a System Administrator needs the security role “Smart Templates Designer”. You assign it in the Power Platform admin center (admin.powerplatform.microsoft.com): under “Environments” open your environment, in the card “Access” click “See all” at “Users”, select the user, choose “Manage security roles”, check “Smart Templates Designer” and save. Anyone who only prints documents does not need a role of their own.

### Step 4: Buying, using the example “Purchase + maintenance contract”

With “Purchase + maintenance contract”, Smart Templates is yours without time limit, and the maintenance contract also brings you new versions and support after the first year. A purchase without a maintenance contract and a subscription work in the same way, just with the other button. You can buy at any time, even in the middle of the trial period; the trial period then ends. Administrators (System Administrators and System Customizers) and users with the role “Smart Templates – Lizenzverwaltung” may buy.

1. In the app “Smart Templates”, open the page “License & updates”.
2. In the card “Continue with Smart Templates”, at the offer “Purchase + maintenance contract”, click “Buy with maintenance contract”. [Image: The card “Continue with Smart Templates” with three offers: on the left, outlined in blue and with the ribbon “Recommended”, “Purchase + maintenance contract” with 2.950 €, “one-off, plus VAT — maintenance from year 2 359 € per year” and the button “Buy with maintenance contract”; in the middle “Purchase” with 2.950 € and the button “Buy”; on the right “Subscription” with 990 € per year and the button “Subscribe”. Below it the button “Request a quote” and the sentence “Payment takes place on Stripe's payment page (opens in a new tab). …”.] The price that the page and the payment page show you is what counts.
3. The window “Billing details” opens. Enter company, street and house number, postal code and city and choose the country of your billing address. The VAT ID is required for companies in an EU state other than Germany, optional in Germany. Your PO number is optional; if you enter one, it appears on every invoice.
4. Enter your invoice email twice. We send invoices and all messages about your contract to it; ideally use a mailbox of the company, for example the accounting department’s. An administration email is optional; the code for verifying goes to it later, for example. Click “Continue to payment page”. [Image: The window “Billing details” with the sentence “These details appear on your invoice. Country and VAT ID determine the VAT. …” and the fields “Company” with “Contoso GmbH”, “Street and house number” with “Musterstraße 1”, “Address line 2 (optional)”, “Postal code” with “12345”, “City” with “Musterstadt”, “Country of the billing address” with “Deutschland” and “VAT ID (optional)”, below it, highlighted in blue, “VAT: 19% (Germany)” and the line “Invoices and emails in: German” with “Change”. Next come “Your PO number (optional)”, “Invoice email” and “Repeat invoice email” with “buchhaltung@contoso.com”, “Administration email (optional)” and “Repeat administration email” with “erika.beispiel@contoso.com”, each with an explanatory sentence, and at the bottom the buttons “Continue to payment page” and “Cancel”.] Example with invented details for a company in Germany.
5. The payment page of our payment service provider Stripe opens in a new tab. If your browser blocks the tab, click “Open payment page” on the page. Check the product, price, VAT and term.
   → Stripe calls the first year of the maintenance contract, which is included in the purchase price, a free trial period. This is not meant as a test: The maintenance contract is charged only from the second year.
6. Choose the payment method, card or SEPA direct debit, and enter your payment details. Your invoice email is already there.
7. Check the box “I am ordering as a business or public body (not as a consumer) and accept the license terms” and complete the order with the Stripe button.
   → Stripe redirects you to our website: “Thank you for your order.” You can close this tab. [Image: The page of the website after payment: “Payment” as the overline, the heading “Thank you for your order.” and the sentence “There is nothing else you need to do: your license key arrives automatically with the next print or when the designer is opened.”, below it, outlined in green, “What happens next” with three steps (close the tab and return to Dynamics 365; look at the new status under “License & updates”; the invoice arrives as an e-invoice by email at the invoice email), a box on direct debit and the button “To the home page”.]
8. Return to Dynamics. The page “License & updates” fetches your license key by itself as soon as you return to it; otherwise click “Check again”.
   → Under “Your license” it says “Purchased — perpetual”, next to it the card “Maintenance contract” with the day of the first charge. If you paid by direct debit, it says “Payment processing” there until your payment arrives. [Image: The page “License & updates” after the purchase with maintenance contract. On the left the card “Your license” with “Status: Purchased — perpetual” in green, “Installed version 787”, the tenant ID with “Copy” and the checked toggle “Synchronize automatically with the license service”. On the right the card “Maintenance contract” with the label “optional”, “Status: active”, “Runs until 05.11.2027”, the sentence “Unless you cancel, billing starts on 06.11.2027; you can cancel free of charge up to and including 05.11.2027.”, a sentence on the payment method at Stripe and on verification with several contracts, the buttons “Change payment method ↗” and “Cancel maintenance contract …” and the sentence “To do so, verify this environment once — the button takes you there. You can always cancel by email to us as well.”] Example with invented data.

The invoice arrives as an e-invoice by email at your invoice email. The other environments of your organization fetch the license key when the designer is opened or, at the latest, at the next print that would otherwise be blocked.

> **Caution:** **Direct debit is not an instant payment.** If you pay by SEPA direct debit, your bank usually confirms the payment within 8 business days. Until then, “License & updates” shows the state “Payment processing” under “Your license”. A provisional license key applies, for at most 28 days, and Smart Templates keeps printing. The card “Maintenance contract”, your invoices and the verification from step 5 appear only once your payment has arrived. With a card, the payment is confirmed immediately.

> **Good to know:** If “License & updates” still shows the old state a quarter of an hour after payment, write to us through the contact form and give your invoice email and the tenant ID shown on the page. Do not buy a second time in this case.

### Step 5: Verifying the environment and viewing invoices

Seeing your invoices, canceling and changing the billing details works on “License & updates” only once you have verified the environment once. This way only authorized people see your invoices. System Administrators and users with the role “Smart Templates – Lizenzverwaltung” may verify. If you paid by direct debit, the button for this appears only once your payment has arrived; until then, the card “Invoices and billing details” contains only a sentence on it.

1. On the page “License & updates”, in the card “Invoices and billing details”, click “Verify this environment …” and in the window click “Send code”. [Image: The card “Invoices and billing details” with the sentence “Here you see your invoices and the details printed on them. Here you can also cancel and change these details. To do so, verify this environment once: we send a code to your administration email — or, if you have not entered one, to your invoice email.”, below it in gray “The code goes to whoever reads that mailbox — often IT or accounting.” and the blue button “Verify this environment …”.]
2. We send a code with eight digits to your administration email; if you did not enter one, to your invoice email. Tell the person who reads this mailbox beforehand.
3. Type the code into the window and click “Verify”. The code is valid for 60 minutes. [Image: The window “Verify this environment” with the sentence “We have sent a code to your administration email. It is valid for 60 minutes. …”, the field “Code from the email (8 digits)” with “12345678”, the note “No email? Please also check the spam folder. …” and the buttons “Verify” and “Request a new code”.]
4. Now the card “Invoices” appears on the page. With “Download PDF” you save an invoice; it is the same e-invoice as in our email. [Image: The card “Invoices” with the sentence “This lists all invoices, credit notes and cancellation invoices we have sent you by email. Each one is an e-invoice: …” and a table with the columns “Date”, “Number”, “Type”, “Amount” and “Status”; the only row shows “05.11.2026”, “R-2026-001”, “Invoice”, “3.510,50 €”, “sent” and the button “Download PDF”.] Example with invented data.

> **Caution:** Anyone who has the code can view invoices, cancel and change details for your company. Pass it on only to colleagues who have just clicked “Send code” themselves. We never ask for this code.

You verify each environment individually. A verification ends after twelve months without use; then you simply verify the environment again.

With that, Smart Templates is bought and set up. Your templates from the trial period keep working unchanged.

---

## Setup at a glance

*For administrators · Page en/einrichtung.html*

> **In short:** Smart Templates comes as a solution for Dynamics 365. After the import, you assign a role to everyone who designs templates and upload your logo. You set up buttons in Dynamics, flows and Copilot when you need them. The PDFs are created in your own environment, without an external server.

> **Tip:** New to Smart Templates? From requesting the trial through installation and the trial period to the purchase, everything is on one page, step by step: How to get Smart Templates.

### Requirements

- Dynamics 365 or another environment with Dataverse in the cloud. An installation on your own servers is not supported.
- For the installation, the role “System Administrator” in the environment (see Rights and roles: Installing the solution).
- For flows: Whoever creates a flow needs a license and a role; which ones is explained under Rights and roles: Creating a flow.

### The steps

1. Installing the solution: import the solution “SmartTemplates” into your environment.
2. Assigning rights: assign the role “Smart Templates Designer” to everyone who designs templates; the steps are shown under Assigning a security role. Anyone who only prints documents does not need a role of their own.
3. Providing your logo and fonts: upload your logo and, if needed, more fonts. The steps in the designer are described under Image library and fonts.
4. Open the designer once: in the app “Smart Templates”, click “Designer” on the left. This sets up keep-warm. The first time you open it also starts the 30-day trial period for your whole organization.
5. Preparing buttons and flows, if documents are to be created by a button in Dynamics or through Power Automate. You then add the button following the instructions in Adding, changing and removing a button, and you create the flow under Flows.
6. Turning on Copilot, if users are to change templates in conversation with the AI assistant.
7. Turning on the e-invoice, if documents are to be created as ZUGFeRD or XRechnung. Nothing needs to be set up in the environment for this; it is turned on and assigned per template in the designer.

### What sets itself up

- **Keep-warm:** So that the first document after a break comes quickly, Smart Templates creates its own system jobs and keeps the templates ready.
- **Language:** The designer is available in German and English: if the user is set to German in Dynamics, it appears in German, for any other language in English, and everyone can choose the language themselves at the top right (see The header bar: Language selection).
- **Flows:** When someone creates the first flow in the designer, a solution of its own is created for it (see Preparing buttons and flows: What happens in the background).
- **E-invoice:** The standards ZUGFeRD 2.5.2 and XRechnung 3.0 are built into Smart Templates. The table for own standards comes with the solution and stays empty until someone uploads one of their own (see Installing the solution: What the solution brings with it).

> **Good to know:** The documents are created entirely in the environment where Smart Templates is installed, and they are not stored anywhere; only the email actions attach them to the email. Smart Templates contacts the outside only to reach our license service, for the license, updates and news, without documents, templates or business data. If the license service is ever unreachable, documents are still created as long as a valid license key is stored. With a purchase, with or without a maintenance contract, the key is valid without time limit: once it is stored in an environment, creating documents there no longer depends on our server; our server is then asked only for updates, news, the maintenance contract and new environments. If your environments are not allowed to open a connection to the outside, turn off the automatic synchronization on the page “License & updates”; we then send you the license key by email — for that, give us the identifier of your organization (tenant ID), which the page shows under “Your license” — and you paste it there under “Paste key by hand”. Only the AI assistant, if you set it up, runs in Microsoft 365 Copilot.

> **Tip:** Install Smart Templates in a test environment first. There you can try out templates and buttons before you get started in the production environment.

---

## Installing the solution

*For administrators · Page en/einrichtung-loesung.html*

> **In short:** Smart Templates comes as a managed solution, “SmartTemplates”. You import it into Power Apps like any other solution; afterward the app “Smart Templates” with the designer is ready.

### Importing the solution

1. Open Power Apps (make.powerapps.com) and choose your environment at the top right.
2. On the left, click “Solutions”, and at the top click “Import solution”.
3. Select the file of the solution “SmartTemplates” and follow the steps up to “Import”. Along the way, Power Apps asks for a connection to Microsoft Dataverse for the AI assistant; choose an existing one or create one (see Turning on Copilot). From version 788 on, Power Apps no longer asks for the address of the license service; Smart Templates knows it itself. If, with an older version, the assistant shows the field “Smart Templates: Adresse des Lizenzdienstes”, leave the suggested value `https://lizenz.smart-templates.eu` unchanged.
4. Wait until the import is finished, and then click “Publish all customizations”.

### What the solution brings with it

| Part | Purpose |
|---|---|
| App “Smart Templates” | With the entries “Designer”, “Bild-Assets”, “Schriftarten”, “Smart Templates” (the list of templates) and “License & updates” (license, purchase and updates, see The “License & updates” page). The Copilot side pane from Microsoft is also turned on in the app; it has requirements of its own, and the AI assistant of Smart Templates does not need it (see Turning on Copilot). |
| Tables | For templates, images, fonts, the language choice per user, keep-warm, the handover to flows, the changes of the AI assistant and the own standards of the e-invoice (table “Smart Templates E-Rechnungsstandard”; it stays empty until someone uploads an own standard). |
| Actions | “Beleg erzeugen”, “E-Mail-Entwurf” and “E-Mail senden” for buttons and flows, plus an action for checking keep-warm and two for the AI assistant. For the e-invoice, three more are added: `st_GenerateEInvoice` returns the e-invoice of a record as an XML file, `st_StandardLesen` and `st_StandardHochladen` read and store the standards. “Beleg erzeugen” has two more outputs for this, `XmlBase64` and `XmlFileName`. Developers will find all of them under Actions and APIs. |
| AI assistant | The agent “Smart Templates Assistant” for Microsoft 365 Copilot, including the connection reference (see Turning on Copilot). |
| Role “Smart Templates Designer” | For everyone who designs templates. It may also upload and delete own standards of the e-invoice (see Rights and roles: Designing templates). |
| Font “Arimo” | In four styles, with license notices. |

The e-invoice needs nothing more in the environment. The standards ZUGFeRD 2.5.2 and XRechnung 3.0 are built into Smart Templates itself and cannot be changed. Whether and how a template creates an e-invoice is set per template in the designer (see E-invoice: ZUGFeRD and XRechnung). Anyone who only prints documents does not need a right on the table of own standards for this either (see Rights and roles: Printing documents).

Not part of the solution are your logos and further fonts, buttons in Dynamics and flows. You create those yourself, as described in the following chapters.

### Opening the designer

After the import, the app “Smart Templates” is ready. How users open it, what is visible after opening it and what the navigation of the app contains is described under Opening Smart Templates.

### After an update

Whether there is a new version and whether it belongs to your license is shown by the page “License & updates”. Check that before you install it, and install every new version in a test environment first (see Updates and new versions).

You import a new version in the same way as the first one. Power Apps recognizes the existing solution and updates it; your templates, images and fonts are kept, as are the own standards of the e-invoice. New versions of the standards that come with the product arrive with the solution (see E-invoice: The standard).

Once you have installed a new version, users reload the designer once with `Ctrl` + `Shift` + `R`. Otherwise the browser may still show parts of the old version. Which version is running is shown by the tooltip on the heading “Smart Templates – Designer”.

---

## Rights and roles

*For administrators · Page en/einrichtung-rechte.html*

> **In short:** Anyone who designs templates needs the role “Smart Templates Designer” in addition to their usual role. Anyone who only prints documents does not need a role of their own, but read rights to the data that appears in the document. Anyone who adds a button or creates a flow needs rights of their own in Dynamics for that, and a license for the flow.

### Installing the solution

For the installation you need the role “System Administrator” in the environment. How the solution is imported is described under Installing the solution.

### Designing templates

Assign the security role “Smart Templates Designer” to everyone who works in the designer and does not have the role “System Administrator”; how to do that is described step by step under Assigning a security role. The role allows you

- to read and edit the templates, images and fonts of Smart Templates,
- to read tables, fields, relationships and option values of Dynamics, so that the designer offers them in the area “Data”,
- to save your own language choice,
- to create and read the changes of the AI assistant; anyone who uses the assistant therefore needs this role,
- to read the rows with which Smart Templates starts flows,
- to upload, replace and delete own standards of the e-invoice (table “Smart Templates E-Rechnungsstandard”, technically `st_erechnungstandard`; see E-invoice: Own standards).

The role belongs to the solution and cannot be changed. If you need a modified version, copy the role and adjust the copy. A copy does not receive extensions of the role in an update; you then add new rights yourself.

The data itself, such as quotes and companies, is seen by the designer with the rights from the user’s usual role. Anyone who wants to choose a sample record needs read access to its table.

#### Adding a button

You add the button itself in the command designer of Power Apps. For that you need the right to edit the app in which the button is to appear. The steps are described under Adding, changing and removing a button.

#### Creating a flow

The flow belongs to the account with which you create it (its owner). This account needs three things:

- A license that allows Dataverse in flows: a license for Dynamics 365 or for Power Automate Premium. Microsoft 365 alone is not enough, not even with the role “System Administrator”. If the license is missing, turning on the flow fails; the message is described under Flows: The “Create a new flow” view.
- In Dynamics, the role “System Customizer” or “System Administrator”: Creating the flow also creates a solution of its own, a connection reference and the flow.
- Read access for the whole organization to the table “Smart Templates Auslöser”. The role “Smart Templates Designer” includes it; details are under Printing documents.

### Printing documents

For buttons in Dynamics and for flows, nobody needs a Smart Templates role. What is needed is read access to the main table of the template and to every table from which the template fetches data. If one of them is missing, no document is created; what the message says is described under When a right is missing.

- Smart Templates reads the template itself, fonts and the images of the image library by itself when printing. The user needs no rights for that. Images from records, on the other hand, it reads with the user’s rights; without them the spot stays empty, or only the small preview image appears.
- Rights on individual records do not abort the print: If the user may not see some rows of a list, such as line items of another business unit, they are missing from the document without a message. For a lookup, such as the customer, a warning appears. The print is aborted only if the main record itself is not readable.
- The email actions create the email with the user’s rights.
- Smart Templates reads the own standards of the e-invoice by itself when printing, like the template. The user needs no right on the table of standards for that.
- A flow works with the rights of the account it belongs to. This account needs read access for the whole organization to the table “Smart Templates Auslöser”, through which Smart Templates starts the flow; without this right, the flow receives no jobs. The role “Smart Templates Designer” includes it.

> **Good to know:** A button opens the document in a new browser tab. If the browser does not allow pop-ups for Dynamics, it does not appear. How to allow pop-ups and what the button reports when they are blocked is described under What happens on click: When the browser blocks pop-ups.

### When a right is missing

| What is missing | What the designer reports |
|---|---|
| Read access to the templates | “The templates could not be loaded …” |
| Read access to the templates for only a part, for example only for your own (level “User” instead of “Organization”) | No message. If the user sees not a single template, the window “Welcome to Smart Templates” appears even though templates exist (see Managing templates: If there is no template yet); otherwise the rest are missing from the template list. |
| Read access to tables and fields | In the area “Data”: “Fields not loaded – click to try again.” |
| Read access to the fonts | The font selection shows only Arimo; “The font list could not be loaded” appears only under “⚙ Manage fonts” |
| Read access to the image library | No message. On the canvas, image objects from the library appear only as a blue placeholder with the short name, and images from the library in text do not appear at all. Instead of your images, the image library shows only the two tiles `logo_full` and `stamp_paid` without an image, and these two short names count as taken when uploading. In full preview and PDF, the images of the library still appear. |
| Right to the language choice | “The language could not be saved” |
| Read access to business data | When choosing a sample record, the list shows in red “The records could not be loaded with this view. …”. If one is already stored, the designer reports once, when loading the sample data, “⚠ The sample record »…« could not be read — you do not have the read permission for it. …” (more under Data sources and relationships: When the sample record is missing or cannot be read). How the document is aborted without this right is described in the next row. |
| Read access to the main table of the template or to a table from which it fetches data | When printing, no document is created: not in full preview and PDF, not with a button, not with a flow. The reason is in English and begins with “NO ACCESS: …”. In the designer it is preceded by “PDF generation failed –” or “PDF failed –” (see Problems and messages: When no document is created), for the email purposes of a button by “The document could not be built:”. It says that a read right is missing, but does not name the table. Which read rights are needed is described under Printing documents; how the button shows the message is described under What happens on click: When the button cancels. |
| Right to the table of own standards of the e-invoice (uploading, deleting) | In the window “Upload own standard” it says in red: “To upload a standard, you lack the right on the table »st_erechnungstandard« (…). Nothing was saved.” Deleting reports “Deleting failed”. |
| Right to the AI changes | In the chat, the action “Vorlage ändern” reports an error |

---

## Assigning a security role

*For administrators · Page en/einrichtung-rolle-vergeben.html*

> **In short:** Anyone who works in the designer needs the security role “Smart Templates Designer”. An administrator assigns it in the Power Platform admin center: open the environment, select the user, check the role, save. The images show an example environment and an example user; yours have different names.

### Who may assign the role

Roles are assigned by anyone who has the role “System Administrator” in the environment. What the role “Smart Templates Designer” allows is described under Rights and roles: Designing templates.

### Step by step

1. Open the Power Platform admin center at admin.powerplatform.microsoft.com. On the left, choose “Manage” and below it “Environments” (image marker 1), and click the name of your environment in the list (image marker 2). [Image: The Power Platform admin center. At the top the dark bar with the company name “Contoso”, the title “Power Platform admin center”, the search box and the name of the signed-in user; on the left the column “Manage” with the highlighted entry “Environments”, below it “Environment groups”, “Inventory”, “Usage” and “Tenant settings”. On the right the list “Environments” with five rows and the columns “Name”, “Type”, “State”, “Dataverse”, “Managed” and “Region”: “Entwicklung Vorlagen” (Developer), “Test” (Sandbox), two production environments (among them “Contoso Produktion”) and “Contoso (default)” (Default).]
2. In the card “Access”, under “Users”, click “See all”. [Image: The page of an environment with the line “Environments › name of the environment”. On the left the card “Details” with the environment URL “contoso-dev.crm4.dynamics.com”, region “Europe”, type “Production”, organization ID, environment ID and “Created by” with the name of the user. On the right the cards “Disaster recovery” and “Access”; “Access” lists “Security roles”, “Teams”, “Users”, “S2S apps”, “Agents (preview)” and “Business units”, each with the link “See all”.]
3. Type the name of the user into the search box at the top right (image marker 1). Click next to the name in the user’s row so that the row is selected (image marker 2), and then click “Manage security roles” at the top (image marker 3). [Image: The user list of the environment with the line “Environments › name of the environment › Settings › Users”. At the top left the buttons “Run diagnostics” and “Manage security roles”, at the top right “Filter” and the search box with the name of the user. Below it the list with the columns “Name”, “Username” and “Main phone” and a single selected row with the name of the user, a green check mark, the username and the phone number.]
4. In the panel “Manage security roles”, check the role “Smart Templates Designer” (image marker 1); the list is long and sorted alphabetically. The roles the user already has are checked and stay checked. Click “Save” (image marker 2).
   → The role is assigned. If the user has Smart Templates open right now, the role takes effect there only after the page is reloaded. [Image: The side panel “Manage security roles” with the name of the user and the required field “Business unit” with the value “Contoso GmbH”. Below it an excerpt of the alphabetical list of roles, from “Shared Sms Channels Role” to “Stellvertretung”; “Smart Templates Designer” is checked with a green check mark. At the bottom the buttons “Save” (green) and “Cancel”. Dashed lines mark the places where parts of the list are left out.] At the dashed lines, part of the list is left out of the image.

---

## Fonts and images

*For administrators · Page en/einrichtung-schriften-bilder.html*

> **In short:** The font “Arimo” is included. You upload your logo and further fonts once, and afterward they are available in all templates. If you upload your logo with the short name `logo_full`, it appears at the top of the header in every new template. How uploading works is described on the page Image library and fonts; this page describes what only administrators do: the logo, deleting and replacing images in Dynamics and the setting for sharp images from records.

### Uploading your logo and images

Uploading is done in the designer, in the image selection under “Fixed image” and “Upload new image”. The individual steps, all fields and check messages of the form and the permitted formats are described under Image library and fonts: Uploading a new image. The designer suggests the name and short name; you can change the short name.

> **Tip:** New templates carry the image with the short name `logo_full` at the top of the header. If you upload your company logo under exactly this short name, it appears there without any further steps. If the short name already exists, the designer rejects the upload. The file of an existing image cannot be replaced in the app “Smart Templates” under “Bild-Assets”: delete the old image there, reopen the designer and upload the new one under the same short name.

> **Good to know:** You do not delete images in the designer, but in the app “Smart Templates” under “Bild-Assets”. What applies when two images have the same short name is described under Image library and fonts: The image library.

[Image: Excerpt of a form in Dynamics. At the top the command bar with an arrow back, a list icon, an icon for a new window and the commands “Save”, “Save & Close”, “New”, “Deactivate”, “Delete”, “Refresh”, “Check Access”, “Assign” and “Flow” with a small arrow. Below it the header of the form: large “Smart Templates Logo” with the addition “- Saved”, below it “Bild-Asset”, then the tabs “General” (underlined in blue) and “Related” with an arrow. In the form body is the required field “Name” (red asterisk) with the value “Smart Templates Logo”.]
Caption: The entry of an image in the app “Smart Templates” under “Bild-Assets”. The form has only the fields “Name” and “Owner” (the owner is not visible in the image); it does not show the short name and the image file.
- Image marker 1: “Delete”: This is where you delete the image. It cannot be done in the designer.
- Image marker 2: “Name”: the name of the image. Here it can be changed.

### Providing fonts

The solution brings the font “Arimo”. Users upload further fonts in the designer, in the “Template settings”, “Font” tab, with “⚙ Manage fonts”. The steps and every button of the window, including replacing, downloading and deleting fonts, are described under Image library and fonts: The “Manage fonts” window. What is printed when a font or a style is missing, and what the document then reports, is described under Template settings: Default font.

### Images from records

Images can also come from a field of a record, such as a product photo. If the image field in Dynamics stores only a preview image, Smart Templates also prints only that, at a low resolution. For sharp images, turn on in Power Apps, on the image column of the table, the setting that stores full images (the designer calls it “Can store full images”). Images that were uploaded before stay small; upload them again.

[Image: Two excerpts from the side pane “Edit column” in Power Apps, separated by a dashed line. At the top: the heading “Edit column” with the sentence “Previously called fields. Learn more”, the field “Display name” with the value “Produktbild”, an empty field “Description”, the locked field “Data type” with “Image”, a locked, checked box “Primary image” and the expanded section “Advanced options”. At the bottom, further down in the same window: the locked field “Maximum image size (KB)” with the value 10240 and the checked box “Can store full images”. In between, the schema name and the column name are left out.]
Caption: The setting for full images on an image column, here the column “Produktbild” of the table Product in Power Apps (English interface). At the dashed line, part of the window is left out.
- Image marker 1: The data type “Image”: The setting exists only on image columns.
- Image marker 2: Expand “Advanced options”; when collapsed, the setting is not visible.
- Image marker 3: “Can store full images” checked: Dynamics stores the whole image, not just the small preview image. Then save with “Save”.

The quality of the image must be set to “Original quality (recommended)”. That is the default and the same setting you make when choosing the image field with “Large image (recommended)” (see Images: Quality).

If Smart Templates still prints only the preview image, it usually reports that with the document. Which message appears when, what a button in Dynamics shows of it and what happens when no table is stored for the image is described under Images: Quality.

---

## Keep warm

*For administrators · Page en/einrichtung-warmhalten.html*

> **In short:** After a longer break, the first document otherwise takes ten to seventeen seconds. To prevent that, Smart Templates keeps its templates warm. This sets itself up; you do not have to do anything.

### How it works

As soon as a template is saved or someone opens the designer, Smart Templates creates 48 recurring bulk deletion jobs in your environment. They are named “Smart Templates keep-warm …”; each one runs once a day, together every 30 minutes. They delete only rows of the helper table “Smart Templates Wecker”, none of your data, and each deletion triggers a test document of the templates: with their sample record or, if none is stored, with any record of the main table. The test document is discarded immediately, is not sent anywhere and does not trigger a flow.

[Image: Excerpt of a list in Dynamics with the heading “Recurring Bulk Deletion System Jobs” and a small arrow pointing down. The column headers are “System Job Name” (sorted ascending) and “Status Reason”. Below are ten rows, each with a box on the left and an underlined name: “Smart Templates keep-warm 00:00 UTC - deletes only its own timer rows”, then, in steps of 30 minutes, the same row with 00:30, 01:00 and so on up to 04:30. In every row the status reason on the right is “Waiting”.]
Caption: The wake-up jobs of Smart Templates in Dynamics: The list “Bulk Record Deletion” shows them in the view “Recurring Bulk Deletion System Jobs”. The search box “Filter by keyword” does not work in this view, and the number at the bottom of the list counts all recurring bulk deletion jobs of the environment, not just these 48.
- Image marker 1: The full name of a job. It says what the job does: It deletes only its own rows of the table “Smart Templates Wecker” (“timer rows”), none of your data.
- Image marker 2: The time (UTC) in the name: Every job has its own, here 00:00 and 00:30; together they run every 30 minutes.

### Turning it on and off per template

Per template, the check mark “Keep this template warm” turns keep-warm on or off. It is in the “Template settings”, “Data” tab; its default, the note below it and the button “🔧 Check keep-warm” are there as well (see Template settings: Keep warm). Every active template with a primary source whose check mark is set is kept warm. For an inactive template the check mark has no effect, and the window says so. Even with the check mark, a template stays cold if its main table is empty or not readable. Building blocks are not warmed separately and do not count in the check; they are warmed together with the templates they are part of (see Building blocks).

Keep-warm cannot be turned off completely: Even without a single check mark, the jobs stay in place and then warm nothing. Jobs you deleted by hand are created again by the next start of the designer or the next time a template is saved.

### Checking

In the same tab, the button “🔧 Check keep-warm” checks the setup and sets up missing parts again. Normally you do not need the button: Keep-warm sets itself up (see After an update), and the check changes nothing in your data. If it cleans up a duplicate row of its helper table, the same test documents may be created once outside the usual schedule.

Below the button, the result then appears, with the duration in seconds. This is how the button shows the check:

- **During the check** the button is called “⏳ checking …” and is locked.
- **If everything is there,** it reports, for example: “All good: templates kept warm: 5, groups: 1, wake-up jobs running: 48 of 48.”
- **If the license is not valid,** Smart Templates does not warm, even if everything is set up. The check says so, for example: “Set up, but nothing is being kept warm right now: the license is not valid (expired). …; keeping warm resumes as soon as the license is valid.” In the parentheses is the reason, as in the name of the rows. What to do is described on the page “License & updates” (see When no license is valid).
- **If the check fixed something,** the answer begins with “Fixed:” and names what was newly created or removed.
- **If the jobs are complete,** but groups have not been woken for more than 45 minutes, the check asks you to look in the system jobs to see whether they are allowed to run.
- **Findings and errors** appear in red, for example “The check failed: …”.
- **Outside Dynamics,** for example in a local preview, the button is locked, and below it is “Not available in the local design service.”

> **Good to know:** The check looks at whether everything is set up and the jobs are running, not at how fast the next document really is. How long Dynamics keeps Smart Templates ready after a document is not committed to by Microsoft. If that changes, the documents still come, only the first one after a break is slower again. Whether the last round really warmed is in the name of the rows of the table “Smart Templates Wecker”, for example “Gruppe 1 · … · 5/6 warm · 4.2 s”; “0/0 warm”, “kein Datensatz” or “Lizenz (…)” means that nothing was warmed; for “Lizenz (…)” the reason is in the parentheses, and warming resumes only when the license is valid. You will find the table in Power Apps among the tables of the environment.

[Image: Excerpt of the table “Smart Templates Wecker” in Power Apps, with an English interface. Above the table it says “Smart Templates Wecker columns and data”. The table has two columns: “Name” (sorted ascending) and “Created On”. The first row is named “Gruppe 1 · 16.10. 08:31 UTC · 6/6 warm · 5.2 s” and has the creation time “16.10.2026 10:31”, the second is named “Gruppe 2 · 16.10. 08:31 UTC · 3/3 warm · 2.8 s” and has the same time. Below it follows an empty row with the gray placeholder “Enter text”.]
Caption: The table “Smart Templates Wecker” in Power Apps: The name of each row shows the state of the last round of a group. Here both groups are fully warmed, 6 of 6 and 3 of 3.
- Image marker 1: “Gruppe 1”: the group. Every six templates make one row, further templates further rows; here there are two groups.
- Image marker 2: “16.10. 08:31 UTC”: start of the last round of this group, in UTC.
- Image marker 3: “6/6 warm”: In this round all six templates of the group were warmed. If one was not warmed, its name follows with the reason; if nothing was warmed because of the license, “Lizenz (…)” appears there.
- Image marker 4: “5.2 s”: This is how long the round took. Whether warming took place is told by the number before it, not by the time.

### After an update

After an update, click “🔧 Check keep-warm” or save a template. Smart Templates then checks the jobs and sets them up again if needed. Opening the designer also checks silently, but only once per browser session; reloading in the same tab does not check again.

---

## Preparing buttons and flows

*For administrators · Page en/einrichtung-buttons-flows.html*

> **In short:** A button in Dynamics creates a document for the open record; a flow can then carry on, for example file or send the document. With “🖨 Manage buttons in Dynamics” the designer takes you to the command designer of Power Apps, and with “↻ Manage flows” it creates a flow. You add the button itself in the command designer. This page is a checklist: it names what must be in place beforehand and refers to the pages on the steps.

### Creating a button

Check beforehand:

- You have the right to edit the app in which the button is to appear (see Rights and roles: Adding a button).
- The template is saved.

Which questions the assistant “Manage buttons in Dynamics” asks is described under Buttons: the assistant. The steps in the command designer, from clicking “🖨 Manage buttons in Dynamics” to publishing, are described under Adding, changing and removing a button: The process at a glance. What the finished button does on click is described under What happens on click.

> **Good to know:** “Send email immediately” needs a recipient, and a limit applies to the number of rows a button shows at once. Where “Send email immediately” takes the recipient from is explained under Buttons: the assistant: Who receives the email?; the limit for the rows is described under What happens on click: The limit of 200 rows.

### Creating a flow

Check beforehand:

- The account with which the flow is created has the necessary license and role and read access to the table “Smart Templates Auslöser” (see Rights and roles: Creating a flow).
- The template has a primary source. Without it, no flow can be created.
- You assign the connection to the flow only through its trigger, not on the page “Connections” of Power Automate (see Flows: The windows “Create a connection” and “First the connection — here is how”).

How to create a flow with “↻ Manage flows”, assign it a connection, add your steps and choose it in the assistant is described step by step under Flows: Manage flows; it also says how long it takes after turning it on until the flow receives jobs. What the created flow already contains is described under Flows: The scaffold of the created flow; the image shows it in Power Automate.

[Image: Composite view of a flow in the Power Automate editor, with an English interface. On the left the parameter area of the first step: at the top an arrow with “Back” and the flow name “Smart Templates – Demo-Rechnung (Handbuch)” with the addition “Published”, below it the heading “Wenn Smart Templates einen Beleg anfordert” and the tabs “Parameters” (active), “Settings”, “Code view” and “About”. A red band reports “Invalid connection, please update your connection to load complete details”. The fields follow: “Change type” with the value 1, “Table name” with st_ausloeser, “Scope” with 4, “Select columns” (empty, with gray placeholder text), “Filter rows” with the value st_flowkennung eq 'c1c01ed2-…' (the identifier of the flow) and “Advanced parameters” with “Showing 0 of 2” and the two buttons “Show all” and “Clear all” (the second one gray). At the very bottom it says “Connected to st_flow_mvav7fci.”, next to it the blue link “Change connection reference” and on the right in red “Invalid connection”. On the right, separated by a dashed vertical line, are four cards one below the other, connected by arrows with a plus symbol each: the trigger with a blue outline “Wenn Smart Templates einen Beleg anfordert”, “Beleg erzeugen” and “Hauptdatensatz holen”, all three with the red message “Invalid connection, please update your connection to load complete details”, and finally “Hier Ihre Schritte”.]
Caption: The created flow in Power Automate, still without a valid connection: on the left the fields of the trigger, on the right the skeleton with its four cards. The two parts were captured separately; the dashed line separates them.
- Image marker 1: The trigger “Wenn Smart Templates einen Beleg anfordert” (when Smart Templates requests a document): You click this card; its fields then appear, on the left in the image.
- Image marker 2: “Beleg erzeugen” (generate document): builds the document as a PDF from the values of the trigger row.
- Image marker 3: “Hauptdatensatz holen” (get main record): fetches the record; the table is entered as a fixed value.
- Image marker 4: “Hier Ihre Schritte” (your steps here): a placeholder with an explanatory text that you replace with your own steps.
- Image marker 5: “Change connection reference”: You click it, choose “Add new” in the next window and sign in (see Flows: The windows “Create a connection” and “First the connection — here is how”).

### What happens in the background

The button creates the document and adds a row for the flow to the table “Smart Templates Auslöser”. The flow listens for it and fetches the document itself. Rows that are older than six hours are cleared away by Smart Templates the next time it triggers. For the first flow that anyone creates, the solution “Smart Templates – Flows” (unique name “STFluesse”) is created in the environment, with a connection reference; the flows that the designer creates are stored there.

---

## Turning on Copilot

*For administrators · Page en/einrichtung-copilot.html*

> **In short:** Smart Templates comes with an assistant for templates, the “Smart Templates Assistant”. It runs in Microsoft 365 Copilot. Users open it in the designer through “AI assistant”, describe a change, and the designer applies it to the open template. After importing the solution, you set it up once in Copilot Studio: check the sign-in and tools, publish, make it available in the channel “Microsoft 365” and release it to the users.

### What it is for

The assistant changes existing templates on request. To do so, it reads the template, the description of the template format and sample data from Dynamics, builds the change and checks it against the sample data. The change does not land directly in the saved template: The designer applies it to the open template, the user sees it, undoes it with Ctrl+Z or saves it.

How users work with it is described in Working with the AI assistant in Copilot; examples of requests are under Working with the AI assistant in Copilot: What you can ask for.

### What the solution brings with it

- **The agent “Smart Templates Assistant”** with its instruction. Main language German, English as the second language.
- **Five tools:** “Microsoft Dataverse MCP Server” for looking up tables and records, “Format lesen” (read format) for the description of the template format, “Vorlage ändern” (change template) for submitting a change, “Standard lesen” (read standard) for the standards of the e-invoice and “Standard hochladen” (upload standard) for an own standard.
- **A connection reference** for Microsoft Dataverse, which all five tools use.
- **The table “Smart Templates KI-Änderung”**, in which every submitted change is stored with its description and state.

The solution does not bring the channel for Microsoft 365 or the release for the users. You set up both after the import (step 5 and step 6).

### Requirements

- **Microsoft 365 Copilot for the users:** The assistant runs in the chat of Microsoft 365 Copilot. Anyone who is to use it needs either a license for Microsoft 365 Copilot or Copilot credits. With the license, no additional credits are needed (see Costs).
- **Rights for setting up:** Anyone who sets up the assistant needs the role “System Administrator” in the environment. With it, they open the agent through the solution in Copilot Studio, set the sign-in, publish it, set up the channel and share it with the users. If the assistant is to appear in the store for the whole organization, a Teams administrator must also approve it in the Teams admin center (see step 6).
- **Role of the users:** Anyone who uses the assistant needs the role “Smart Templates Designer” or the role “System Administrator”. The action “Vorlage ändern” creates every change with the user’s rights in the table “Smart Templates KI-Änderung”; without one of the two roles this right is missing, and the action reports an error (see Rights and roles: Designing templates). How to assign the role “Smart Templates Designer” is described under Assigning a security role.
- **Dataverse MCP server:** It and the allowed clients for it are turned on per environment, in the settings of the environment in the Power Platform admin center. Among the allowed clients, “Microsoft Copilot Studio App” must be turned on.
- **Teams setting of the tenant:** Your organization must allow apps from the Power Platform to be added in Teams. If that is turned off, a Teams administrator turns it on in the Teams admin center.

#### Costs

- For users with a license for **Microsoft 365 Copilot**, use of the assistant is included. Microsoft does not bill employees’ use of a Copilot Studio agent if the user has this license and the agent works with their sign-in. Both apply here.
- Users **without** this license consume Copilot credits. The environment therefore needs a credit pack or pay-as-you-go billing only if such users use the assistant.
- The tools of the Dataverse MCP server cost nothing extra in Copilot Studio.
- The test window in Copilot Studio costs nothing. Billing starts only when the published agent is used.

### Step 1: Opening the agent in Copilot Studio

1. Open Copilot Studio (copilotstudio.microsoft.com). In the bar at the bottom left, directly above your account picture, click the icon “Switch environment” (image marker 1), and choose the environment in which you installed Smart Templates (image marker 2). [Image: Copilot Studio, bottom left: in the narrow bar the icon “Switch environment”, above it the opened window “Switch environment” with the sentence “Spaces for creating, storing and working with agents.” and a search box. Below it the groups “Current environment” with the chosen environment (type Production, with a check mark), “Pinned” with “Contoso (default)” (Default, with a pin) and “Recently used” with “Contoso Produktion” (Production), and at the very bottom “All environments (2)”.]
2. In the list of agents, open “Smart Templates Assistant”. The fastest way to find it is to type the name into the search box above the list. [Image: The page “Agents” in Copilot Studio. In the search box is “Smart Templates”, above the box “1 item”, on the right the button “New agent”. The list with the columns “Name”, “Status”, “Owner”, “Last modified” and “Powered by” has one row: “Smart Templates Assistant”, “Published”, owner (the name of whoever created the agent), “Oct 17, 2026” and “Default”.]

### Step 2: Checking the sign-in

After an import, the sign-in has to be set again.

1. At the top right, click “Settings”, on the left “Security” and then “Authentication”.
2. Choose “Authenticate with Microsoft” and click “Save”.

[Image: The window “Settings” with a close cross at the top right. On the left the list of areas: “Generative AI”, “Agent details”, “Security” (highlighted, with a lock icon), “Connected agents”, “Connection settings…”, “Authoring canvas”, “Entities”, “Skills”, “Voice”, “Languages”, “Language understanding”, “Component collections…” and “Advanced”. On the right a card with the title “Authentication” and an arrow pointing left in front of it, below it the sentence “Choose how the agent should authenticate the user’s identity during chat.” Under “Select an option” are three radio buttons: “No authentication” (shown in gray, with a warning icon, below it “Publicly available in all channels”), “Authenticate with Microsoft” (selected, blue circle, below it “Entra ID authentication in Microsoft Teams, SharePoint, Power Apps or Microsoft 365 Copilot”) and “Authenticate manually” (shown in gray, below it “Set up authentication for each channel”). Further down the section “Multi-tenant support” with the label “Preview” and the unchecked box “Enable multitenancy”. Below the card is the gray button “Save”.]
Caption: Settings, Security, Authentication: “Authenticate with Microsoft” is chosen.
- Image marker 1: The area “Security” in the list on the left. From there you get to “Authentication”.
- Image marker 2: The chosen option “Authenticate with Microsoft”. Then every user signs in with their own account.
- Image marker 3: The button “Save”. In the image it is gray because nothing was changed. A changed setting applies only once you click it.

With that, every user signs in with their own account, and the assistant sees only what this user may see in Dynamics. With this setting, the agent is available only in Teams, Microsoft 365 and SharePoint.

### Step 3: Checking the tools

1. At the top, click “Tools”. There are “Microsoft Dataverse MCP Server”, “Vorlage ändern”, “Format lesen”, “Standard lesen” and “Standard hochladen”, all five “On”.
2. Open each tool once. Under “Connection” there must be a connection with a green check mark, and for the four actions the environment “(Current)”, that is, your own environment.

[Image: The tool list of the agent, put together from two parts; a dashed vertical line shows where the middle columns are left out. On the left the columns “Name” and “Type” with three rows, each with a green Dataverse icon: “Microsoft Dataverse-…” (the name is cut off) with the entry “Model Context Protocol”, “Vorlage ändern” with the entry “Connector” and “Format lesen” with the entry “Connector”. On the right the column “Enabled”: in all three rows is a blue, switched-on toggle labeled “On”.]
Caption: Three of the five tools of the Smart Templates Assistant, all switched on; the image does not show “Standard lesen” and “Standard hochladen”. The dashed line shows where the middle columns are left out of the image.
- Image marker 1: The row “Microsoft Dataverse MCP Server” (cut off here): for looking up tables and records.
- Image marker 2: The row “Vorlage ändern”: submits a change. It lands as an AI change, not in the saved template.
- Image marker 3: The row “Format lesen”: gives the assistant the description of the template format.
- Image marker 4: The toggles in the column “Enabled”: All three are set to “On”.

> **Caution:** Do not turn on any further tools in the tool “Microsoft Dataverse MCP Server”. Only the three for reading are turned on: `read_query`, `search` and `describe`. Tools such as `invoke_api` or `create_record` would allow the assistant to do more than change templates, for example call arbitrary actions or create records.

[Image: The opened tool “Microsoft Dataverse MCP Server”, put together from four strips; dashed horizontal lines show where something is left out. At the top, under “Server”, the entry “Microsoft Dataverse” with the addition “Microsoft Dataverse MCP Server”, next to it under “Connection” the entry “Dynamics”; at the right edge a green check mark with a small arrow pointing down. Below it the box “Tools” with the sentence “MCP tools enable servers to expose executable functions so that LLMs can interact with external systems and perform real-world actions.” In the header row with “Tool name” and “Description”, on the right there are a refresh icon and a switched-off, gray toggle. Below it the rows “read_query” (toggle on, blue), “invoke_api” (off), “search” (on), “upsert_skill” (off) and “describe” (on). Each row has an English description, most of them with the link “Show more”; for “describe” the toggle covers part of the description.]
Caption: In the tool “Microsoft Dataverse MCP Server”, only the three tools for reading are turned on. Something is left out at the dashed lines; the list has 16 tools.
- Image marker 1: The toggle without a label to the right of the refresh icon is called “Allow all”. It is off and stays off, because if it were on, it would allow all tools.
- Image marker 2: The rows that are on, `read_query`, `search` and `describe`: Only these three tools for reading are on.
- Image marker 3: Two of the rows that are off, `invoke_api` and `upsert_skill`. They and all the other tools stay off, otherwise the assistant may do more than change templates.
- Image marker 4: The connection with a green check mark. This is how it must appear.

### Step 4: Publishing

An imported agent must be published before it can be shared.

1. At the top right, click “Publish”, and in the window click “Publish” once more.
2. After a short time, “Published” appears at the top right with today’s date.

### Step 5: Adding the channel “Microsoft 365”

1. At the top, click “Channels” and then the tile “Microsoft 365 and Microsoft Teams”.
2. Leave the check mark “Make agent available in Microsoft 365 Copilot” set and click “Add channel”. If the channel has already been added, the window shows “Remove channel” instead; then continue with the next step.
3. Click “Edit details”. Enter a short and a long description and, under “More”, the developer name, for example the name of your company, and as needed “Website”, “Privacy statement” and “Terms of use”. Click “Save”.

[Image: The side window “Microsoft 365 and Microsoft Teams” with a close cross at the top right and a scroll bar at the right edge. At the top are explanatory paragraphs on Microsoft 365, on “Microsoft 365 Copilot” (agent store) and on “Microsoft Teams”. Below them the subheading “Activate Microsoft 365” with the checked box “Make agent available in Microsoft 365 Copilot”. The section “Agent preview” follows with a card: a robot icon on a turquoise background, the name “Smart Templates Assistant”, below it “Built with Microsoft Copilot Studio.” and on the right the button “Edit details”. In the lower strip of the card are the button “Availability options” and the entries “Show agent in Microsoft 365” and “Show agent in Teams”. At the bottom of the window are the gray button “Save” and the button “Remove channel”. There is no “Add channel” button in the image.]
Caption: This is what the window looks like when the channel has already been added: Instead of “Add channel”, “Remove channel” is at the bottom, and the card shows “Edit details” and “Availability options”.
- Image marker 1: The checked box “Make agent available in Microsoft 365 Copilot”. The check mark stays set.
- Image marker 2: The button “Edit details”: This is where you enter the descriptions and the developer name.
- Image marker 3: The button “Availability options”: This is where you decide for whom the assistant appears in the store (see step 6).

Users see this information on the assistant’s card before they add it. Without it, the card shows Microsoft’s English default text (“Help employees stay informed, productive, and connected. …”) and, as the developer, the name of whoever created the agent; for other agents, the placeholder “Your developer name” also appears there.

[Image: The form “Edit details”, put together from three parts; dashed horizontal lines show where parts of the window are left out. At the top the field “Short description” with the sample text “Ändert Ihre Smart-Templates-Vorlagen auf Zuruf.” and the note “Up to 80 characters”, below it the larger field “Long description” with a three-line sample text and the note “Up to 3400 characters”. Under the first line the blue toggle “Less” with an arrow pointing up, so the section is expanded, and the fields “Developer name” (sample text “Beispiel GmbH”, note “Up to 32 characters”), “Website” (https://www.example.com), “Privacy statement” (https://www.example.com/datenschutz) and “Terms of use” (https://www.example.com/nutzungsbedingungen). Under the second line the dark button “Save” and the white button “Cancel”.]
Caption: The form “Edit details” with the section “More” expanded (the toggle is then called “Less”); the values are invented examples for the image only. Parts of the window are left out at the dashed lines.
- Image marker 1: The fields “Short description” and “Long description”. Users see these texts on the assistant’s card.
- Image marker 2: The field “Developer name” in the expanded section. Below it are “Website”, “Privacy statement” and “Terms of use”.
- Image marker 3: The button “Save”: Only with it do the details apply. “Cancel” discards them.

### Step 6: Releasing it to users

Only those who have access to the assistant can use it. Two ways:

- **For specific people or groups:** At the top right, next to “Settings”, click “…” (image marker 1) and then “Share” (image marker 2), and enter the people or security groups. Under “Channels” › “Microsoft 365 and Microsoft Teams” › “Availability options” › “Show to my teammates and shared users”, the assistant then appears in the store for these people.
- **For the whole organization:** Under “Availability options” › “Show to all users in my organization”, you submit the assistant for approval. An administrator approves it in the Teams admin center. After that it is in the store for everyone, and an administrator can also pin it for the users. For this, the agent must be shared with everyone in your organization under “Share”; otherwise users can add it, but cannot chat with it.

[Image: At the right in the header of an agent in Copilot Studio: a magnifying glass, “Published 17.10.2026”, the buttons “Publish” and “Settings”, next to them “…” and the button “Test”. Under “…” a dark menu is expanded: “Switch to demo website” and “Start deployment process” (both gray), “Delete” and “Share”; “Share” is outlined.]

[Image: The window “Share ‘Smart Templates Assistant’” with three dots and a close cross at the top right. Below it a gray notice band with an info icon: “This agent is configured for Microsoft Teams and Microsoft 365 Copilot. Make sure your users are in security groups that can access the agent in Teams.” and the link “Learn more”. On the left two cards. The upper one is called “New users” with the note “You can add multiple users” and an empty search box with the placeholder “Add name, group or email add…”. The lower one is called “Existing users (1)” with the selection list “Sort by name” and the entry of the creator with email address and the role “Owner”; below it the section “My organization” with the entry “Everyone in the organization”. On the right the card “User permissions” with the sentence “Add or select a user to set their permissions”. At the bottom right the dark button “Share” and the button “Cancel”.]
Caption: The window for sharing the agent: people, security groups or the whole organization. The name in the entry under “Existing users” is blurred.
- Image marker 1: The search box under “New users”: This is where you enter people or security groups. This is the first way.
- Image marker 2: The entry “Everyone in the organization” under “My organization”: For the second way, the agent must be shared with everyone. You set the permissions on the right as soon as you select an entry.

[Image: The second page of the channel window, which opens after “Availability options”: at the top an arrow pointing left, the title “Microsoft 365 and Microsoft Teams” and a close cross. The section “Get link” with the sentence “Users you choose can open your agent in Microsoft Teams with this link.”, the link “Manage sharing” and the button “Copy link”; the address of the link itself is not shown. The section “Download file” with the sentence “Use your downloaded file to add your agent to the Microsoft Teams or Microsoft 365 store.” and the link “Learn more”, below it the button “Download .zip file”. The section “Show in store” with the sentence “Choose who your agent should be shown to:” and two outlined cards one below the other: “Show to my teammates and shared users” (below it “Appears under Built with Power Platform”) and “Show to all users in my organization” (below it “Appears under Built by your org after approval by the administrator”). Neither of the two cards is selected.]
Caption: The availability options of the channel: Under “Show in store” are the two ways from the list, for teammates or for the whole organization.
- Image marker 1: The card “Show to my teammates and shared users”: The assistant appears in the store under “Built with Power Platform”, for the people the agent is shared with.
- Image marker 2: The card “Show to all users in my organization”: After approval by an administrator, the assistant appears under “Built by your org”.

> **Good to know:** You do not have to enter the path to the assistant anywhere in the designer. The button “AI assistant” finds it by itself: It looks for an active agent whose instruction names the action “Vorlage ändern” (`st_VorlageAendern`) and that is available in the channel Microsoft 365; if there are several, such as a test copy, it takes the one published last. If there is no such agent, the designer reports that no AI assistant has been set up in this environment yet; if the channel is missing, that it has not yet been enabled for Microsoft 365 Copilot. It does not check whether the agent is shared with the users (step 6). Anyone who rewrites the instruction leaves the name of the action in it.

### How to check it

In the designer, open a saved template, click “AI assistant” and send the assistant a small request, for example “Put the line Thank you for your order below the table”. The operation, step by step, with the sentence from the clipboard, is described under Working with the AI assistant in Copilot: Opening the assistant. In your test, the following happens:

- A window of its own with Microsoft 365 Copilot opens on the right. The first time, it shows the card of the assistant; click “Add” there.
- With the first request, the assistant asks for the connection to Dynamics; you allow it with “Allow”. If the first answer stays empty or the card does not appear, reload the Copilot window.
- After about a minute, the assistant reports the change, and the designer shows it. With Ctrl+Z it is gone again.

### What the assistant may do

- It works with the rights of the user and sees only what the user may read in Dynamics (see step 2).
- It can read through the Dataverse MCP server: describe, search and query tables (see step 3).
- It can change only through “Vorlage ändern”. This action checks the change and stores it as an AI change; the saved template stays as it is. How the designer applies the change is described under Working with the AI assistant in Copilot: What happens then; from when “Full preview” and “PDF” in the designer show it and buttons and flows in Dynamics print it, under Working with the AI assistant in Copilot: What changes in the document?
- For the e-invoice, it reads the standards with “Standard lesen”. It uploads an own standard with “Standard hochladen” only on explicit request, with the user’s rights (role “Smart Templates Designer”). Before that, it asks the user in the chat; without their confirmation it uploads nothing. An existing own standard of the same version can be replaced in the process.
- It cannot call other actions. The web search is turned off.

### Language

The assistant speaks German and English; the main language is German. When it uses which language, what happens with another language and what is different in the English designer is described under Working with the AI assistant in Copilot: Language.

### More from Microsoft

- Exporting and importing agents with solutions
- Making agents available for Teams and Microsoft Copilot
- Billing of Copilot credits
- Multilingual agents

---

## Prices and licensing options

*For administrators · License & updates · Page en/lizenz-ueberblick.html*

> **In short:** Smart Templates is available as a **subscription** for €990 per year, as a **purchase** for a one-off €2,950, and as a **purchase with maintenance contract**: €2,950 one-off, from the second year €359 per year. Before that you can test it free of charge for 30 days. One license covers your whole Microsoft organization with all the Dynamics environments in it. All prices are net, plus VAT. You order in Dynamics on the “License & updates” page and pay on the payment page of our payment service provider Stripe.

### The options compared

| | Trial | Subscription | Purchase | Purchase + maintenance contract |
|---|---|---|---|---|
| Price (net) | free of charge | €990 per year | €2,950 one-off | €2,950 one-off, from the second year €359 per year |
| Use | 30 days | as long as the subscription runs | perpetual | perpetual |
| New versions and support | all features, no entitlement to support | as long as the subscription runs | in the first year | without interruption, as long as the maintenance contract runs |
| Canceling | not necessary, the trial ends by itself | at any time, effective at the end of the current term | nothing to cancel | maintenance contract at any time, effective at the end of the current term; free of charge up to and including the first anniversary of the purchase |
| Suits you if you … | first want to try out Smart Templates | want to start small | want to pay once and don’t need new versions | want to work with new versions on an ongoing basis |

The price that applies is the one the “License & updates” page and the payment page show you when you order, or the price in your quote ([§ 4(3) of the license terms](https://smart-templates.eu/en/license-terms.html#p4)). The current prices are also on the [website](https://smart-templates.eu/en/#preise).

### What the options cost over the years

In the first two years the subscription is the cheapest; in the long run the purchase is. From the third year on, the purchase without maintenance contract costs less than the subscription, and from the fifth year on so does the purchase with maintenance contract.

After five years the totals are €4,950 for the subscription, €4,386 for the purchase with maintenance contract and €2,950 for the purchase without maintenance contract, each net. Without a maintenance contract, however, you get no new versions after the first year.

### Included in every option

- An unlimited number of documents, users and templates. Smart Templates counts nothing ([§ 3(2)](https://smart-templates.eu/en/license-terms.html#p3)).
- All features, including e-invoice, buttons, email and flows.
- All Dynamics environments of your Microsoft organization: production, test and development.
- Your templates, images and fonts belong to you, as does every document created.

### Who the offer is for

We sell Smart Templates only to businesses, to legal entities under public law and to special funds under public law. We do not enter into contracts with consumers. That is why there is no right of withdrawal for consumers either. When you order, you confirm with a checkbox on the payment page that you belong to this group ([§ 1(2)](https://smart-templates.eu/en/license-terms.html#p1)).

### One license for your Microsoft organization

One license covers your Microsoft organization. Microsoft calls it the **tenant**, more precisely the Microsoft Entra tenant. Your organization has a fixed identifier, the **tenant ID**. It is shown on the “License & updates” page in the row “Organization (tenant ID)”; with “Copy” you copy it.

- All Dynamics environments in this organization are included.
- For every additional Microsoft organization you need a license of its own ([§ 3(2)](https://smart-templates.eu/en/license-terms.html#p3)).
- Affiliated companies that work in the same organization may use Smart Templates too. Service providers may use it in your organization on your behalf, for example during setup ([§ 3(3)](https://smart-templates.eu/en/license-terms.html#p3)).
- If you move to a new Microsoft organization, we transfer the license once free of charge on request ([§ 3(6)](https://smart-templates.eu/en/license-terms.html#p3)).
- You may pass a purchased license on to another company: in full, you no longer use it yourself afterwards, and you tell us the new holder and their tenant in text form, for example by email. A subscription cannot be transferred ([§ 3(5)](https://smart-templates.eu/en/license-terms.html#p3)).

### What the terms mean

| Term | Meaning |
|---|---|
| License | Your right to use Smart Templates: for the term with a subscription, perpetual with a purchase, for 30 days in the trial. |
| License key | A key signed by us that records the license type, term and end of maintenance. Smart Templates fetches it by itself and stores it in your environments. Before every document it checks the key, without any connection to the outside. Without a valid key no documents are created; the designer remains usable. |
| License service | Our online service that issues license keys and informs you about new versions and news. |
| Synchronization | The request Smart Templates sends to the license service, for example when the designer is opened. It fetches a key that is due, see [Synchronization and entering the key by hand](lizenz-abgleich.html). |
| Provisional key | With payment by direct debit: a key for the time until your bank confirms the payment, 28 days at most. After that the regular key arrives by itself. |
| Transitional key | If the renewal of a subscription has not been paid yet, Smart Templates keeps printing with it for up to 21 more days, see [If a renewal has not been paid](lizenz-bezahlen.html#wenn-eine-verlaengerung-nicht-bezahlt-ist). |
| Version | A released state of Smart Templates with its own number. “License & updates” shows which version is installed. |
| Update | A new version with bug fixes, adaptations to changes by Microsoft or new features, see [Updates and new versions](lizenz-updates.html). |
| Maintenance | Updates, adaptation to changes of the Microsoft platform, and support. It is included in the subscription, in the first year with a purchase, and afterwards with a maintenance contract. |
| Maintenance contract | The optional contract for maintenance of a purchased license after the first year. It runs for one year at a time. |
| Term | The period for which a subscription or a maintenance contract has been paid: twelve months. After that it renews for twelve months at a time. |
| Trial period | Free use for 30 days, once per organization. |
| Invoice email | The email address of your contract, which you enter in the “Billing details” window when you first buy. Invoices, payment reminders and all messages about your contract go there, and you use it to sign in to the customer portal. It can only be changed with the consent of the previous address. |
| Administration email | An optional second address for messages about managing your license, such as cancellation confirmations, notes on the maintenance contract and license keys. Without it everything goes to the invoice email; payment reminders and dunning notices go to both. |
| Customer portal | The Stripe page on which you change the payment method, on “License & updates” with “Change payment method ↗”. Canceling and changing the billing details is done on “License & updates”. |
| Stripe | Our payment service provider. You pay on its payment page. We do not receive your full card or account details. |

### The license terms are binding

This chapter explains the process. What applies is set out in the [license terms](https://smart-templates.eu/en/license-terms.html); they take precedence over this manual ([§ 15(4)](https://smart-templates.eu/en/license-terms.html#p15)). What is expressly agreed in your quote in turn takes precedence over the license terms.

- For a purchase, the version of the license terms that is online when the contract is concluded applies.
- If we change the terms for running subscriptions and maintenance contracts, we tell you at least three months before the next renewal. You can then cancel effective at the renewal. Your price is not affected ([§ 15(3)](https://smart-templates.eu/en/license-terms.html#p15)).
- You can view, print and save the license terms on the website at any time.

### The pages in this chapter

- [The trial period](lizenz-testphase.html): how to test, when the 30 days begin and what applies afterwards.
- [The “License & updates” page](lizenz-seite.html): where you see your status, who may buy, what each status means and how to change details and email addresses.
- [Buying or subscribing](lizenz-bestellen.html): step by step up to payment, and how the contract is concluded.
- [Payment, invoices and renewal](lizenz-bezahlen.html): payment methods, direct debit, VAT, invoices, reminders.
- [The maintenance contract](lizenz-wartungsvertrag.html): what it brings, when it begins and what applies without it.
- [From subscription to purchase](lizenz-umstieg.html): how the rest of your subscription is credited.
- [Your invoices](lizenz-rechnungen.html): downloading invoices, paying an open invoice.
- [Canceling and the customer portal](lizenz-kuendigen.html): canceling a subscription and a maintenance contract and withdrawing a cancellation, changing payment details.
- [Synchronization and entering the key by hand](lizenz-abgleich.html): how the license key gets into your environments, even without a connection to the outside.
- [Updates and new versions](lizenz-updates.html): how to recognize an update, whether it is covered by your license and how to install it.
- [News](lizenz-neuigkeiten.html): messages in the designer and on the page, switching news by email on and off.
- [When no license is valid](lizenz-gesperrt.html): what your users see and what you do.
- [Frequently asked questions about license & updates](lizenz-fragen.html)

---

## The trial period

*For administrators · License & updates · Page en/lizenz-testphase.html*

> **In short:** You can test Smart Templates for 30 days, free of charge and with all features. The trial begins when the designer is opened in your organization for the first time, and every organization is entitled to it once. After that no more documents are created until you subscribe or buy; your templates are kept. You don’t have to cancel anything.

### How to get the trial

1. Request the solution with the form [Request a demo](https://smart-templates.eu/en/contact.html?anliegen=demo) on our website.
2. We send you the solution “SmartTemplates”, for download or by email ([§ 7(1)](https://smart-templates.eu/en/license-terms.html#p7)).
3. Import the solution into Power Apps, as described under [Installing the solution](einrichtung-loesung.html).
4. Open the designer in the app “Smart Templates” as soon as you want to test. That starts the trial.

The following applies to the trial:

- It lasts 30 days and applies to all environments of your organization.
- It includes all features. It is not intended for productive use ([§ 6(2)](https://smart-templates.eu/en/license-terms.html#p6)).
- There is no entitlement to support or to an extension of the trial. We gladly accept notes about errors ([§ 6(3)](https://smart-templates.eu/en/license-terms.html#p6)).
- You don’t have to cancel anything, and there are no costs.

### When the trial begins

The 30 days begin as soon as someone in your organization opens the designer for the first time. For this, Smart Templates has to reach our license service. If your policies block connections from Dynamics to the outside, the trial therefore does not begin; in that case write to us using the [contact form](https://smart-templates.eu/en/contact.html). Opening the “License & updates” page does not start the trial, and neither does printing. As long as the trial has not begun, “License & updates” shows the status “Trial not started yet”.

> **Caution:** The trial also begins if the designer is only opened in a test environment, or if a service provider sets up the solution for you and opens the designer while doing so. Every organization is entitled to it only once. So don’t open the designer until you really want to test.

### During the trial

The “License & updates” page shows the status “Trial — … days left” and below it the day on which the trial ends. From seven days remaining, the status appears in orange. What the page looks like is shown in [The “License & updates” page](lizenz-seite.html#was-auf-der-seite-steht).

When a system administrator or someone with the role “Smart Templates – Lizenzverwaltung” opens the page for the first time, it asks for the language for invoices and emails: German or English. You can change it at any time until you buy, see [The language for invoices and emails](lizenz-seite.html#die-sprache-fuer-rechnungen-und-e-mails).

If you want to keep working after the trial, subscribe or buy in good time, see [Buying or subscribing](lizenz-bestellen.html). Concluding a contract during the trial ends it. The term of the subscription and the first year of maintenance with a purchase begin with the conclusion, not only at the end of the trial ([§ 6(4)](https://smart-templates.eu/en/license-terms.html#p6)).

### When the trial ends

After 30 days no more documents are created: no PDF, no e-invoice, no email with a document and no full preview, not even through buttons or flows. The designer remains usable. Your templates, images, buttons and settings are kept in full. What your users then see is described under [When no license is valid](lizenz-gesperrt.html).

On “License & updates” the status then reads “Trial expired” with the day on which it ended. If you subscribe or buy, Smart Templates prints again immediately, in all environments, and keeps working with your templates from the trial.

---

## The “License & updates” page

*For administrators · License & updates · Page en/lizenz-seite.html*

> **In short:** On the “License & updates” page in the app “Smart Templates” you see the status of your license, the installed version and the identifier of your organization. Administrators subscribe, buy, open the customer portal and set up synchronization with the license service there. What the page shows depends on your status.

### Opening the page

1. In Dynamics 365, open the app “Smart Templates”.
2. Expand the navigation on the left and, under “Templates”, choose the entry “License & updates”. It is listed under “Smart Templates” and has a key with a blue arrow as its icon.
3. When it opens, the page asks the license service for your current status. Until the answer arrives, it shows “Checking your license …”.

With “Check again” at the top right, the page asks again, for example after a payment. When you come back from the payment page, it asks by itself.

If a user prints in another app and no license is valid, they also open the page directly from the message, see [When no license is valid](lizenz-gesperrt.html).

When it is first opened, a system administrator or someone with the role “Smart Templates – Lizenzverwaltung” chooses the language for invoices and emails, see [The language for invoices and emails](#die-sprache-fuer-rechnungen-und-e-mails). The page then appears in that language for all users. As long as none has been chosen, it appears in the language the user has set in Dynamics: German for German, English otherwise.

### Who sees the page and who may buy

All users of the app “Smart Templates” see the entry “License & updates”. The page shows everyone the status of the license and the reason if something is missing. Everyone can choose “Check again”.

Only administrators (system administrators and system customizers) and users with the security role “Smart Templates – Lizenzverwaltung” may subscribe, buy and open the customer portal. The same applies to the switch “Synchronize automatically with the license service” and to pasting a key by hand. Everyone else sees these buttons grayed out and, at the top, the note “Only administrators and the »Smart Templates – Lizenzverwaltung« role can subscribe, buy, or manage payments. Please contact your administrator.”

- “Request a quote” stays available to everyone.
- Each user switches news by email on or off for themselves, even without administrator rights, see [News](lizenz-neuigkeiten.html).
- The role “Smart Templates Designer” is not enough for buying. How to assign a role is described under [Assigning a security role](einrichtung-rolle-vergeben.html).

### What is on the page

The page consists of cards. Which ones you see depends on your status. This is what it looks like during the trial:

[Image: The “License & updates” page during the trial. At the top the heading “License & updates” and, on the right, the button “Check again”. Below it the card “Your license” with the rows “Status: Trial — 23 days left” (green), “Trial ends on 22.11.2026”, “Installed version 766” and “Organization (tenant ID)” with an identifier and the button “Copy”, the sentence “The trial covers all environments of your organization …” and the checked switch “Synchronize automatically with the license service — for license, updates and news (recommended)”. Below that the card “Continue with Smart Templates” with three offers: “Purchase + maintenance contract” (ribbon “Recommended”, €2,950, button “Buy with maintenance contract”), “Purchase” (€2,950, button “Buy”) and “Subscription” (€990 per year, button “Subscribe”), below them the button “Request a quote”.]
Caption: The page during the trial. Example with made-up data.

- **“Your license”:** the status, the installed version and the important dates, for example “Runs until” or “Updates included until”. This is also where the identifier of your organization (tenant ID) is shown with “Copy”, and, for a subscription, the number of your key. Below it is the switch “Synchronize automatically with the license service”, see [Synchronization and entering the key by hand](lizenz-abgleich.html). It is missing as long as the trial has not begun, after the trial has ended, after a subscription has ended and with the status “No valid license”.
- **“Continue with Smart Templates”:** the three offers with prices and the buttons “Buy with maintenance contract”, “Buy” and “Subscribe”, below them “Request a quote”. What happens next is described under [Buying or subscribing](lizenz-bestellen.html).
- **“Payment and contract”:** with a running subscription, even if the renewal has not been confirmed yet, and while a payment by direct debit is processing. In a verified environment, the button “Change payment method ↗” opens the Stripe page for exactly your contract, otherwise the sign-in page of the customer portal. With “Cancel subscription …” you cancel here, with “Withdraw cancellation …” you withdraw a cancellation, see [Canceling and the customer portal](lizenz-kuendigen.html). If the renewal has not been paid yet, a verified environment shows “Pay now ↗” there, otherwise a note about the link in our payment reminder.
- **“Maintenance contract”:** with a purchased license in the first year and as long as a maintenance contract is running. Here you see whether a maintenance contract is running and take one out with “Take out maintenance contract …”. If one is running, “Change payment method ↗” opens the same here as under “Payment and contract”, and “Cancel maintenance contract …” cancels it, see [The maintenance contract](lizenz-wartungsvertrag.html).
- **“Invoices”:** in a verified environment. Here you download your invoices, credit notes and cancellation invoices and pay an open invoice, see [Your invoices](lizenz-rechnungen.html).
- **“Rather buy?”:** with a subscription, even if the renewal has not been confirmed yet, with “Switch to purchase …”, see [From subscription to purchase](lizenz-umstieg.html).
- **“Updates”:** during the trial, with a subscription and with a purchased license, as soon as a newer version exists, and whether it is covered by your license. Once the first year of a purchase without maintenance contract is over, the card is always shown, with the offer for the maintenance contract, see [Updates and new versions](lizenz-updates.html).
- **“Solution file”:** with a subscription and with a purchased license in the first year or with a maintenance contract, if synchronization is switched on and the card “Updates” is not already offering the file of a new version. The card names the latest version that is covered by your license and offers it with “Download version …”, for example to import it into another environment, such as a new test or production environment. It has no “Install”: this version is already installed here. Once the first year of a purchase without maintenance contract is over, this card does not exist; the same button is then in the card “Updates” if no newer version is covered by your license anymore. If the file is not available yet, the card says so, and we send it to you on request. See [Updates and new versions](lizenz-updates.html).
- **“News”:** messages from us, see [News](lizenz-neuigkeiten.html).
- **“News by email”:** at the very bottom if automatic synchronization is switched on; here you switch it on or off for yourself.
- **“Paste key by hand”:** if the page cannot reach the license service or automatic synchronization is switched off, see [Pasting a key by hand](lizenz-abgleich.html#einen-schluessel-von-hand-einfuegen).
- **“Invoices and billing details”:** if automatic synchronization is switched on; system administrators and license management can use it. Here you verify the environment once, see [Verifying an environment](#eine-umgebung-freischalten). After that the cards “Invoices” and “Billing details” are shown there, see [Changing details and email addresses](#angaben-und-e-mail-adressen-aendern).
- **“Language for invoices and emails”** (before the purchase “Language for your future invoices and emails”): the chosen language, for all users. The same language is shown with its flag at the top right of the header bar. Only system administrators and license management can change it, see [The language for invoices and emails](#die-sprache-fuer-rechnungen-und-e-mails).

With a running subscription the page looks like this:

[Image: The “License & updates” page with a running subscription. On the left the card “Your license” with “Status: Subscription active” (green), “Runs until 11.11.2027”, “Your price €990 per year”, “Installed version 766 — up to date”, the tenant ID with “Copy”, “Key” with a key number and the checked switch “Synchronize automatically with the license service”. On the right the card “Payment and contract” with a sentence about the payment method at Stripe and about verification with several contracts, the buttons “Change payment method ↗” and “Cancel subscription …” and the sentence “To do this, verify this environment once — the button takes you there. You can also cancel by email at any time.” Below it the card “Rather buy?” with the button “Switch to purchase …” and at the very bottom the card “Invoices and billing details” with the button “Verify this environment …”.]
Caption: The page with a running subscription. Example with made-up data.

If the page has just stored a new key and none was valid before, for example after your payment, a green message appears at the top: “The license key for this environment is now stored. You can print again.”

### The language for invoices and emails

When a system administrator or someone with the role “Smart Templates – Lizenzverwaltung” opens the page for the first time, the window “Sprache wählen · Choose your language” appears, even during the trial. It is shown in German and in English. Choose “Deutsch” or “English”. The window can only be closed after you have chosen. If the choice cannot be saved, “Später wählen · Choose later” appears below the message: then you keep working, and the window asks again the next time the page is opened. Other users do not see the window.

We send you invoices, credit notes and cancellation invoices and all emails about your contract in this language, including payment reminders and dunning notices. Stripe gets it as well: the payment page and the PDF that Stripe offers for an invoice appear in it. The “License & updates” page then appears in this language for all users. News by email keeps the language that each user has chosen there for themselves. The designer stays in the language the user has set in Dynamics.

At the top right of the header bar, the chosen language is shown with its flag. A click on it changes it just like “Change …” in the card. If that is not possible right now, for example without the necessary role or in an environment that is not verified, the click leads to the card, and the card says why.

- **Before the purchase** you can change the language at any time: in the card “Language for your future invoices and emails” with “Change …”, at the top right via the flag, or in the window “Billing details” with “Change” next to “Invoices and emails in:”. Until then it applies only to this environment. With the first purchase it becomes the language of your contract, with direct debit once your payment has arrived.
- **After the purchase** you change it only in a verified environment, see [Verifying an environment](#eine-umgebung-freischalten): choose “Change …” or the flag at the top right and confirm the question with “Switch”. The new language then applies to your whole organization. We send a message about it, in German and English, to the address that also receives the codes. Invoices we have already sent you stay unchanged.
- If this is not possible on the page, for example because automatic synchronization is switched off or your direct debit has not been confirmed yet, write to us. We then switch the language for you.

> **Good to know:** The Stripe invoice page, for example behind the payment link in a payment reminder, and the sign-in to the customer portal appear in the language of your browser. The PDF that Stripe offers there comes in the chosen language. The page that “Change payment method ↗” opens in a verified environment also appears in the chosen language.

### Verifying an environment

On the page, you can only view invoices, cancel and change the billing details once you have verified the environment. This way only authorized people see your invoices.

1. Open “License & updates” in the environment you want to verify. For this you need the role “System Administrator” or “Smart Templates – Lizenzverwaltung”.
2. In the card “Invoices and billing details”, choose the button “Verify this environment …” and then “Send code”.
3. We send a code with eight digits to your administration email. If you have not entered one, it goes to your invoice email. Tell whoever reads that mailbox beforehand.
4. Type the code into the window and choose “Verify”. The code is valid for 60 minutes. After five wrong entries, request a new one.
5. After that we send a message to the same address saying that the environment is verified. It contains a link with which you remove the verification again.

You can close the window and continue later. The page remembers that a code is on its way and opens the window right at the input field. Do not request a new code then, otherwise the first one stops working.

> **Caution:** Whoever has the code can view invoices, cancel and change details for your company, even without access to your Dynamics. Pass it on only to colleagues who have just clicked “Send code” themselves. We never ask for this code.

A verification stays valid as long as the environment uses it. It ends after twelve months without use and when the address that receives the codes changes. After that you simply verify the environment again. You verify each environment individually; a copy of an environment does not take over the verification.

Once the environment is verified, the card shows:

- since when it has been verified and when it was last used,
- the list “Verified environments” of your organization; an environment that has only been reporting for a few days is marked,
- “Remove verification …” for this environment and “Remove all others …” for all the others; we send a message about this,
- the list “Who did what here”. It is stored only in your Dynamics, we do not see it.

### Changing details and email addresses

You change the details on your invoices yourself, in a verified environment and with the role “System Administrator” or “Smart Templates – Lizenzverwaltung”. The card “Billing details” shows company, address, country, VAT ID, purchase order number, invoice email and administration email as they currently stand at our payment service Stripe.

**Company, address, VAT ID and purchase order number:**

1. Choose “Change details …”.
2. Change the fields and choose “Save”.

The change applies immediately to all future invoices; invoices we have already sent stay as they are. After that we send a message with “before → after” to the address that also receives the codes, with a link that removes all verifications in case you did not initiate the change. We change the country for you because it determines the VAT; write to us. Stripe checks a new VAT ID with the EU; if it is invalid, we get in touch with you.

> **Good to know:** Stripe creates the invoice for a renewal about an hour before the charge. If you change your details during exactly that hour, this one invoice still carries the previous ones. We see this and get in touch with you.

**The invoice email:**

1. Choose “Change invoice email …” and enter the new address twice.
2. Choose “Send code”. We send a code with eight digits to the new address; this is how we know it is correct.
3. Enter the code and choose “Continue”.
4. We send an email with a link to the previous address. Whoever reads that mailbox opens it within seven days, types the part of the new address after the @ to confirm, and chooses “Confirm”.

Until then, the card says that the new address is awaiting confirmation; with “Discard change” you cancel. If the page reports that the email asking for confirmation may not have arrived, the change is still waiting. If the email did not arrive, discard the change with “Discard change” and try again later. The link only works as long as the environment in which you requested the change is verified; if you remove its verification, for example with the link in the email, nothing changes. After confirmation the new address applies immediately: invoices, payment reminders and, if you have not entered an administration email, all messages go there. Both addresses receive a message; the previous one with a link that undoes the change for 30 days. It restores both addresses to what they were before the change and ends all verifications. During these 30 days the addresses cannot be changed again on the page, so that the link stays effective; if it is urgent, write to us.

**The administration email:** With “Enter administration email …” you add one, with “Change administration email …” you change it, with “Remove administration email …” you remove it. Entering and changing work like the invoice email: code to the new address, then confirmation by link. When you enter it for the first time, your invoice email confirms; when you change or remove it, the previous administration email does; removing needs no code.

> **Caution:** You can change an address at the earliest 72 hours after this environment was verified. This gives whoever reads the mailbox time to see our message about the verification. If the address that receives the codes changes, all verifications end except for the environment in which you requested the change.

If nobody reads the previous address anymore, write to us. We then change it following a fixed procedure: the new address confirms a link, the previous one receives a message, and after seven days without objection the new one applies. All verifications end in the process.

### What the status means

| Status on the page | What it means | What you do |
|---|---|---|
| “Trial not started yet” | Nobody in your organization has opened the designer yet. | Open the designer if you want to test, or subscribe right away. |
| “Trial — 12 days left” | The trial is running. From seven days remaining, the status appears in orange. | Subscribe in good time if you want to keep working. |
| “Trial expired” | No more documents are created. Templates and settings are kept. | Subscribe or buy. |
| “Subscription active” | The subscription runs until the day under “Runs until” and then renews by one year unless canceled. If you have canceled effective at the end of the term, “Subscription active” is also shown until then, with the addition “canceled, does not renew”; we have confirmed the cancellation to you by email, see [Canceling the subscription](lizenz-kuendigen.html#das-abo-kuendigen). | Nothing. |
| “Subscription — renewal not confirmed” | The payment for the new year is still processing, for example by direct debit, or it has failed. Smart Templates keeps printing with a transitional key until the day the page names. | With direct debit, wait; otherwise check the payment, see [If a renewal has not been paid](lizenz-bezahlen.html#wenn-eine-verlaengerung-nicht-bezahlt-ist). |
| “Subscription — term ended” | The term is over, for example after a cancellation. The stored key remains valid for up to seven more days. | Subscribe again if you want to keep working, see [Coming back](lizenz-kuendigen.html#wieder-einsteigen). |
| “Subscription expired” | No more documents are created. Templates and settings are kept. | As above. |
| “Payment processing” | You subscribed by direct debit, and the bank has not confirmed the payment yet. Smart Templates prints with a provisional key; the row “Provisional key valid until” names its end. | Nothing, see [Direct debit: not an instant payment](lizenz-bezahlen.html#lastschrift-keine-sofortzahlung). |
| “Payment not received” | The direct debit your provisional key belongs to has not been received. The provisional key remains valid until the day the page names and then ends by itself. | Check the payment or subscribe again, see [If the direct debit is not received](lizenz-bezahlen.html#wenn-die-lastschrift-nicht-eingeht). |
| “Purchased — perpetual” | You have bought. In the first year, the row “Updates included until” shows until when you get new versions; with a maintenance contract, the card “Maintenance contract” (“Runs until”) does; after that, the row “Updates” (“ended on …”) does. | Take out a maintenance contract if needed. |
| “No valid license” | Neither a trial nor a license is valid, for example after an aborted purchase. | If your organization has not used the trial yet, it starts as soon as you open the designer. Otherwise subscribe or write to us. |

If the page cannot reach the license service or automatic synchronization is switched off, it shows the status of the key stored in this environment, for example “Subscription — stored key valid until …” or “No valid key stored”, and below it a row “License service”. What applies then is described under [Synchronization and entering the key by hand](lizenz-abgleich.html).

> **Good to know:** If your subscription has expired, you see two different days. In the row “Term ended on”, the page names the end of the paid term. The message when printing names the day on which the stored key expired; it remains valid for up to seven days longer ([§ 5(6)](https://smart-templates.eu/en/license-terms.html#p5)).

---

## Buying or subscribing

*For administrators · License & updates · Page en/lizenz-bestellen.html*

> **In short:** An administrator chooses the offer in Dynamics on the “License & updates” page, enters the billing details the first time (company, address, country, VAT identification number and invoice email) and pays on the Stripe payment page. With the payment and your confirmation of the license terms, the order is placed; there is no signature on paper. After the payment your license key arrives by itself, and you receive the invoice as an e-invoice by email.

### Before you order

- **Rights:** Administrators and users with the role “Smart Templates – Lizenzverwaltung” can order, see [Who sees the page and who may buy](lizenz-seite.html#wer-die-seite-sieht-und-wer-kaufen-darf).
- **Synchronization:** The switch “Synchronize automatically with the license service” must be switched on, because the purchase runs through the license service.
- **Quote:** If your purchasing department needs a formal quote beforehand, request it with the form [Request a quote](https://smart-templates.eu/en/contact.html?anliegen=angebot), see [Quote and payment](#angebot-und-zahlung).
- **Billing details:** Have your company name and address, the country of your billing address and your VAT identification number ready. For companies in an EU country other than Germany, the number is mandatory.
- **Purchase order number:** If your purchase order number is to appear on the invoices, have it ready as well. You enter it with your first purchase in the window “Billing details”.
- **Invoice email:** Decide beforehand which email address you will enter. Invoices, payment reminders and all messages about your contract go there, and you use it to sign in to the customer portal. You enter it twice in the window “Billing details”. Do not use an address that only imports documents automatically, such as the document address of your accounting software: messages that someone needs to read promptly also go there.
- **Administration email:** Optional. If you enter it, messages about managing your license go there, such as cancellation confirmations, notes on the maintenance contract and license keys. Invoices still go to the invoice email, payment reminders and dunning notices to both addresses. You enter it twice as well.
- **Payment method:** With a card, the payment is confirmed immediately. With a direct debit, your bank confirms it only after a few days, see below.

> **Tip:** As the invoice email, use a mailbox that is not tied to a single person, for example accounting@contoso.com. That way invoices and reminders still arrive when someone leaves the company. If an address is to be changed later, you can do that on “License & updates”, see [Changing details and email addresses](lizenz-seite.html#angaben-und-e-mail-adressen-aendern).

### Step by step

1. In the app “Smart Templates”, open the page “License & updates”.
2. In the card “Continue with Smart Templates”, choose your offer: “Buy with maintenance contract”, “Buy” or “Subscribe”.
3. With your first purchase, the window “Billing details” opens. Enter company, street and number, postal code and city, and optionally an address line 2. Choose the country of your billing address and enter your VAT ID: mandatory for companies in an EU country other than Germany, optional in Germany; outside the EU the window does not ask for it. The window shows which VAT applies and in which language invoices and emails will come; with “Change” next to it you switch the language. Below that you optionally enter “Your PO number”, which then appears on every invoice, including renewals. Then enter your invoice email twice and, if you like, an administration email, also twice. Choose “Continue to payment page”.
4. The Stripe payment page opens in a new tab. If your browser blocks the tab, choose the link “Open payment page” on the page.
5. On the payment page, check the product, price, VAT and term.
6. Choose the payment method and enter your payment details, see [What you enter on the payment page](#was-sie-auf-der-bezahlseite-angeben). **Direct debit is not an instant payment:** your bank usually confirms it within 8 business days. With a card, the payment is confirmed immediately.
7. Check the box “I am ordering as a business or public body (not as a consumer) and accept the license terms”.
8. Complete the payment with Stripe’s button. Its label depends on the offer.
9. Then return to Dynamics. The “License & updates” page fetches your key by itself as soon as you return to it; otherwise choose “Check again”.

[Image: The window “Billing details” with the sentence “These details appear on your invoice. Country and VAT ID determine the VAT. On the payment page you then only enter your payment details — your invoice email is already filled in there.” and the empty fields “Company”, “Street and number”, “Address line 2 (e.g. department, building) (optional)”, “Postal code” and “City”, the selection field “Country of the billing address” with “Deutschland” and the field “VAT ID (optional)” with the gray example “DE123456789” and the sentence “It appears on your invoice.”; below it, highlighted in blue, “VAT: 19% (Germany)” and the row “Invoices and emails in: German” with the button “Change”. Next come “Your PO number (optional)” with the sentence “Appears on every invoice, including renewals.”, the fields “Invoice email” and “Repeat invoice email” with two sentences about the address, the fields “Administration email (optional)” and “Repeat administration email” with a sentence about it, and at the bottom the buttons “Continue to payment page” and “Cancel”.]
Caption: Step 3: the window “Billing details” for a company in Germany.

> **Caution:** **Direct debit is not an instant payment.** If you pay by SEPA direct debit, your bank usually confirms the payment within 8 business days, sometimes later. Only then is your order complete. With a card, the payment is confirmed immediately. What applies during the wait is described under [Direct debit: not an instant payment](lizenz-bezahlen.html#lastschrift-keine-sofortzahlung).

> **Good to know:** A payment page is valid for one hour. If it has expired, start the order on “License & updates” again. If you click twice or order in a second tab, you get the same payment page.

### What you enter on the payment page

- **Email address:** Your invoice email is already filled in there and cannot be changed on the payment page.
- **Billing address:** Company, address, country and VAT ID come from the window “Billing details”; the payment page does not ask for them again. If the VAT is not right, we correct the invoice, see [VAT](lizenz-bezahlen.html#umsatzsteuer).
- **Payment method and payment details:** Card or SEPA direct debit, see [The payment methods](lizenz-bezahlen.html#die-zahlarten).

The payment page appears in the language you chose for invoices and emails: German or English, see [The language for invoices and emails](lizenz-seite.html#die-sprache-fuer-rechnungen-und-e-mails). You enter your card or account details only at Stripe. They do not touch our pages, and we do not receive them.

### How the contract is concluded

You don’t need a signature, neither for the subscription nor for the purchase nor for the maintenance contract. The contract is formed online ([§ 1(4)](https://smart-templates.eu/en/license-terms.html#p1)):

1. You order in Dynamics on the “License & updates” page.
2. On the payment page you see the product, price and term and confirm the license terms.
3. The contract is concluded when we confirm your order in text form or make the license key available to you. Normally that is the key that arrives by itself after the payment.

You take out the maintenance contract the same way: with a purchase via “Buy with maintenance contract” or later, see [The maintenance contract](lizenz-wartungsvertrag.html).

The invoice you receive by email serves as the document for your records. You can view, print and save the license terms in the version valid at the time of the contract on the website.

### Quote and payment

- **Quote:** Via [Request a quote](https://smart-templates.eu/en/contact.html?anliegen=angebot) you receive a formal quote with a quote number, valid for 30 days, with prices net and with VAT. You still order in Dynamics afterwards. What is expressly agreed in the quote takes precedence over the license terms.
- **Paying:** After a quote too, you pay on the Stripe payment page, by card or SEPA direct debit. We do not offer payment on account. You enter your purchase order number with your first purchase in the window “Billing details” (step 3 above); it then appears on every invoice.

### After the payment

- **Confirmation page:** After the payment, Stripe redirects you to our website, in German or English depending on the language of the payment page. It says what happens next. If you canceled the payment, it says that nothing was charged. You can close this tab.
- **Key:** Your key arrives by itself. In the environment where you ordered, the “License & updates” page fetches it as soon as you return to it, or with “Check again”; the top of the page then shows in green that the key has been stored. Every other environment fetches it when the designer is opened or, at the latest, with the next print that would otherwise be blocked.
- **Invoice:** The invoice comes as an e-invoice (PDF with embedded invoice data) by email: to your invoice email. We send older invoices again on request.
- **Trial:** If a trial was still running, it ends now. The term of the subscription and, with a purchase, the first year of maintenance begin with the conclusion.
- **Direct debit:** If you paid by direct debit, the order is only complete once your bank has confirmed the payment, usually within 8 business days. What applies in the meantime is described under [Direct debit: not an instant payment](lizenz-bezahlen.html#lastschrift-keine-sofortzahlung).

If “License & updates” still shows the old status a quarter of an hour after the payment, write to us using the [contact form](https://smart-templates.eu/en/contact.html). Give us your invoice email and the tenant ID of your organization; it is shown on “License & updates”. We don’t need payment details, so please don’t send any. In this case, do not buy a second time before we have replied.

### If you are already a customer

If your organization has already paid with us, for example for an earlier subscription or a purchase, the page does not open the payment page in the browser. It sends the payment link to your invoice email, with the subject “Smart Templates: your payment link”, and reports: “We have sent the payment link to your invoice email.” The link is valid for 24 hours. You can request a new link after an hour has passed. This way nobody who only knows the identifier of your organization sees your name or address.

The page then does not ask for the billing details; your details from the last order apply. If you filled in the window anyway, for example because the page still took your organization for a new customer, we do not take the details over and tell you so on the page. If your details have changed, change them before the order on “License & updates” in the card “Billing details”, see [Changing details and email addresses](lizenz-seite.html#angaben-und-e-mail-adressen-aendern); we change only the country for you, write to us.

### If the page rejects the purchase

The page says in one sentence why a purchase is not possible right now. The most common reasons:

- Your organization has already bought Smart Templates. A second purchase is not needed.
- A subscription is already running for your organization. A second one is not needed. If you want to buy instead, read [From subscription to purchase](lizenz-umstieg.html); from a subscription you switch to the plain purchase, and you take out the maintenance contract afterwards.
- A maintenance contract is only available with a purchased license.
- You already received a payment link within the last hour. Check your mailbox.
- A detail in the window “Billing details” is missing or was not accepted, for example company, address, VAT ID or invoice email. Check the details there; if something is missing, the page reopens the window by itself.
- A payment of your organization is still processing, for example a direct debit. Wait for the confirmation.
- Automatic synchronization is switched off. Buying works only with synchronization switched on; switch it on on the page or request a quote.
- The payment service or the license service cannot be reached right now. Try again a few minutes later.

---

## Payment, invoices and renewal

*For administrators · License & updates · Page en/lizenz-bezahlen.html*

> **In short:** You pay through Stripe, by card or SEPA direct debit. A card payment is confirmed immediately, a direct debit only when your bank confirms it, usually within 8 business days. You receive invoices as e-invoices by email. Subscription and maintenance contract renew by themselves every year. If the charge for a renewal fails, we remind you, and Smart Templates keeps printing for the time being.

> **Caution:** **Direct debit is not an instant payment.** If you pay by SEPA direct debit, your bank usually confirms the payment within 8 business days, sometimes later. Only then is your order complete. When you take out a subscription or a purchase, Smart Templates prints with a provisional key during this time; you don’t need to do anything. A card payment is confirmed immediately.

### The payment methods

You pay on the Stripe payment page by card or by SEPA direct debit. We do not offer payment on account.

| Payment method | When the payment is confirmed | What applies in the meantime |
|---|---|---|
| Card | immediately | Your key arrives right after the payment. |
| SEPA direct debit | usually within 8 business days, sometimes later | When you take out a subscription or a purchase, a provisional key, see below. |

### Direct debit: not an instant payment

With a SEPA direct debit, Stripe submits the payment to your bank on the same or the next business day. The bank usually confirms it within 8 business days. There is no fixed upper limit. Until then your payment counts as “processing”.

- While a payment is processing, you cannot order anything else for your organization. The “License & updates” page tells you so. A second purchase is not needed.
- With direct debit, you grant a SEPA direct debit mandate on the payment page. It also applies to the later annual charges for a subscription or maintenance contract.
- Stripe announces direct debit charges to you beforehand by email.

### What applies during the wait

- **Taking out a subscription or a purchase**, also with a maintenance contract and also when coming back: you immediately receive a **provisional key**. Smart Templates prints with it in all environments. It is valid for **28 days at most** from the conclusion. As soon as the bank confirms the payment, your regular key arrives by itself ([§ 4(6)](https://smart-templates.eu/en/license-terms.html#p4)). In the meantime “License & updates” shows “Payment processing” and the row “Provisional key valid until”. If the payment is still not confirmed after 28 days, the provisional key ends anyway; then no documents are created until the bank confirms. After that your regular key arrives by itself.
- **Renewal of a subscription:** Smart Templates keeps printing with a transitional key until the payment is confirmed, until 21 days after the start of the new contract year at the most; in individual cases we can extend the period ([§ 4(7)](https://smart-templates.eu/en/license-terms.html#p4)). See [If a renewal has not been paid](#wenn-eine-verlaengerung-nicht-bezahlt-ist).
- **Maintenance contract, taken out later:** Your purchased version keeps printing anyway. A version that was released only after the end of your maintenance prints as soon as the payment is confirmed.
- **Switching from subscription to purchase:** Your subscription keeps running until the payment for the purchase is confirmed, see [From subscription to purchase](lizenz-umstieg.html).

### If the direct debit is not received

- **After 14 days without confirmation:** If your payment is still not confirmed after 14 days, we look into the case and get in touch with you.
- **The direct debit for a purchase fails:** Then you do not get a regular key. The provisional key ends by itself 28 days after the conclusion at the latest; after that no more documents are created, your templates are kept. “License & updates” then shows “Payment not received”. We cancel the open purchase invoice. If you had also chosen the maintenance contract, nothing is charged for it either; we end it. You can then buy or subscribe again, for example by card.
- **The first direct debit for a subscription fails:** The first subscription invoice stays open. If you pay it later after all via the link in the invoice, the payment counts: your key then arrives by itself. Otherwise the provisional key ends as with a purchase.
- **A direct debit is reversed later:** Then the payment is missing again. We examine such cases individually. What applies in the event of late payment is set out in the license terms ([§ 5(5)](https://smart-templates.eu/en/license-terms.html#p5)).

### Invoices

- You receive invoices, credit notes and cancellation invoices as e-invoices by email ([§ 4(4)](https://smart-templates.eu/en/license-terms.html#p4)): to your invoice email. Keep the address up to date. You change it in a verified environment on “License & updates” with “Change invoice email …”, see [Changing details and email addresses](lizenz-seite.html#angaben-und-e-mail-adressen-aendern).
- In a verified environment, you download your invoices on “License & updates” in the card “Invoices”, see [Your invoices](lizenz-rechnungen.html). On request we also send you an invoice again by email.
- The purchase is invoiced with the order. Subscription and maintenance contract are invoiced annually in advance, a maintenance contract chosen with the purchase only from the second year.
- With a purchase with maintenance contract, the purchase invoice shows, next to the purchase, a Stripe line of €0.00 with the words “Free trial”. That is the first year of maintenance, which is included in the purchase price. Below it is the note “Maintenance in the first year is included in the purchase price; the maintenance contract is billed annually from …” with the day of the first charge. The annual invoices after that say “Maintenance contract for the perpetual license; the first year was included in the purchase price.”, see [The maintenance contract](lizenz-wartungsvertrag.html#gleich-beim-kauf-abschliessen).
- Your VAT ID appears on the invoice, as does your purchase order number if you entered one with your first purchase.

The e-invoice is a PDF in which the invoice data is embedded as a file (ZUGFeRD / Factur-X, profile EN 16931). Programs that read e-invoices take over the data from it; you can view and print the PDF as usual. We do not send a pure XRechnung (XML only). If you, as a public contracting authority, require an XRechnung, write to us before ordering using the [contact form](https://smart-templates.eu/en/contact.html).

### VAT

All prices are net prices plus statutory VAT ([§ 4(3)](https://smart-templates.eu/en/license-terms.html#p4)). Which VAT applies depends on the country and VAT ID that you enter in the window “Billing details” before the payment page:

| Your company is based … | VAT | Line on the invoice |
|---|---|---|
| in Germany | 19% | “USt. / VAT” |
| in another EU country (VAT ID mandatory) | 0%, you owe the tax (reverse charge) | “Reverse Charge / Steuerschuldnerschaft Empfänger” |
| outside the EU | 0% | “Nicht im Inland steuerbar / Not taxable in Germany” |

- We check your VAT ID when you order. If it is not valid, we get in touch with you and correct the invoice.
- If you are already a customer, the country and VAT ID from your last order apply. You do not change your VAT ID in the customer portal but on “License & updates” in the card “Billing details”. We change the country for you; write to us.
- A subscription keeps the VAT of its first payment page for all renewals.

### The annual renewal

Subscription and maintenance contract renew by twelve months every year on the same day. Stripe then charges the stored payment method. Your new annual key arrives by itself; you don’t need to do anything. If you do not want to renew, cancel on the day before that day at the latest, see [Canceling and the customer portal](lizenz-kuendigen.html).

> **Good to know:** Smart Templates fetches the new annual key of your subscription when someone opens the designer or the “License & updates” page. If nobody does, it asks once a day in the background during the last eight days before the stored key ends. The jobs for [keeping warm](einrichtung-warmhalten.html) take care of that; an environment has them as soon as a template has been saved or the designer has been opened there once. At the latest, a print that would otherwise be blocked asks once. With a maintenance contract, your purchased key does not expire anyway; the next opening of the designer or the page fetches the new one with the later end of your maintenance. Details are described under [When Smart Templates asks the license service](lizenz-abgleich.html#wann-smart-templates-den-lizenzdienst-fragt). If automatic synchronization is switched off, none of this works; then we send you the new key by email on request, see [Synchronization and entering the key by hand](lizenz-abgleich.html).

About 30 days before the first charge of a maintenance contract chosen at purchase, we send you an email, see [Taking it out right at purchase](lizenz-wartungsvertrag.html#gleich-beim-kauf-abschliessen).

### If a renewal has not been paid

If the charge for a new year of your subscription fails, for example because of an expired card, Smart Templates first keeps printing with a transitional key. Counting starts on the first day of the new contract year ([§ 4(7)](https://smart-templates.eu/en/license-terms.html#p4)):

| Day | What happens |
|---|---|
| Day 0 | The charge has failed. You receive a reminder by email with a link that you use to check your payment details. Smart Templates keeps printing. |
| Day 7 | First dunning notice. It names the day from which no more documents are created. |
| Day 14 | Final dunning notice. If you need more time or want to end the subscription, reply to this email. |
| Day 21 | The transitional key ends. No more documents are created, not even through buttons or flows. Your templates are kept. |

As soon as the payment arrives, even after day 21, Smart Templates works again without further action; it fetches the new key at the next synchronization or the next print. In individual cases we can extend the period. You find the link for paying in every reminder. In a verified environment it is also on “License & updates” as “Pay now ↗” in the card “Payment and contract” and in the card “Invoices”, see [Paying an open invoice](lizenz-rechnungen.html#eine-offene-rechnung-bezahlen).

### If maintenance has not been paid

If the annual charge for your maintenance contract cannot be made, you receive a reminder by email once. Your purchased version keeps printing unchanged; there is no block. Until the payment arrives, there are just no new versions ([§ 4(7)](https://smart-templates.eu/en/license-terms.html#p4)), and a version that was released after the end of your maintenance does not print ([§ 8(5)](https://smart-templates.eu/en/license-terms.html#p8)).

---

## Your invoices

*For administrators · License & updates · Page en/lizenz-rechnungen.html*

> **In short:** We send you invoices, credit notes and cancellation invoices as e-invoices by email to your invoice email. On the “License & updates” page you can also download them from the card “Invoices”, in every environment you have verified once. If an invoice is still open, you pay it there with “Pay now ↗”.

### Where you see your invoices

1. In the app “Smart Templates”, open the page “License & updates”.
2. If this environment is not verified yet, the page shows the card “Invoices and billing details” with the button “Verify this environment …”. How this works is described under [Verifying an environment](lizenz-seite.html#eine-umgebung-freischalten).
3. After that, the page shows the card “Invoices”: for each document the date, number, type, amount and status, the newest at the top. With “Show older” you see more.

The card is visible to users with the role “System Administrator” or “Smart Templates – Lizenzverwaltung”. Other users do not see the card “Invoices”; the card “Invoices and billing details” only tells them who may verify the environment.

### What the list shows

- **Type:** invoice, credit note or cancellation invoice.
- **Number:** the number printed on the document.
- **Status:** “sent”. A canceled invoice is shown as “canceled (see …)” with the number of the cancellation invoice; a cancellation invoice or a credit note as “for …” with the number of the invoice it belongs to.

The list only shows documents we have sent you by email. Invoices from the time before we sent e-invoices are not listed; if you need one of them, write to us.

### Downloading an invoice

In the row of the document, choose “Download PDF”. Your browser saves the file under the number of the document, for example “R-2026-001.pdf”. It is the same e-invoice as in the email: a PDF with the invoice data for your accounting embedded in it. Before the page saves the file, it checks that it is exactly the file we keep on record. If something does not match, it saves nothing and reports “The invoice could not be loaded just now …” with a code; please try again later.

### Paying an open invoice

If a payment is open, for example because your card was declined at the renewal, the list is headed by “An invoice is still open.” with the button “Pay now ↗”. It opens the invoice page of our payment provider Stripe in a new tab. There you pay by card or direct debit. Without verification you find the same link in our payment reminder, see [If a renewal has not been paid](lizenz-bezahlen.html#wenn-eine-verlaengerung-nicht-bezahlt-ist).

> **Good to know:** Invoices always go to your invoice email. If you need a document by email again, also to your administration email, write to us. You change the company, address, VAT ID, purchase order number and the invoice email for future invoices in the card “Billing details”, see [Changing details and email addresses](lizenz-seite.html#angaben-und-e-mail-adressen-aendern).

---

## The maintenance contract

*For administrators · License & updates · Page en/lizenz-wartungsvertrag.html*

> **In short:** With the maintenance contract, you get new versions, adaptation to changes by Microsoft, and support for your purchased license after the first year as well. It costs €359 per year (net) and is optional. The easiest way is to choose it right at the purchase; it is then charged only from the second year. Without a maintenance contract, your purchased version keeps printing perpetually; what then no longer belongs to it is described under [Without a maintenance contract](#ohne-wartungsvertrag).

### What maintenance covers

- **Updates:** all new versions that we release generally. We decide what an update contains; there is no entitlement to particular new features ([§ 8](https://smart-templates.eu/en/license-terms.html#p8)).
- **Adaptation to Microsoft:** If Microsoft changes the platform so that Smart Templates no longer works as described, we adapt it within a reasonable period, as far as technically possible.
- **Support:** We accept reports of errors, examine them and fix confirmed errors, usually with an update. Support is available in German and English, in English in writing only. There are no fixed response times. Questions about operation and about designing templates are not included; this manual answers them ([§ 9](https://smart-templates.eu/en/license-terms.html#p9)).

With a subscription, maintenance is always included. A maintenance contract therefore exists only for a purchased license.

### The first year is included in the purchase price

With a purchase, maintenance for the first twelve months is included. The first year ends on the anniversary of the purchase: if you buy on June 1, 2027, maintenance is included up to and including June 1, 2028. You see the day on “License & updates”: after a purchase without maintenance contract in the row “Updates included until”, after a purchase with maintenance contract in the card “Maintenance contract” under “Runs until”, together with the sentence “… you can cancel free of charge up to and including …”.

### Taking it out right at purchase

On “License & updates”, choose the button “Buy with maintenance contract”. You then pay in a single payment process:

- **Today:** the purchase price of €2,950 (net).
- **On the day after the anniversary:** for the first time the maintenance contract, €359 (net) for one year. For a purchase on June 1, 2027, that is June 2, 2028. You don’t need to do anything for this; it is charged via the payment method you gave at the purchase.
- **After that:** every year on the same day, until you cancel.

In the first year, the card “Maintenance contract” on “License & updates” says: “Unless you cancel, billing starts on 02.06.2028; you can cancel free of charge up to and including 01.06.2028.” About 30 days before the first charge, we also send you an email with the subject “Smart Templates: your maintenance contract starts on …”. It names the day of the charge, the amount and the last day on which you can still cancel free of charge.

[Image: Excerpt of the “License & updates” page after a purchase with maintenance contract. On the left the card “Your license” with “Status: Purchased — perpetual” (green), “Installed version”, the tenant ID and the checked switch “Synchronize automatically with the license service”. On the right the card “Maintenance contract” with the label “optional”, “Status: active”, “Runs until 01.09.2027”, the sentence “Unless you cancel, billing starts on 02.09.2027; you can cancel free of charge up to and including 01.09.2027.”, a sentence about the payment method at Stripe and about verification with several contracts, the buttons “Change payment method ↗” and “Cancel maintenance contract …” and the sentence “To do this, verify this environment once — the button takes you there. You can also cancel by email at any time.”]
Caption: In the first year after a purchase with maintenance contract. Example with made-up data.

> **Good to know:** Stripe calls the first year of the maintenance contract, which is included in the purchase price, a “free trial” on the payment page, on the invoice and in the customer portal, and counts the free days on the payment page. This is fixed text from Stripe. No test is meant: it is the first year of maintenance that you have already paid for with the purchase price. In Stripe your contract is called “Smart Templates – Wartungsvertrag / Maintenance contract”. On the purchase invoice there is the note “Maintenance in the first year is included in the purchase price; the maintenance contract is billed annually from …” with the day of the first charge, and on the annual invoices after that “Maintenance contract for the perpetual license; the first year was included in the purchase price.”

### Taking it out later

You can also take out the maintenance contract after the purchase, with “Take out maintenance contract …” on “License & updates” ([§ 4(2)](https://smart-templates.eu/en/license-terms.html#p4)): in the first year in the card “Maintenance contract”, after that in the card “Updates”. We then send the payment link to your invoice email, see [If you are already a customer](lizenz-bestellen.html#wenn-sie-schon-kunde-sind).

- **Taken out in the first year:** The maintenance contract normally begins at the end of the first year and is charged only then. You pay the maintenance price that was valid on the day of your purchase; the page names the last day for this. About 30 days before the end of the first year, we remind you with an email “Smart Templates: your maintenance ends on …” if you bought via the payment page and do not have a maintenance contract yet; if we set up your purchase for you by hand, this email does not come. The first invoice of the maintenance contract (€0, at the conclusion) says “Maintenance in the first year is included in the purchase price; the maintenance contract is billed annually from …”, the annual invoices say “Maintenance contract for the perpetual license; the first year was included in the purchase price.”
- **Taken out in the last three days of the first year:** If you request the payment link only that late, the maintenance contract begins with the conclusion, and Stripe charges the first year immediately. There is then no €0 invoice. If you want to avoid that, take it out earlier.
- **Taken out after the first year:** The maintenance contract begins with the conclusion. The price valid at that time applies ([§ 4(5)](https://smart-templates.eu/en/license-terms.html#p4)).
- **Back-billing:** If you take it out only after the first year, or resume maintenance after a cancellation, we may bill the time without maintenance retroactively, for two years at most and at the price valid at that time at most. We tell you about any back-billing before the conclusion; if we name none, it does not apply ([§ 5(3)](https://smart-templates.eu/en/license-terms.html#p5)).

### Renewal and price

The maintenance contract runs for twelve months and renews by twelve months each time ([§ 5(2)](https://smart-templates.eu/en/license-terms.html#p5)). It is charged annually in advance. Your price stays the same as long as the contract runs without interruption. New prices apply only to new contracts ([§ 4(5)](https://smart-templates.eu/en/license-terms.html#p4)).

If a renewal cannot be charged, you receive a reminder by email. Your purchased version keeps printing; until the payment arrives, there are just no new versions ([§ 4(7)](https://smart-templates.eu/en/license-terms.html#p4)). More on this under [If maintenance has not been paid](lizenz-bezahlen.html#wenn-die-wartung-nicht-bezahlt-ist).

### Canceling

You cancel the maintenance contract at any time, effective at the end of the current term: on “License & updates” with “Cancel maintenance contract …” in the card “Maintenance contract”, or by email. Until the end of the term you can withdraw the cancellation there with “Withdraw cancellation …”. In a verified environment, the card also shows whether your maintenance contract is canceled: “Canceled as of …”. How this works is described under [Canceling the maintenance contract](lizenz-kuendigen.html#den-wartungsvertrag-kuendigen).

> **Caution:** If you chose the maintenance contract at the purchase and do not want it after all, cancel it **on the anniversary of your purchase at the latest**. Nothing is charged then ([§ 5(2)](https://smart-templates.eu/en/license-terms.html#p5)). In the years after that, cancel on the day **before** the date that “License & updates” names in the card “Maintenance contract” under “Runs until” at the latest. If a contract year has already been charged, the contract runs until the end of that year, and the annual amount is not refunded pro rata ([§ 5(8)](https://smart-templates.eu/en/license-terms.html#p5)).

### Without a maintenance contract

Your purchased license stays perpetual. Without maintenance, the following applies ([§ 8(5)](https://smart-templates.eu/en/license-terms.html#p8)):

- You may use all versions released up to the end of your maintenance perpetually and may still install them.
- Versions released after that do not create documents without a maintenance contract.
- You no longer get support, and we no longer adapt older versions to changes by Microsoft. If Microsoft changes the platform, an older version may therefore at some point no longer work as described.

On “License & updates”, the row “Updates” then says “ended on …”, and the card “Updates” offers the maintenance contract. If you take out a maintenance contract later, a newer version prints as well as soon as the payment is confirmed. How to check whether a version is covered by your license is described under [Updates and new versions](lizenz-updates.html).

---

## From subscription to purchase

*For administrators · License & updates · Page en/lizenz-umstieg.html*

> **In short:** You can switch from the subscription to a purchase at any time. What you have paid for the current term of your subscription but not yet used up is credited against the purchase price by the day. You see the amount before you pay. Your subscription ends as soon as the purchase is paid.

### What the license terms promise

You can switch from the subscription to a purchase at any time. The subscription then ends immediately, and the fee for the unused part of the term is credited pro rata against the purchase price. We show you the amount before you pay ([§ 5(7)](https://smart-templates.eu/en/license-terms.html#p5)).

### How the credit is calculated

- **The basis** is the net amount that you paid for the current term of your subscription and that has remained paid; credit notes, refunds and chargebacks are deducted. If you have an older, lower price, that one counts, not today’s list price.
- **Every day has the same value:** the amount paid divided by the days of the term. That is 365 days, 366 in a term with a February 29.
- **The days credited** are those from the day of the switch to the end of the term. The day of the switch counts in your favor.
- **Rounding** is commercial rounding to the cent.
- **VAT:** The credit reduces the net purchase price. The payment page calculates the VAT on the remainder.
- **Open subscription invoice:** If the invoice for the current term has not been paid yet, for example because the renewal has not been confirmed, nothing is credited. You can still switch. As soon as the purchase is paid, the open subscription invoice is canceled. If you still pay a subscription invoice after receiving the link and then complete the switch, we refund this subscription invoice in full.

### A calculation example

A company in Germany has a subscription for €990 net per year. The term runs from November 1, 2026 to October 31, 2027. On December 1, 2026 it switches to a purchase.

| Step | Amount |
|---|---|
| Days of the term | 365 |
| Unused days, December 1, 2026 to October 31, 2027 | 335 |
| Credit: €990.00 × 335 ÷ 365 | €908.63 |
| Net purchase price: €2,950.00 − €908.63 | €2,041.37 |
| plus 19% VAT | €387.86 |
| **To pay** | **€2,429.23** |

### How the switch works

1. An administrator opens the “License & updates” page and, in the card “Rather buy?”, chooses the button “Switch to purchase …”. The card is shown with a running subscription and also if the renewal has not been confirmed yet.
2. We send the payment link to your invoice email, with the subject “Smart Templates: your payment link”. The email names the credited amount (net) or says that nothing is credited. The link is valid for 24 hours; a new link is calculated anew.
3. On the payment page you see the purchase price, below it the credit as a deduction and the remainder plus VAT.
4. As soon as the purchase is paid, your subscription ends. Nothing more is charged for it. From now on you have a purchased license, and the first year of maintenance begins with the purchase.

If you pay by direct debit, your subscription keeps running until the bank has confirmed the payment. There is no cancellation confirmation for the switch; the purchase invoice with the line for the credit serves as the document.

If we set up your subscription for you by hand, for example because your environment has no connection to the license service, the page shows a note in the card “Payment and contract” instead of “Rather buy?”. In that case write to us; we tell you the credited amount before you pay.

### If you also want a maintenance contract

The switch leads to the purchase without maintenance contract. You take out the maintenance contract afterwards like any purchasing customer, see [Taking it out later](lizenz-wartungsvertrag.html#spaeter-abschliessen). Your first year of maintenance begins with the purchase. If you take out the maintenance contract in that year, the maintenance price that was valid on the day of the purchase applies.

---

## Canceling and the customer portal

*For administrators · License & updates · Page en/lizenz-kuendigen.html*

> **In short:** You cancel a subscription and a maintenance contract at any time, effective at the end of the current term: on the “License & updates” page with “Cancel subscription …” or “Cancel maintenance contract …”, or by email. Until the end of the term you can withdraw the cancellation there with “Withdraw cancellation …”; this takes effect immediately. Canceling and withdrawing work in an environment that you have verified once. You change the payment method in the Stripe customer portal.

### Who can cancel

Users with the role “System Administrator” or “Smart Templates – Lizenzverwaltung” can cancel and withdraw a cancellation, in an environment that is verified. If it is not yet, the button first guides you through the verification, see [Verifying an environment](lizenz-seite.html#eine-umgebung-freischalten). The cancellation applies to your whole organization, that is, to all Dynamics environments, including test environments.

### Canceling the subscription

The subscription first runs for twelve months and then renews by twelve months each time. You can cancel at any time, effective at the end of the current term ([§ 5(1)](https://smart-templates.eu/en/license-terms.html#p5)). Canceling a subscription therefore means: it no longer renews.

1. Open “License & updates” and, in the card “Payment and contract”, choose “Cancel subscription …”.
2. The page asks us for the current status and then shows a confirmation question with the day and time at which your term ends, in Berlin time as in our emails. If someone else has canceled in the meantime, for example in another environment, it shows “This has already happened …” and the current status instead.
3. If you like, choose a reason and write us a few words. Both are optional; only we can read them.
4. Confirm with “Cancel subscription”.

The page then shows “Canceled as of …”. You receive a confirmation by email with the subject “Smart Templates: we have received your cancellation” at your administration email or, if you have not entered one, at your invoice email. It names the day on which the subscription ends and the environment in which the cancellation was made. Until then Smart Templates prints as usual, and nothing more is charged.

> **Caution:** Cancel on the day **before** the date that “License & updates” names in the row “Runs until” at the latest. On the day of the end, Stripe renews the subscription and charges the new year. If the renewal is already under way or open, the page shows no button but “The renewal of your subscription is already due …”; in that case write to us, and we will find a solution. Years that have been paid are not refunded pro rata ([§ 5(8)](https://smart-templates.eu/en/license-terms.html#p5)).

### Canceling the maintenance contract

You cancel the maintenance contract the same way, with “Cancel maintenance contract …” in the card “Maintenance contract”, at any time effective at the end of the current term ([§ 5(2)](https://smart-templates.eu/en/license-terms.html#p5)). Your purchased license is not affected; your installed version keeps printing perpetually, see [Without a maintenance contract](lizenz-wartungsvertrag.html#ohne-wartungsvertrag).

If you chose the maintenance contract at the purchase, the first year is included in the purchase price. If you cancel in this first year, the maintenance contract does not begin, and nothing is charged; the confirmation question says so. For a purchase on June 1, 2027, this applies up to and including June 1, 2028. “License & updates” also names the day in the card “Maintenance contract”: “you can cancel free of charge up to and including …”.

> **Caution:** In the years after that, cancel on the day **before** the date that “License & updates” names in the card “Maintenance contract” under “Runs until” at the latest. If the next year has already been charged, the annual amount is not refunded pro rata ([§ 5(8)](https://smart-templates.eu/en/license-terms.html#p5)).

### Withdrawing a cancellation

Until the end of the term you can withdraw a cancellation: choose “Withdraw cancellation …”. The confirmation question says when your subscription or maintenance contract then renews, with the time in Berlin time. For the maintenance contract, that is the day the card names under “Runs until”; because it ends in Berlin only shortly after midnight, it says, for example, “at the end of 06.11.2028 (in Berlin on 07.11.2028 at 00:59)”. The charge is made at the previous price. Confirm with “Withdraw cancellation”. This takes effect **immediately**, for your whole organization. We then send you an email “Smart Templates: your cancellation has been withdrawn” to the same address as the confirmation of the cancellation.

> **Good to know:** Every email about a cancellation or withdrawal that was triggered on “License & updates” carries the paragraph “Wasn’t that you?” with a link that you use to remove all verifications of your organization. After that, nobody can cancel or withdraw without a new verification. Please also reply to the email then.

### If no button appears

- **The renewal is already due or under way:** see above; write to us.
- **We have agreed an end date of its own with you:** The page shows “Your contract ends on …, as agreed with you.” If you would like to change this, write to us.
- **We set up your subscription for you by hand:** For renewal, cancellation or switching to a purchase, write to us.
- **Automatic synchronization is switched off:** Then canceling and withdrawing are not available on the page, see [Synchronization and entering the key by hand](lizenz-abgleich.html). Canceling by email always works.

### Canceling by email

Cancellations are also valid in text form, for example by email ([§ 5(4)](https://smart-templates.eu/en/license-terms.html#p5)). Our email address is in the [legal notice](https://smart-templates.eu/en/legal-notice.html). Give us your invoice email and, if you have it at hand, the tenant ID of your organization, and say whether you are canceling the subscription or the maintenance contract. What counts is when your email reaches us. We then record the cancellation, and you receive a confirmation by email as with a cancellation on the page, only without the link for removing the verifications.

If you cancel while a charge for the renewal is still open, we will get in touch with you personally to settle the open invoice.

### What applies after the cancellation

| | Subscription | Maintenance contract |
|---|---|---|
| Until the end of the term | Everything runs as usual. | Everything runs as usual, including new versions. |
| After that | No more documents are created. The stored key technically remains valid for up to seven more days; there is no entitlement to this ([§ 5(6)](https://smart-templates.eu/en/license-terms.html#p5)). | Your version keeps printing perpetually. There are no new versions or support anymore, and we no longer adapt it to changes by Microsoft. |
| Your templates | are kept in your environments | are kept |
| Money back | Years that have been paid are not refunded pro rata ([§ 5(8)](https://smart-templates.eu/en/license-terms.html#p5)). | as with the subscription |

If you remove the solution from Dynamics, Dynamics also removes your templates. Back them up beforehand with “Export”, see [Managing templates](vorlagen.html#datei). Documents that have already been created are not affected.

If a paid year ends early for a reason you are not responsible for, we refund the rest pro rata. A rule of its own applies to switching from subscription to purchase, see [From subscription to purchase](lizenz-umstieg.html).

We ourselves can cancel the subscription and the maintenance contract with three months’ notice, effective at the end of the term ([§ 5(1) and (2)](https://smart-templates.eu/en/license-terms.html#p5)).

### Coming back

If you want to come back after a canceled subscription once the term has ended, subscribe again or buy on “License & updates”. Smart Templates then keeps working with your templates. The price valid at that time applies ([§ 4(5)](https://smart-templates.eu/en/license-terms.html#p4)). Because your organization was already a customer, the payment link comes by email, see [If you are already a customer](lizenz-bestellen.html#wenn-sie-schon-kunde-sind). With a card, Smart Templates prints again immediately; if you pay by direct debit, it prints with a provisional key until your bank confirms, see [Direct debit: not an instant payment](lizenz-bezahlen.html#lastschrift-keine-sofortzahlung).

### The customer portal

The customer portal is a page of our payment service provider Stripe. There you change the payment method, for example a new card. In the portal your subscription is called “Smart Templates – Abo / Subscription” and your maintenance contract “Smart Templates – Wartungsvertrag / Maintenance contract”. Not possible in the portal: canceling, changing or pausing the subscription, changing the company name, address, VAT ID, purchase order number or an email address. Canceling, withdrawing a cancellation and changing the billing details are done on “License & updates”; for everything else, write to us.

### How to get to the customer portal

1. In the app “Smart Templates”, open the page “License & updates”.
2. Choose “Change payment method ↗”: with a subscription in the card “Payment and contract”, with a purchased Smart Templates with a running maintenance contract in the card “Maintenance contract”. The Stripe sign-in page opens. In a verified environment, the button opens the page for exactly your contract right away; steps 3 and 4 are then omitted.
3. Enter your invoice email.
4. Stripe sends you an email for signing in. With it you get into the portal.

So only someone with access to the mailbox of the invoice email gets into the portal. Only users who may also buy can open the button; everyone else sees it grayed out. If you have bought and have no maintenance contract, the page shows no button for the portal; you received your invoice by email, and you also find it in the card “Invoices”, see [Your invoices](lizenz-rechnungen.html).

### Changing the payment method, address and email addresses

You change the payment method in the [customer portal](#das-kundenportal). You change company name, address, VAT ID, purchase order number, invoice email and administration email not in the portal but on “License & updates” in the card “Billing details”, see [Changing details and email addresses](lizenz-seite.html#angaben-und-e-mail-adressen-aendern). If you have several contracts with the same invoice email, verify the environment before changing the payment method; otherwise Stripe may open a different contract. A new invoice email applies from the next invoice and for all later emails from us; the next sign-in to the portal also goes through it. If you change the country of your billing address, write to us as well, because the VAT of your subscription or maintenance contract does not adjust by itself. If you have bought and have no maintenance contract, write to us, see [How to get to the customer portal](#so-kommen-sie-ins-kundenportal).

---

## Synchronization and entering the key by hand

*For administrators · License & updates · Page en/lizenz-abgleich.html*

> **In short:** Smart Templates fetches its license key itself from our license service and stores it in every environment. Before every document it checks the stored key, without any connection to the outside. If your environment is not allowed to open a connection to the outside, switch off automatic synchronization on the “License & updates” page and paste by hand the key that we send you by email.

### How the license key reaches you

The license key is a text signed by us. It names your organization, the type of license, how long it is valid and until when updates are included. Smart Templates stores it in every Dynamics environment in which it is installed and checks it there before every document. This check needs no connection to the outside ([§ 7(2)](https://smart-templates.eu/en/license-terms.html#p7)).

Smart Templates fetches a new key from the license service by itself. We call this **synchronization**. You don’t have to enter anything for it: the first key arrives when the trial begins, a new one after your payment, after every renewal of your subscription and when you take out or renew a maintenance contract.

### When Smart Templates asks the license service

With synchronization switched on, Smart Templates asks the license service ([§ 7(3)](https://smart-templates.eu/en/license-terms.html#p7)):

- when someone opens the designer (for updates and news, at every opening; it fetches a new news item once per browser),
- when a news item is displayed in the designer or on the “License & updates” page, or “Details” is chosen for it (collected, after ten seconds at the latest or at the next opening of the designer),
- when someone opens the “License & updates” page or chooses “Check again” there,
- when an administrator orders,
- when a new key is due: in the background once a day, at night around 3 a.m. UTC, if the stored key is missing, not valid or ends in eight days at most; with a transitional or provisional key, every day. If the key has already been expired for more than 60 days, for example after a trial that was abandoned long ago, the background no longer asks; then only the other occasions ask. The jobs for [keeping warm](einrichtung-warmhalten.html) take care of this; Smart Templates creates them in an environment as soon as a template has been saved or the designer has been opened there. For a purchased license, the background does not ask, because its key does not expire; a new one with a later end of maintenance arrives at the next opening of the designer or the page,
- when no document could be created without a new key: before Smart Templates blocks a print, it asks once whether there is a new key by now. That one print then takes a few seconds longer.

As long as the stored key is valid, a print does not ask the outside.

### What is transmitted in the process

Smart Templates sends the license service technical details: the identifiers of your organization and the environment, the installed version, the language of the user and the language chosen for invoices and emails, the occasion, the number of the stored key, whether the signed-in user may install solutions, a random value that binds the response to the request, for news the identifier of the news item that was fetched or displayed or for which someone chose “Details”, and when ordering the chosen product. With the first purchase, the details from the window “Billing details” are added: company and address, the country of the billing address, the VAT ID, the invoice email and, if you enter them, the administration email and your purchase order number. The license service passes them on to the payment service Stripe; there they are kept with your customer account and on your invoices. If you verify an environment, a public key of this environment and the code from the email are added; after that, the requests of the page are signed with the environment’s key, and when an invoice is retrieved, when canceling and when changing details, whatever the respective path needs is sent along, see [Verifying an environment](lizenz-seite.html#eine-umgebung-freischalten). Documents, templates and business data do not go out. For news by email, details about the user are added, see [News by email](lizenz-neuigkeiten.html#neuigkeiten-per-e-mail). Binding are [§ 7(3) of the license terms](https://smart-templates.eu/en/license-terms.html#p7) and the [privacy policy](https://smart-templates.eu/en/privacy.html).

### If the license service cannot be reached

As long as a valid key is stored in the environment, documents are created even if the license service cannot be reached ([§ 7(4)](https://smart-templates.eu/en/license-terms.html#p7)). How long a key is valid depends on the license:

| Key | Valid |
|---|---|
| Trial | until the end of the trial |
| Subscription | until the end of the paid term and technically up to seven days beyond |
| Transitional key (renewal not yet paid) | until the end of the period: 21 days after the start of the new contract year, longer if we extend it in individual cases ([§ 4(7)](https://smart-templates.eu/en/license-terms.html#p4)) |
| Provisional key (direct debit processing) | until the payment arrives, 28 days at most |
| Purchase | perpetual, for all versions released up to the end of your maintenance |

If the “License & updates” page cannot reach the license service, it shows the status of the stored key, for example “Subscription — stored key valid until …”, and the row “License service: currently unreachable”. Below it says that printing continues with the stored key and that buying, updates and news only work again once the service can be reached. With “Check again” the page asks once more.

If the service stays unreachable permanently because your policies block connections from Dynamics to the outside, you have two options: allow the connection, or switch off synchronization and paste the key by hand. If the license service has a fault on our side, we send you a key you need by email on request ([§ 7(4)](https://smart-templates.eu/en/license-terms.html#p7)).

### Switching off automatic synchronization

Switch off synchronization only if your policies forbid connections from Dynamics to the outside. Administrators and users with the role “Smart Templates – Lizenzverwaltung” may switch it off.

1. In the environment, open the “License & updates” page.
2. In the card “Your license”, clear the check mark at “Synchronize automatically with the license service”. The page saves immediately.
3. The page now shows the status of the stored key, the row “License service: Synchronization switched off” and below it the card “Paste key by hand”.

[Image: The “License & updates” page with synchronization switched off. The card “Your license” shows “Status: Subscription — stored key valid until 12.11.2027” (green), “License service: Synchronization switched off”, “Installed version”, the tenant ID with “Copy”, the key number, the sentence “Automatic synchronization is switched off: Smart Templates does not connect to the license service and prints with the stored key. …” with the link “Contact” and the switch “Synchronize automatically with the license service” without a check mark. Below it the card “Paste key by hand” with the sentence “For environments without internet access: we send you the key by email. …”, an empty input field and the button “Check and save”.]
Caption: Synchronization switched off, with the card “Paste key by hand”. Example with made-up data.

With synchronization switched off, the following applies:

- Smart Templates no longer connects to the license service in this environment, not when printing and not for news. It prints with the stored key.
- Buying, notes about updates and news only exist with synchronization switched on. The page therefore shows no offers and no card “News by email”, and the designer shows no news.
- We send you a new key, for example after the renewal of your subscription, by email on request; you paste it by hand.
- The switch applies to the environment in which you flip it. If you have several environments, switch it off in each one individually.

If a subscription, transitional or provisional key ends in 14 days at most, the page warns: “Your stored key is only valid until … — request a new one by email in good time, or switch synchronization on.” For the trial key, in the last seven days it shows it only in orange, without this sentence.

To switch it back on, check the box again. The page then immediately asks the license service and fetches a key that is due.

### Pasting a key by hand

The card “Paste key by hand” is on the page if synchronization is switched off or the page cannot reach the license service. Administrators and users with the role “Smart Templates – Lizenzverwaltung” may paste.

1. Request the key from us, for example via the [contact form](https://smart-templates.eu/en/contact.html). Give the tenant ID of your organization; you copy it on the page in the row “Organization (tenant ID)” with “Copy”.
2. We send you the key by email to your administration email or, if you have not entered one, to your invoice email, with the subject “Smart Templates: your license key to install”. It does not go to the address you ask from; if, for example, your IT department asks, ask the recipients of this address to forward it. The key is in the email as a block of text and begins with “eyJ”. If you have not yet paid via the payment page, for example during the trial, or if we set up your license by hand, we have no invoice email on file; in that case we send you the key personally.
3. Copy the whole key from the email. Line breaks may come along.
4. In the environment, open the “License & updates” page and paste the key into the field of the card “Paste key by hand”.
5. Choose “Check and save”. The page checks the key before saving and reports “Key … has been checked and saved.” If no key was valid before, a green “The license key for this environment is now stored. You can print again.” also appears at the top.
6. If you have several environments, paste the key in each one.

If it does not work, the page says why:

| Message | What to do |
|---|---|
| “This key (…) was already saved.” | Nothing. |
| “Key … has been saved. This version does not print with it, though — it was released after your updates ended (…).” | The installed version is not covered by your license, see [Updates and new versions](lizenz-updates.html#gehoert-die-version-zu-ihrer-lizenz). |
| “Please paste the key from our email first.” | The field is empty. |
| “This is not a complete Smart Templates license key. …” | Copy the whole key again; it begins with “eyJ”. |
| “The key is damaged or was not issued by us. …” | Copy the key again in full from the email. |
| “This key belongs to a different Microsoft 365 organization. …” | Tell us the tenant ID shown on the page; we send the right key. |
| “This key expired on …. …” | Request a new key from us. |
| “This key belongs to a different edition of Smart Templates (test or customer build) …” | Write to us. |
| “Only administrators and the »Smart Templates – Lizenzverwaltung« role can change this. …” | Ask an administrator. |

> **Good to know:** For a subscription with synchronization switched off, we send you a new key on request after every renewal. A key for a purchase is perpetual; you only need a new one if the end of your maintenance changes, for example after taking out or renewing a maintenance contract.

---

## Updates and new versions

*For administrators · License & updates · Page en/lizenz-updates.html*

> **In short:** You install new versions of Smart Templates yourself, first in a test environment. The “License & updates” page shows which version is installed and whether a newer one exists. There you also see whether a new version is covered by your license. Check this before installing: an installed newer version can usually not be replaced by an older one.

### Version and update

Every released state of Smart Templates is a **version** with its own number. An **update** is a new version with bug fixes, adaptations to changes by Microsoft or new features. We decide what an update contains; there is no entitlement to particular new features ([§ 8(2)](https://smart-templates.eu/en/license-terms.html#p8)).

Which version is installed in an environment is shown on “License & updates” in the row “Installed version”. If it is followed by “— up to date”, there is no newer one. In the designer, the tooltip on the heading “Smart Templates – Designer” shows which version is running.

You get updates as long as maintenance is running: with a subscription always, with a purchase in the first year and after that with a maintenance contract ([§ 8(1)](https://smart-templates.eu/en/license-terms.html#p8)). In the trial, all versions that are released while it runs are included.

### How to recognize an update

If a newer version exists, the card “Updates” appears on “License & updates”: during the trial, with a subscription until it has expired, and with a purchased license. Synchronization with the license service must be switched on for this. Once the first year of a purchase without maintenance contract is over, the card is always shown, with the offer for the maintenance contract. In the other states, for example after the end of the trial or while a direct debit is processing, the page shows no card “Updates”. Depending on the license, it says:

- **“Version … is available.”** The new version is covered by your license. Behind it, a short note says what it brings.
- **“Version … is still covered by your license (released before your updates ended).”** Your maintenance is over, but this version was released before that and is therefore covered by your license. If it is followed by “contains an important fix”, you should install it.
- **“Version … is only available with a maintenance contract.”** The version was released after the end of your maintenance. Below it, the card offers the maintenance contract.

[Image: Excerpt of the “License & updates” page for a purchase without maintenance contract. On the left the card “Your license” with “Status: Purchased — perpetual”, “Updates: ended on 06.09.2026” (orange), “Installed version 766”, the tenant ID and the sentence “Your version keeps printing unchanged. New versions are available with a maintenance contract.” On the right the card “Updates”: outlined in red “Version 768 is still covered by your license (released before your updates ended) and contains an important fix. Fixes a fault after a Microsoft update.” with file name, checksum (SHA-256) and the buttons “Install 768 automatically” and “Download” as well as the note about importing by hand; below it, in gray, “Version 770 is only available with a maintenance contract.” and the box “Maintenance contract (optional), €359 per year plus VAT, at today’s price” with the button “Take out maintenance contract …”.]
Caption: Purchase without maintenance contract: one version is still covered by the license, a newer one is not. Example with made-up data.

If a new version is covered by your license, the card has two buttons:

- **“Install automatically now”** (for a version that is still covered by your license: “Install … automatically” with its number) installs the version in this environment. A window asks for confirmation first. Only users who may import solutions can do this, for example system administrators. The installation usually takes a few minutes; during that time documents may briefly not be created.
- **“Download solution file”** (or “Download”) downloads the file that you import yourself, see “Installing an update” below. Above it are the file name, size and checksum (SHA-256). The link is valid for 60 minutes at most; if it has expired, choose “Check again”.

Even without a new version, you can fetch the file of the latest version that is covered by your license, for example for another environment: with a subscription and with a purchased license in the first year or with a maintenance contract, the page then shows the card “Solution file” with the button “Download version …”; once the first year of a purchase without maintenance contract is over, the button is in the card “Updates”. See [What is on the page](lizenz-seite.html#was-auf-der-seite-steht).

If the file of a version is not available yet, the card says so; in that case we send it to you on request ([§ 7(1)](https://smart-templates.eu/en/license-terms.html#p7)). We also inform you about new versions with [News](lizenz-neuigkeiten.html).

Whoever may import solutions also sees a new update in the designer: below the header bar it says “New update available: version …”, and for an important fix, in red, “Important update available: version …”. The button “Open License & updates” opens the page in a new tab; the designer stays open. The note appears every time the designer starts until the update is installed; “×” hides it until the next start.

### Is the version covered by your license?

| Your license | These versions are covered |
|---|---|
| Trial | all, as long as the trial runs |
| Subscription | all, as long as the subscription runs |
| Purchase in the first year without maintenance contract | all that are released up to the day under “Updates included until” |
| Purchase with maintenance contract | all, as long as the maintenance contract runs |
| Purchase without maintenance contract | all that were released up to the end of your maintenance; the day is named in the row “Updates” (“ended on …”) |

You may use a purchased version that is covered by your license perpetually, even without a maintenance contract ([§ 8(5)](https://smart-templates.eu/en/license-terms.html#p8)). A version that was released only after the end of your maintenance does not create documents without a maintenance contract. The page then says: “This version was released after your updates ended (…) and therefore does not print. With a maintenance contract it prints again.” If you take out a maintenance contract, it prints as soon as the payment is confirmed, see [The maintenance contract](lizenz-wartungsvertrag.html#spaeter-abschliessen).

> **Caution:** Before installing, check whether a version is covered by your license. In Dynamics, an installed newer version can usually not be replaced by an older one. If it is not covered by your license, it does not create documents without a maintenance contract.

### Installing an update

1. On “License & updates”, check whether the new version is covered by your license, see above.
2. Install the new version in a test environment first: there on “License & updates” with the button “Install … automatically” or by hand with the downloaded file. You import it by hand exactly like the first one, see [Installing the solution](einrichtung-loesung.html#update). Power Apps recognizes the existing solution and updates it; your templates, images and fonts are kept.
3. Try out your most important templates, buttons and flows there ([§ 8(4)](https://smart-templates.eu/en/license-terms.html#p8)).
4. Then install the version in your production environment.
5. Ask your users to reload the designer once with `Ctrl` + `Shift` + `R`. Otherwise the browser may still show parts of the old version.

After that, “License & updates” shows the new number in the row “Installed version”.

> **Good to know:** You don’t need a new license key for an update. A key is valid for all versions that are covered by your license.

---

## News

*For administrators · License & updates · Page en/lizenz-neuigkeiten.html*

> **In short:** We inform you about new versions, important fixes and notices in two ways: as a message in the designer and on the “License & updates” page, and by email on request. Every user sees the messages as long as synchronization with the license service is switched on. Each user switches news by email on and off for themselves.

### News in the designer

If there is a message from us, the entry “News” with the number of unread messages appears at the top of the designer’s header bar. If an urgent one is among them, the number is red. If there is no message, the entry is missing.

- Short notices appear in a narrow row below the header bar, two at a time at most; urgent ones are red. With “×” you hide a notice. Some come back at the next start for as long as they apply.
- A click on “News” opens the list of all messages.
- Important messages open by themselves in a window of their own when the designer starts, one per start at most; others are in the list. Urgent ones have the title “Urgent notice” and a red edge. With “Close” you close the window.
- Some messages have a button such as “Details”; in the window it is at the bottom next to “Close”. It opens a page of our website in a new tab.
- Some messages appear only once, others at every start as long as they apply. When their period is over, they disappear by themselves.
- Some messages are addressed only to users who may import solutions, for example about an update. Other users do not see them.

If we correct a message that you have already seen, it does not appear again by itself. The designer also shows a new update in the row below the header bar, see [How to recognize an update](lizenz-updates.html#woran-sie-ein-update-erkennen).

### News on the “License & updates” page

On the “License & updates” page, the area “Your news” shows the three that are most important right now: unread first, then the newest. “Read in full” shows a message in full. If there are more than three, “All news” opens a window with everything your organization has received from us, the newest at the top, including messages that no longer apply (“ended”). There you find a particular one again with the search box and the selection “All”, “Unread” and “Important”. If there are very many, the window does not show the oldest; then it says below: “Older news items are not shown here.”

Messages in the previous form are still below that, in the card “News”.

[Image: The card “News” on the “License & updates” page with three messages on a light blue background: “Neu in Version 770” with a short text, two bullet points, the link “Zur Website” and below it the link “Details”; “Neu in 766:” with two bullet points and the link “Mehr auf der Website”; “Nur für Administratoren: Version 770 steht bereit.”]
Caption: The card “News”. The messages are made-up examples.

If automatic synchronization is switched off, Smart Templates does not connect to the license service. Then there are no messages, neither in the designer nor on the page, see [Synchronization and entering the key by hand](lizenz-abgleich.html#den-automatischen-abgleich-ausschalten).

### News by email

With the card “News by email” at the very bottom of the “License & updates” page, you subscribe to occasional emails about new versions and features of Smart Templates, and you unsubscribe again with it. This applies only to you: each user decides for themselves, even without administrator rights. Nothing changes for license, updates and documents.

The card appears if automatic synchronization is switched on.

[Image: The card “News by email”: at the top the sentence “We occasionally write about new versions and features of Smart Templates. This is optional and applies only to you — each user decides for themselves.”, below it the consent text with the link “privacy policy”, the field “Email address for news” with the address of the user account, the selection field “Language of the emails” with “German” and the switched-off switch “News by email (off)”.]
Caption: The card “News by email” before switching on. The address is made up.

**Switching on:**

1. Open the “License & updates” page.
2. In the card “News by email”, read the text above the switch. Below it, the field “Email address for news” shows the address the news is to go to, filled in with the email address of your user account in Dynamics. If you want to receive it at a different address, enter that one.
3. Under “Language of the emails”, choose German or English.
4. Switch on “News by email”. Below it appears “Switched on. You will receive our next news by email.”

If you keep the address from Dynamics, there is no confirmation email; what the page shows is switched on.

**A different address:** If you have entered a different address, we first send an email with a confirmation link there, and the card shows “Almost done: …”. Open the link and, on the page it opens, click “Yes, send news to this address”; only then is news switched on. The link is valid for seven days. No email received? Check the spam folder or choose “Send the email again”; with “Cancel” you withdraw the request. Addresses ending in “onmicrosoft.com” are usually not a real mailbox; the card points this out.

**Switching off:** Switch “News by email” off again on the same page. Below it appears “Switched off. We will not send you any more news by email.” You can also briefly reply to one of our news emails; we then remove you. That is the way if you can no longer reach the page, for example because you have left your company, or if automatic synchronization is switched off and the card is therefore missing.

**A different language:** With news switched on, choose the other language. Below it appears “Saved. News will come in … from now on.”; it applies from the next news item. “Switched on since” stays.

**A new email address:** If your address in Dynamics has changed, the card says so; until then the news keeps going to your previous address. With “From now on to …” it goes to the new one. You enter a completely different address with “Use a different email address …”; it, too, only applies after the click in the confirmation email, and until then the news goes to the previous one.

**Address removed:** If your user account in Dynamics no longer has an email address at all, the card says that too. The news then keeps going to your previous address; if you no longer want any, switch it off.

**No address:** If no email address is stored for your user account in Dynamics, the field is empty and the switch is grayed out. Enter an address; we then first send a confirmation email there (see “A different address”).

We get your name and email address only if you switch news on or change the address or language for it. What we store for this and for how long is described in the [privacy policy](https://smart-templates.eu/en/privacy.html#neuigkeiten).

---

## When no license is valid

*For administrators · License & updates · Page en/lizenz-gesperrt.html*

> **In short:** If no license is valid in an environment, no document is created there: no PDF, no e-invoice, no email with a document and no full preview, not even through buttons or flows. Your users see a message instead that sends them to the “License & updates” page. The designer remains usable, and all templates are kept.

### When no license is valid

- The trial has expired, and there is neither a subscription nor a purchase.
- The subscription has expired, for example after a cancellation, or a renewal is still unpaid 21 days after it began.
- A provisional key has expired because the direct debit was not received.
- No key is stored in the environment yet, for example in a new environment that cannot reach the license service.
- The installed version was released after the end of your maintenance. Then only this version does not print, see [Updates and new versions](lizenz-updates.html#gehoert-die-version-zu-ihrer-lizenz).

### What Smart Templates tries beforehand

Before Smart Templates blocks a print, it asks the license service once whether there is a new key by now, for example because you have just paid. If there is one, printing goes ahead; that print then takes a few seconds longer. If automatic synchronization is switched off, Smart Templates does not ask.

### What your users see

Instead of the document, a message appears in three parts: first always the sentence “Open the »License & updates« page in the »Smart Templates« app; it tells you what to do.”, then briefly the reason, and finally “No document was created.”

| Reason in the message | What is behind it |
|---|---|
| “The trial ended on …; your templates are kept.” | The 30 days are over. |
| “The license expired on …; your templates are kept.” | The subscription, transitional key or provisional key has expired. The day is the end of the stored key; with a subscription it is up to seven days after the end of the term. |
| “There is no license key for this environment yet.” | No key is stored in this environment. |
| “This version was released after your updates ended (…).” | The installed version is not covered by your purchased license. |
| “The stored license key belongs to a different Microsoft 365 organization.” | The stored key is valid for a different organization than the one the environment belongs to. |
| “The stored license key is invalid.” | The key is damaged. |

Where the message appears:

- **Button:** The window “Smart Templates — canceled” shows “No document was created.” and the message. With the button “Open »License & updates«”, your users go straight to the page, even from another app; “Close” closes the window.
- **Flow:** The flow aborts with the same message.
- **Designer:** The designer remains usable, and all templates are kept; the PDF preview reports “PDF failed –” with the same message.

If the license cannot be checked at all right now, the message reads “The Smart Templates license could not be checked just now. Please try again in a few minutes. No document was created.” In that case the page does not help either; try again later.

### What you do

1. Open the “License & updates” page. The status and the sentence below it say what is missing, see [What the status means](lizenz-seite.html#was-der-stand-bedeutet).
2. If the trial or the subscription has expired, an administrator subscribes or buys, see [Buying or subscribing](lizenz-bestellen.html). After that, Smart Templates prints again immediately, in all environments.
3. If a renewal has not been paid, check the payment, see [If a renewal has not been paid](lizenz-bezahlen.html#wenn-eine-verlaengerung-nicht-bezahlt-ist).
4. If automatic synchronization is switched off, request a new key from us and paste it by hand, see [Pasting a key by hand](lizenz-abgleich.html#einen-schluessel-von-hand-einfuegen).
5. If the installed version is not covered by your license, take out a maintenance contract, see [The maintenance contract](lizenz-wartungsvertrag.html#spaeter-abschliessen).

Whoever has no rights to subscribe sees a note on the page to contact their administrator.

---

## Frequently asked questions about license & updates

*For administrators · License & updates · Page en/lizenz-fragen.html*

> **In short:** Short answers to the questions that purchasing, management and administrators ask most often. Every answer points to the page where the details are. The [license terms](https://smart-templates.eu/en/license-terms.html) are binding.

### Can we test Smart Templates first?

Yes, for 30 days free of charge and with all features, once per organization. The trial begins when the designer is first opened and ends by itself; you don’t have to cancel anything. See [The trial period](lizenz-testphase.html).

### Do test and development environments need a license of their own?

No. One license covers your whole Microsoft organization (tenant) with all the Dynamics environments in it. You need a license of your own only for an additional Microsoft organization. See [One license for your Microsoft organization](lizenz-ueberblick.html#eine-lizenz-fuer-ihre-microsoft-organisation).

### How do we sign the contract?

Not on paper at all. You order in Dynamics, confirm the license terms on the payment page and pay. The contract is concluded when we confirm the order in text form or make the license key available to you. See [How the contract is concluded](lizenz-bestellen.html#wie-der-vertrag-zustande-kommt).

### Do we get a quote beforehand?

Yes. Request it with the form [Request a quote](https://smart-templates.eu/en/contact.html?anliegen=angebot). You order in Dynamics afterwards.

### Can we pay on account or enter a purchase order number?

Paying on account, no: you pay on the Stripe payment page, by card or SEPA direct debit. A purchase order number, yes: enter it with your first purchase in the window “Billing details”; it then appears on every invoice, including renewals. If your purchase order number changes later, you change it on “License & updates” in the card “Billing details”, see [Changing details and email addresses](lizenz-seite.html#angaben-und-e-mail-adressen-aendern); the new one then appears on it from the next invoice. See [Step by step](lizenz-bestellen.html#schritt-fuer-schritt). You also get a quote for your purchasing, see [Quote and payment](lizenz-bestellen.html#angebot-und-zahlung).

### How long does a payment by direct debit take?

Direct debit is not an instant payment. Your bank usually confirms it within 8 business days, sometimes later. When you take out a subscription or a purchase, Smart Templates prints in the meantime with a provisional key, for 28 days at most. See [Direct debit: not an instant payment](lizenz-bezahlen.html#lastschrift-keine-sofortzahlung).

### What happens if our direct debit bounces?

Then you do not get a regular key, and the provisional key ends 28 days after the conclusion at the latest. With a purchase, we cancel the open purchase invoice; you can buy again, for example by card. With a subscription, the first invoice stays open; if you pay it later after all, your key arrives by itself. See [If the direct debit is not received](lizenz-bezahlen.html#wenn-die-lastschrift-nicht-eingeht).

### When does the license key arrive?

By itself, right after the payment; you don’t have to enter anything. The “License & updates” page fetches it as soon as you return to it; other environments fetch it when the designer is opened or, at the latest, with the next print that would otherwise be blocked. With a direct debit, a provisional key arrives first and the regular one after the bank has confirmed. See [After the payment](lizenz-bestellen.html#nach-der-bezahlung).

### Where do we find our invoices?

In your mailbox: invoices arrive as e-invoices at your invoice email. We send older invoices again on request. See [Invoices](lizenz-bezahlen.html#rechnungen).

### Do we get an e-invoice (XRechnung)?

Yes. Your invoices come as e-invoices: a PDF in which the invoice data according to the European standard EN 16931 is embedded (ZUGFeRD / Factur-X). Programs that read e-invoices take over the data from it; you can view and print the PDF as usual. We do not send a pure XRechnung (XML only). If you are a public contracting authority and require an XRechnung, write to us before ordering using the [contact form](https://smart-templates.eu/en/contact.html). See [Invoices](lizenz-bezahlen.html#rechnungen).

### In which language do we get invoices and emails?

In the language that a system administrator or someone with the role “Smart Templates – Lizenzverwaltung” chose when first opening the “License & updates” page: German or English. Until you buy, you can change it there at any time. After the purchase, you change it in a verified environment, or you write to us. Legally, German remains the contract language ([§ 15(6)](https://smart-templates.eu/en/license-terms.html#p15)). See [The language for invoices and emails](lizenz-seite.html#die-sprache-fuer-rechnungen-und-e-mails).

### How is VAT calculated?

All prices are net. Before the first payment you enter the country and VAT ID. Companies in Germany pay 19% VAT on top. Companies in another EU country enter their VAT ID (mandatory) and receive an invoice without German VAT (reverse charge). Outside the EU, no German VAT applies. See [VAT](lizenz-bezahlen.html#umsatzsteuer).

### Who in our company may buy and cancel?

Administrators and users with the role “Smart Templates – Lizenzverwaltung” may buy and subscribe. Everyone else sees the status on “License & updates” and a note to contact their administrator. Only users with the role “System Administrator” or “Smart Templates – Lizenzverwaltung” can cancel and withdraw a cancellation on “License & updates”, in a verified environment; system customizers cannot. See [Who sees the page and who may buy](lizenz-seite.html#wer-die-seite-sieht-und-wer-kaufen-darf) and [Who can cancel](lizenz-kuendigen.html#wer-kuendigen-kann).

### Why do we have to verify an environment?

So that only authorized people view your invoices, cancel and change the billing details. For this we send a code to your administration email or, if you have not entered one, to your invoice email. System administrators and users with the role “Smart Templates – Lizenzverwaltung” may verify. A verification stays valid as long as it is used and ends after twelve months without use. How it works is described under [Verifying an environment](lizenz-seite.html#eine-umgebung-freischalten).

### What do our users see when no license is valid?

Instead of the document, a message that begins with “Open the »License & updates« page in the »Smart Templates« app; it tells you what to do.” and ends with “No document was created.” With a button, the button “Open »License & updates«” opens the page directly. Your templates are kept. See [When no license is valid](lizenz-gesperrt.html).

### How do we cancel the subscription?

On “License & updates” with “Cancel subscription …” or by email, at any time effective at the end of the current term. Until then you can also withdraw the cancellation there. To be sure nothing more is charged, cancel on the day before the date that “License & updates” names under “Runs until” at the latest. See [Canceling the subscription](lizenz-kuendigen.html#das-abo-kuendigen).

### Do we get money back when we cancel?

As a rule, no: years that have been paid are not refunded pro rata, and you use Smart Templates until the end of the term. If a paid year ends early for a reason you are not responsible for, we refund the rest pro rata; a rule of its own applies to switching to a purchase, see [From subscription to purchase](lizenz-umstieg.html). There is no right of withdrawal because we sell only to businesses. So check Smart Templates in the trial ([§ 1(2)](https://smart-templates.eu/en/license-terms.html#p1), [§ 5(8)](https://smart-templates.eu/en/license-terms.html#p5)).

### Until when can we cancel the maintenance contract free of charge?

If you chose it with the purchase: up to and including the anniversary of your purchase. Nothing is charged then. “License & updates” names the day in the card “Maintenance contract”. See [Canceling the maintenance contract](lizenz-kuendigen.html#den-wartungsvertrag-kuendigen).

### Why do the invoice and the portal say “Free trial” although we have bought?

That is fixed text from Stripe for the first year of your maintenance contract, which is included in the purchase price. See [Taking it out right at purchase](lizenz-wartungsvertrag.html#gleich-beim-kauf-abschliessen).

### Do we get a reminder before the renewal?

Before the first charge of a maintenance contract chosen at purchase, yes, about 30 days beforehand. Before the annual renewal of the subscription, we do not send a reminder of its own. If you pay by direct debit, Stripe announces every charge beforehand by email. If a charge fails, we remind you by email. See [The annual renewal](lizenz-bezahlen.html#die-jaehrliche-verlaengerung).

### Does our price stay if prices rise?

Yes, as long as your subscription or maintenance contract runs without interruption. New prices apply only to new contracts ([§ 4(5)](https://smart-templates.eu/en/license-terms.html#p4)).

### What happens to our templates when the subscription ends?

They are kept in your environments. Only no more documents are created. If you subscribe again, Smart Templates keeps working with them. See [What applies after the cancellation](lizenz-kuendigen.html#was-nach-der-kuendigung-gilt).

### How do we get updates?

You install new versions yourself, first in a test environment. Whether there is one and whether it is covered by your license is shown on “License & updates” in the card “Updates”. See [Updates and new versions](lizenz-updates.html).

### Our Dynamics environment is not allowed to open connections to the outside. Does it still work?

Yes, with a license. Switch off automatic synchronization on “License & updates”. We send you the key by email, and you paste it there by hand. Buying, notes about updates and news are then not available. See [Synchronization and entering the key by hand](lizenz-abgleich.html).

The trial, however, begins when the designer is opened only if Smart Templates can reach the license service. If the connection to the outside is blocked, write to us using the [contact form](https://smart-templates.eu/en/contact.html), see [When the trial begins](lizenz-testphase.html#wann-die-testphase-beginnt).

### What data goes to you in the process?

Technical details about your organization and installation, no documents, templates or business data. With the first purchase, the billing details are added: company, address, country, VAT ID, the invoice email and, if you enter them, the administration email and your purchase order number. Details about an individual user are added only for news by email. See [What is transmitted in the process](lizenz-abgleich.html#was-dabei-uebertragen-wird) and the [privacy policy](https://smart-templates.eu/en/privacy.html).

### Does Smart Templates keep printing if the license service cannot be reached?

Yes, as long as a valid key is stored in the environment. Smart Templates checks it there before every document, without a connection to the outside ([§ 7(2) and (4)](https://smart-templates.eu/en/license-terms.html#p7)). A purchased key does not expire; a subscription key is valid until the end of the paid term and technically up to seven days beyond. See [If the license service cannot be reached](lizenz-abgleich.html#wenn-der-lizenzdienst-nicht-erreichbar-ist).

### Can we transfer the license?

You may pass a purchased license on to another company: in full, you no longer use it yourself afterwards, and you tell us the new holder and their tenant in text form, for example by email. A subscription cannot be transferred. If you move to a new Microsoft organization, we transfer the license once free of charge on request ([§ 3(5) and (6)](https://smart-templates.eu/en/license-terms.html#p3)).

### What if the license service no longer exists one day?

If we permanently discontinue the license service without anyone continuing it, customers with a purchased license or a running, paid subscription receive beforehand a perpetual key for the last version they are allowed to use. It no longer needs the license service ([§ 7(9)](https://smart-templates.eu/en/license-terms.html#p7)).

---

## Actions and APIs

*For developers · Page en/schnittstellen.html*

> **In short:** One call, one document: `st_GenerateDocument` creates the PDF from a template and a record and returns it as Base64. You call the action from a plugin, from JavaScript, from Power Automate or through the web API; the examples on this page are available in C#, JavaScript and HTTP to copy. Three actions create a document, three serve the e-invoice, one keeps printing fast, two serve the AI assistant. All of them are unbound, visible to everyone and have no security privilege of their own; inputs and outputs are text, only `st_CheckKeepWarm` returns `Ok` as yes/no.

### A PDF in one call

POST `/api/data/v9.2/st_GenerateDocument`

Action · unbound · no privilege of its own · Inputs and outputs: text

You name the template and the record and get the PDF back. That is all it takes:

**C#:**

```csharp
using System;
using Microsoft.Xrm.Sdk;

public sealed class GenerateDocumentPlugin : IPlugin
{
    public void Execute(IServiceProvider serviceProvider)
    {
        var context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
        var service = ((IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory)))
            .CreateOrganizationService(context.UserId);

        var response = service.Execute(new OrganizationRequest("st_GenerateDocument")
        {
            ["TemplateId"]    = "3f6b2c1e-8a4d-4f7b-9c2e-1d5a7b9e0c42",   // template id
            ["PrimaryEntity"] = context.PrimaryEntityName,                 // e.g. "invoice"
            ["PrimaryId"]     = context.PrimaryEntityId.ToString(),
            ["Mode"]          = "pdf",
            ["FlowId"]        = null                                       // optional: a Power Automate cloud flow to start afterwards
        });

        var pdfBase64 = (string)response["PdfBase64"];   // the PDF as Base64
        var message   = (string)response["Message"];     // warnings start with "WARNING:"
    }
}
```

**JavaScript:**

```javascript
// In a form script or a command bar button
async function generateDocument(formContext) {
  const response = await Xrm.WebApi.online.execute({
    TemplateId: "3f6b2c1e-8a4d-4f7b-9c2e-1d5a7b9e0c42",            // template id
    PrimaryEntity: formContext.data.entity.getEntityName(),         // e.g. "invoice"
    PrimaryId: formContext.data.entity.getId().replace(/[{}]/g, ""),
    Mode: "pdf",
    FlowId: null,                                                   // optional: a Power Automate cloud flow to start afterwards
    getMetadata: () => ({
      boundParameter: null,
      operationType: 0,                                  // 0 = action
      operationName: "st_GenerateDocument",
      parameterTypes: {
        TemplateId:    { typeName: "Edm.String", structuralProperty: 1 },
        PrimaryEntity: { typeName: "Edm.String", structuralProperty: 1 },
        PrimaryId:     { typeName: "Edm.String", structuralProperty: 1 },
        Mode:          { typeName: "Edm.String", structuralProperty: 1 },
        FlowId:        { typeName: "Edm.String", structuralProperty: 1 }
      }
    })
  });
  return await response.json();   // .PdfBase64 and .Message
}
```

**HTTP:**

```http
POST https://contoso.crm4.dynamics.com/api/data/v9.2/st_GenerateDocument HTTP/1.1
Authorization: Bearer <Token>
Content-Type: application/json; charset=utf-8
Accept: application/json
OData-MaxVersion: 4.0
OData-Version: 4.0

{
  "TemplateId": "3f6b2c1e-8a4d-4f7b-9c2e-1d5a7b9e0c42",
  "PrimaryEntity": "invoice",
  "PrimaryId": "9d4e2b7a-1c3f-4e8d-b2a6-5f7c9e1d3b80",
  "Mode": "pdf",
  "FlowId": null
}
```

Instead of the ID, you can also pass the template as JSON (`TemplateJson`); that is how the designer works. With the input `FlowId`, the same action starts a flow in Power Automate after the document; in the example it is `null`, so there is no flow (see Starting a flow). All inputs and outputs are listed under st_GenerateDocument: all inputs and outputs.

> **Without code:** The same as a button in the Dynamics command bar, without a line of your own code: in the designer, the assistant “Manage buttons in Dynamics” creates the button, purpose “Create and display the document”. One click builds the document and opens it in a new tab. The button calls `SmartTemplates.Button.showDocument` from `st_button.js`, and for all checked rows of a list `SmartTemplates.Button.showDocumentAll`. Here is how: Buttons: the assistant: What should the button do? and Adding, changing and removing a button.

### What comes back

This is what the response looks like, shortened:

```json
{
  "@odata.context": "https://contoso.crm4.dynamics.com/api/data/v9.2/$metadata#Microsoft.Dynamics.CRM.st_GenerateDocumentResponse",
  "PdfBase64": "JVBERi0x…",
  "Message": "OK: 2 page(s), 103912 bytes [Server-Daten] · Data: 1 query, 9 column(s), 852 ms · …",
  "LayoutJson": "",
  "ChoicesJson": "",
  "FlowRunId": "",
  "TriggerRowId": ""
}
```

- `PdfBase64`: the PDF as Base64. It begins with `JVBERi0x`, that is, `%PDF-1`.
- `FileName`: the name of the PDF, for example `Rechnung_R-2026-0042.pdf` (see Outputs).
- `Message`: on success it begins with `OK:` and names pages, size and times. Warnings begin with `WARNING:` (see Errors and warnings).
- The other fields stay empty as long as you do not use a different `Mode`, choices or a flow. If the template has an e-invoice “XML only”, `XmlBase64` and `XmlFileName` are added (see E-invoice).

### The actions at a glance

| Action | What it does |
|---|---|
| `st_GenerateDocument` | Creates the document for a record and returns the PDF. |
| `st_CreateEmail` | Creates the document and creates an email draft with the PDF as an attachment. Does not send. |
| `st_SendEmail` | Creates the document and sends the email with the attachment immediately. |
| `st_GenerateEInvoice` | Creates the e-invoice of a record only as an XML file, with ZUGFeRD the `factur-x.xml`. Without PDF, without flow. See E-invoice. |
| `st_StandardLesen` | Reads the standards of the e-invoice: the list, the overview of a standard, its files, the suggestions for the Dynamics invoice and the description of the format. |
| `st_StandardHochladen` | Checks a custom standard and stores it in the table of custom standards. |
| `st_CheckKeepWarm` | Checks and repairs keeping warm. No inputs, prints nothing. Outputs: `Ok` (yes/no) and `Message` (plain text). |
| `st_FormatLesen` | Returns the description of the template format in parts, for the AI assistant. |
| `st_VorlageAendern` | Accepts a change to a template, checks it and stores it as an AI change. The saved template stays unchanged. |

All three print actions can start a flow in Power Automate after the document (input `FlowId`). `st_GenerateEInvoice` does not have this input.

### Showing the PDF in the browser

In a command bar button, you show the document in a new tab. The order is what matters: first open the tab, then wait for the document.

```javascript
// In a button click: open the tab FIRST, then wait for the document.
// After an await, the browser silently blocks a new window.
async function showDocument(formContext) {
  const tab = window.open("", "_blank");
  try {
    const result = await generateDocument(formContext);           // from the first example
    const raw = atob(result.PdfBase64);
    const bytes = new Uint8Array(raw.length);
    for (let i = 0; i < raw.length; i++) bytes[i] = raw.charCodeAt(i);
    tab.location.href = URL.createObjectURL(new Blob([bytes], { type: "application/pdf" }));
  } catch (error) {
    if (tab) tab.close();
    Xrm.Navigation.openAlertDialog({ text: "No document: " + error.message });
  }
}
```

Ready-built, Smart Templates delivers this with the library `st_button.js`, including a wait notice, messages and several records at once (see From a button in Dynamics).

### The document by email

The document arrives as a PDF attachment on an email whose subject and text come from a Dynamics email template. How to create an email template is described in Microsoft: Create templates for emails. There are three ways:

| Way | What happens | Good for |
|---|---|---|
| `st_CreateEmail` | One call: create the document, create an email draft from the email template, attach the PDF. Nothing is sent. | The user checks the email and sends it themselves. |
| `st_SendEmail` | The same, and the email goes out immediately. | Emails without review. |
| Built yourself | Create the document, fill the email template with `InstantiateTemplate`, create the email, attach the PDF, send if desired. | Your own recipients, your own text, further attachments. |

The input `FlowId` also exists for `st_CreateEmail` and `st_SendEmail`; it then starts a flow and sends nothing itself (see Starting a flow).

#### One call: st_CreateEmail

`st_CreateEmail` creates the document, creates an email draft from the email template (`EmailTemplateId`) and attaches the PDF. Nothing is sent: the draft is in Dynamics, and the user checks it and sends it themselves. The attachments of the email template come along as a copy.

**C#:**

```csharp
var response = service.Execute(new OrganizationRequest("st_CreateEmail")   // creates a draft, nothing is sent
{
    ["TemplateId"]      = "3f6b2c1e-8a4d-4f7b-9c2e-1d5a7b9e0c42",   // document template
    ["EmailTemplateId"] = "7a1d9c3e-5b2f-4d8a-9e6c-2b4f8d1a7c35",   // email template: subject and text
    ["PrimaryEntity"]   = "invoice",
    ["PrimaryId"]       = context.PrimaryEntityId.ToString(),
    ["To"]              = "contact:" + contactId                   // optional
});

var emailId = (string)response["EmailId"];   // the draft with the PDF attached
var message = (string)response["Message"];   // skipped recipients appear here as "WARNING:"
```

**JavaScript:**

```javascript
const response = await Xrm.WebApi.online.execute({
  TemplateId: "3f6b2c1e-8a4d-4f7b-9c2e-1d5a7b9e0c42",              // document template
  EmailTemplateId: "7a1d9c3e-5b2f-4d8a-9e6c-2b4f8d1a7c35",         // email template: subject and text
  PrimaryEntity: "invoice",
  PrimaryId: id,
  To: "contact:" + contactId,                                       // optional
  getMetadata: () => ({
    boundParameter: null,
    operationType: 0,                                  // 0 = action
    operationName: "st_CreateEmail",              // creates a draft, nothing is sent
    parameterTypes: {
      TemplateId:      { typeName: "Edm.String", structuralProperty: 1 },
      EmailTemplateId: { typeName: "Edm.String", structuralProperty: 1 },
      PrimaryEntity:   { typeName: "Edm.String", structuralProperty: 1 },
      PrimaryId:       { typeName: "Edm.String", structuralProperty: 1 },
      To:              { typeName: "Edm.String", structuralProperty: 1 }
    }
  })
});
const { EmailId, Message } = await response.json();
await Xrm.Navigation.openForm({ entityName: "email", entityId: EmailId });   // open the draft
```

**HTTP:**

```http
### Creates a draft with the PDF attached; nothing is sent
POST https://contoso.crm4.dynamics.com/api/data/v9.2/st_CreateEmail HTTP/1.1
Authorization: Bearer <Token>
Content-Type: application/json; charset=utf-8
Accept: application/json
OData-MaxVersion: 4.0
OData-Version: 4.0

{
  "TemplateId": "3f6b2c1e-8a4d-4f7b-9c2e-1d5a7b9e0c42",
  "EmailTemplateId": "7a1d9c3e-5b2f-4d8a-9e6c-2b4f8d1a7c35",
  "PrimaryEntity": "invoice",
  "PrimaryId": "9d4e2b7a-1c3f-4e8d-b2a6-5f7c9e1d3b80",
  "To": "contact:5c8e1f2a-7b3d-4a9c-8e1f-3d6b9a2c4e71"
}
```

> **Without code:** As a button without code of your own: purpose “Prepare an email and present it” in the assistant “Manage buttons in Dynamics”. One click creates the draft with the document attached and opens it; nothing is sent. You choose a recipient from the record in the step “Who receives the email?”; the button passes it along as `To`. If the field yields nothing, the same applies as without this choice (see Recipients and Buttons: the assistant: Who receives the email?). The button calls `SmartTemplates.Button.openEmail`, for all checked rows `SmartTemplates.Button.openEmailAll`. You choose the email template in the assistant either fixed or depending on a condition (see Buttons: the assistant: Email template: always the same or depending on a condition). Here is how: Buttons: the assistant: What should the button do? and Adding, changing and removing a button.

`st_SendEmail` has the same inputs and outputs and sends the email immediately; without a recipient it aborts (see Recipients).

> **Without code:** As a button without code of your own: purpose “Send email immediately” in the assistant “Manage buttons in Dynamics”. The button calls `SmartTemplates.Button.sendEmail`, for all checked rows `SmartTemplates.Button.sendEmailAll`. You choose the recipient in the step “Who receives the email?”, from a lookup or an email field of the record; the button passes it along as `To` (see Buttons: the assistant: Who receives the email?). If the field is empty on a record, the button sends nothing for it and says so. Without this choice the email goes to the record itself, and without a recipient the action aborts. Here is how: Buttons: the assistant: What should the button do? and Adding, changing and removing a button.

#### Built yourself: fill the email template and attach the PDF

If you want to determine recipients, text or further attachments yourself, assemble the email yourself with the Dynamics actions. `InstantiateTemplate` fills the email template for the record without creating anything; after that you create the email and attach the PDF as `activitymimeattachment`. The email template must be built for the table of the record or be of the type “User”.

**C#:**

```csharp
using Microsoft.Crm.Sdk.Messages;   // InstantiateTemplateRequest, SendEmailRequest

// 1. Fill the email template for this record (creates nothing yet)
var instantiated = (InstantiateTemplateResponse)service.Execute(new InstantiateTemplateRequest
{
    TemplateId = new Guid("7a1d9c3e-5b2f-4d8a-9e6c-2b4f8d1a7c35"),   // email template id
    ObjectType = context.PrimaryEntityName,                          // e.g. "invoice"
    ObjectId   = context.PrimaryEntityId
});

// 2. Create the email with subject and text from the template
var email = instantiated.EntityCollection.Entities[0];
email["regardingobjectid"] = new EntityReference(context.PrimaryEntityName, context.PrimaryEntityId);
email["to"] = new EntityCollection(new[]
{
    new Entity("activityparty") { ["partyid"] = new EntityReference("contact", contactId) }
});
var emailId = service.Create(email);

// 3. Attach the PDF from the first example
service.Create(new Entity("activitymimeattachment")
{
    ["objectid"]       = new EntityReference("email", emailId),
    ["objecttypecode"] = "email",
    ["filename"]       = "Invoice.pdf",
    ["mimetype"]       = "application/pdf",
    ["body"]           = pdfBase64
});

// 4. Optional: send it right away
service.Execute(new SendEmailRequest { EmailId = emailId, IssueSend = true, TrackingToken = "" });
```

**JavaScript:**

```javascript
const id = formContext.data.entity.getId().replace(/[{}]/g, "");

// 1. Fill the email template for this record (creates nothing yet)
const response = await Xrm.WebApi.online.execute({
  TemplateId: { guid: "7a1d9c3e-5b2f-4d8a-9e6c-2b4f8d1a7c35" },  // email template id; Edm.Guid needs { guid }
  ObjectType: "invoice",
  ObjectId: { guid: id },
  getMetadata: () => ({
    boundParameter: null,
    operationType: 0,                                  // 0 = action
    operationName: "InstantiateTemplate",
    parameterTypes: {
      TemplateId: { typeName: "Edm.Guid",   structuralProperty: 1 },
      ObjectType: { typeName: "Edm.String", structuralProperty: 1 },
      ObjectId:   { typeName: "Edm.Guid",   structuralProperty: 1 }
    }
  })
});
const template = (await response.json()).value[0];

// 2. Create the email with subject and text from the template
const email = await Xrm.WebApi.createRecord("email", {
  subject: template.subject,
  description: template.description,
  "regardingobjectid_invoice_email@odata.bind": "/invoices(" + id + ")",
  email_activity_parties: [
    { "partyid_contact@odata.bind": "/contacts(" + contactId + ")", participationtypemask: 2 }   // 2 = To
  ]
});

// 3. Attach the PDF from the first example
const result = await generateDocument(formContext);
await Xrm.WebApi.createRecord("activitymimeattachment", {
  "objectid_email@odata.bind": "/emails(" + email.id + ")",
  objecttypecode: "email",
  filename: "Invoice.pdf",
  mimetype: "application/pdf",
  body: result.PdfBase64
});
```

**HTTP:**

```http
### 1. Fill the email template for this record (creates nothing yet)
POST https://contoso.crm4.dynamics.com/api/data/v9.2/InstantiateTemplate HTTP/1.1
Authorization: Bearer <Token>
Content-Type: application/json; charset=utf-8

{
  "TemplateId": "7a1d9c3e-5b2f-4d8a-9e6c-2b4f8d1a7c35",
  "ObjectType": "invoice",
  "ObjectId": "9d4e2b7a-1c3f-4e8d-b2a6-5f7c9e1d3b80"
}

### 2. Create the email with subject and text from step 1
POST https://contoso.crm4.dynamics.com/api/data/v9.2/emails HTTP/1.1
Authorization: Bearer <Token>
Content-Type: application/json; charset=utf-8
Prefer: return=representation

{
  "subject": "<subject from step 1>",
  "description": "<description from step 1>",
  "regardingobjectid_invoice_email@odata.bind": "/invoices(9d4e2b7a-1c3f-4e8d-b2a6-5f7c9e1d3b80)",
  "email_activity_parties": [
    { "partyid_contact@odata.bind": "/contacts(5c8e1f2a-7b3d-4a9c-8e1f-3d6b9a2c4e71)", "participationtypemask": 2 }
  ]
}

### 3. Attach the PDF
POST https://contoso.crm4.dynamics.com/api/data/v9.2/activitymimeattachments HTTP/1.1
Authorization: Bearer <Token>
Content-Type: application/json; charset=utf-8

{
  "objectid_email@odata.bind": "/emails(<activityid from step 2>)",
  "objecttypecode": "email",
  "filename": "Invoice.pdf",
  "mimetype": "application/pdf",
  "body": "JVBERi0x…"
}
```

More on this: Microsoft: The InstantiateTemplate action.

#### Inputs

| Name | Required | Meaning |
|---|---|---|
| `TemplateId` | yes | The document template. |
| `EmailTemplateId` | yes, unless the template chooses by itself | The email template (`template`): subject, text and its attachments. Its attachments come as a copy in every email. It must be built for the table from `PrimaryEntity` or be of the type “User”, otherwise the action aborts; this also applies to one chosen via `wahlen`. |
| `PrimaryEntity` | yes | The table, for example `invoice`. |
| `PrimaryId` | yes | The record. |
| `To` | no | Recipients, see below. |
| `Cc` | no | Copy, same notation as `To`. |
| `FlowId` | no | Cloud flow that is to run afterwards. |
| `FileName` | no | File name of the PDF attachment. Empty: the PDF name of the template (see Template settings: PDF name), without it the name of the document template. |
| `Trace` | no | Is passed on to `st_GenerateDocument`. |

In Dataverse, all inputs are registered as optional, including the four required ones. If one is missing, the action answers with a sentence of its own that says what it is needed for.

#### Recipients

Separate several recipients with a semicolon or a line break, not with a comma. Each entry is one of three:

```text
a1b2c3d4-1111-2222-3333-444444444444          an id; the table is looked up
contact:a1b2c3d4-1111-2222-3333-444444444444  an id with its table (faster, unambiguous)
anna.smith@example.com                        an email address
```

- The search covers `contact`, `account`, `systemuser`, `queue` and `lead`, in this order. An entry that is found nowhere is dropped with a warning in `Message`.
- A prefix belongs only in front of an ID. If it is in front of an address, the entry is dropped with a warning.
- If `To` is empty and the record itself can be addressed (one of the five tables that are searched; with their German names they are listed under Buttons: the assistant: What should the button do?), it is the recipient. Otherwise the draft is created without a recipient, and `st_SendEmail` aborts. Smart Templates does not guess a recipient. A button passes `To` along if a recipient is set for it in the assistant (parameter `to:…`; see Buttons: the assistant: Who receives the email?).

#### Choosing the email template from the template

If the document template contains a section `wahlen`, if-then cases choose the email template, and `EmailTemplateId` may be omitted. If `EmailTemplateId` is set, it applies. In the designer, you build the cases in the assistant “Manage buttons in Dynamics”, in the step for the email template with “Depending on a condition” (see Buttons: the assistant: Depending on a condition: the cases).

```json
"wahlen": {
  "mailvorlage": {
    "faelle": [ { "wenn": "ordertype == 'Project'", "dann": "<email template id>" } ],
    "sonst": "<email template id>"
  }
}
```

`wenn` is an expression in the same condition language as the visibility rules (Template format, section “Conditions”), evaluated on the main record. Which fields the assistant offers for this is described under Conditions: Where conditions occur.

#### Outputs

| Name | Meaning |
|---|---|
| `EmailId` | The email that was created. |
| `PdfBase64` | The document, the same as in the attachment. |
| `FileName` | The name of the PDF attachment. Empty if no PDF is attached (e-invoice “XML only” without a reading copy). |
| `FlowRunId`, `TriggerRowId` | As with `st_GenerateDocument`. |
| `Message` | Plain text. Recipients that were left out are listed here and only here, as `WARNING:`. |

#### Attachments with e-invoice

The email actions attach what the template is set to:

| Template setting | Attachments of the email |
|---|---|
| no e-invoice, switched off, or “Only if …” does not apply | The PDF, as before. |
| ZUGFeRD, “PDF with embedded e-invoice” | One attachment: the PDF/A-3 with the `factur-x.xml` in it. |
| “only the e-invoice (XML)” | The XML (`application/xml`, name from the standard, for example `XRechnung_R-2026-0042.xml`, or the PDF name of the template with `.xml`). |
| “only the e-invoice (XML)” with reading copy | The XML and the PDF. |

`FileName` still applies to the PDF; the XML keeps the name from the standard, or it is named like the PDF name of the template with `.xml`. If the e-invoice lacks a required detail or a check calculation does not match, no email is created: “The document could not be built: The e-invoice cannot be created – … — no email was created.”

### Starting a flow

`FlowId` is the ID of a cloud flow, as it appears in the address bar of Power Automate after `/flows/`. Before the document, the action checks: Does the flow exist, is it a cloud flow, is it switched on, and does it match the record? If the check fails, nothing is created. The flow is started right at the end and asynchronously; the caller does not wait for the flow.

The call is the same as in the first example, only with an ID in `FlowId`. Nothing is sent in the process; the flow does what you build into it.

**C#:**

```csharp
var response = service.Execute(new OrganizationRequest("st_GenerateDocument")
{
    ["TemplateId"]    = "3f6b2c1e-8a4d-4f7b-9c2e-1d5a7b9e0c42",
    ["PrimaryEntity"] = "invoice",
    ["PrimaryId"]     = context.PrimaryEntityId.ToString(),
    ["Mode"]          = "pdf",
    ["FlowId"]        = "b2e4c6a8-0d1f-4a3b-9c5e-7f8a1b2c3d4e"    // Power Automate cloud flow id (address bar, after /flows/)
});

var triggerRowId = (string)response["TriggerRowId"];   // set when the flow was started through the trigger table
var flowRunId    = (string)response["FlowRunId"];      // set when the flow was started directly
var message      = (string)response["Message"];        // "WARNING: …" if the flow was not started
```

**JavaScript:**

```javascript
const response = await Xrm.WebApi.online.execute({
  TemplateId: "3f6b2c1e-8a4d-4f7b-9c2e-1d5a7b9e0c42",
  PrimaryEntity: "invoice",
  PrimaryId: id,
  Mode: "pdf",
  FlowId: "b2e4c6a8-0d1f-4a3b-9c5e-7f8a1b2c3d4e",                // Power Automate cloud flow id (address bar, after /flows/)
  getMetadata: () => ({
    boundParameter: null,
    operationType: 0,                                  // 0 = action
    operationName: "st_GenerateDocument",
    parameterTypes: {
      TemplateId:    { typeName: "Edm.String", structuralProperty: 1 },
      PrimaryEntity: { typeName: "Edm.String", structuralProperty: 1 },
      PrimaryId:     { typeName: "Edm.String", structuralProperty: 1 },
      Mode:          { typeName: "Edm.String", structuralProperty: 1 },
      FlowId:        { typeName: "Edm.String", structuralProperty: 1 }
    }
  })
});
const { TriggerRowId, FlowRunId, Message } = await response.json();
```

**HTTP:**

```http
POST https://contoso.crm4.dynamics.com/api/data/v9.2/st_GenerateDocument HTTP/1.1
Authorization: Bearer <Token>
Content-Type: application/json; charset=utf-8
Accept: application/json
OData-MaxVersion: 4.0
OData-Version: 4.0

{
  "TemplateId": "3f6b2c1e-8a4d-4f7b-9c2e-1d5a7b9e0c42",
  "PrimaryEntity": "invoice",
  "PrimaryId": "9d4e2b7a-1c3f-4e8d-b2a6-5f7c9e1d3b80",
  "Mode": "pdf",
  "FlowId": "b2e4c6a8-0d1f-4a3b-9c5e-7f8a1b2c3d4e"
}
```

> **Without code:** The flow also works without code: in the assistant “Manage buttons in Dynamics”, you choose it in the step “Should a Power Automate flow run afterwards?”; the button then passes it along as `FlowId` (see Buttons: the assistant: The step “Should a Power Automate flow run afterwards?”).

- **The recommended way:** a flow with the trigger on the trigger table of Smart Templates. The action creates a row there with flow, template, table and record, with the email actions also with the email, and the flow starts. This is how the flow management in the designer creates it (button “↻ Manage flows”, see Flows: Managing flows; what the created flow already contains is described under Flows: The skeleton of the created flow). If you build it yourself (the long way), you create in a solution a cloud flow with the trigger “When a row is added, modified or deleted” (Microsoft Dataverse). The settings for it are: change type “Create”, table name “Smart Templates Auslöser” (`st_ausloeser`), scope “Organization” and, under “Filter rows”, the entry `st_flowkennung eq '<ID of the flow>'`. After you save the flow, the ID is in the address bar after “/flows/”. Switching it on comes on top of that. Without the row filter, the flow also picks up the requests of other buttons. The English names have been checked against Power Automate, the German field names have not. The row carries `st_vorlageid`, `st_zieltabelle`, `st_datensatzid`, `st_zielset` and, with the email actions, `st_emailid`; with these the flow fetches the document itself. Which read privilege the flow’s account needs on this table is described under Rights and roles: Printing documents.
- **The second way:** a flow with a Dataverse row trigger on the table of the record (with the email actions also on `email`; the flow then receives the email that was created). The action starts it directly, `FlowRunId` names the system job. It must be on-demand (`ondemand`), otherwise the check rejects it; the same applies to a flow on the trigger table whose trigger does not listen for new rows.
- A job is only queued if the template came as `TemplateId` (not as `TemplateJson`), a record is present and the caller may read it. Otherwise “WARNING: Der Flow … wurde NICHT beauftragt” appears in `Message`; the document comes anyway.
- A flow must be in a solution. A flow under “My flows” cannot be addressed by Dataverse.
- With `st_GenerateDocument`, the flow runs only for a real PDF (`Mode=pdf`); the check is made in every mode. With e-invoice the same applies: `Mode=vorschau` and `Mode=erechnung` do not trigger a flow, and a `FlowId` passed along is checked and reported with `WARNING:`.

### Errors and warnings

If an action aborts, no document is created. A rejected call brings along a sentence in plain text that you may display unchanged. In the calling plugin it arrives as `FaultException<OrganizationServiceFault>`, not as `InvalidPluginExecutionException`. In JavaScript the promise is rejected, over HTTP the status is 400. The message names the reason, with `st_GenerateDocument` in English. The exceptions are the aborts of the e-invoice (including the rejection of the PDF/A) and all aborts of `st_GenerateEInvoice`: they come in the language of the calling user — German with a German interface, otherwise English; an application user without user settings gets English. Warnings in `Message` are always in English. If the document comes with a warning, it is in `Message` and begins with `WARNING:`.

**C#:**

```csharp
using System.ServiceModel;

try
{
    var response = service.Execute(request);
    var message = (string)response["Message"];
    if (message.Contains("WARNING:"))
    {
        // The document exists, but with a warning – e.g. write it to a log
    }
}
catch (FaultException<OrganizationServiceFault> fault)
{
    // fault.Detail.Message states the reason, e.g. a missing read privilege
    throw new InvalidPluginExecutionException("No document: " + fault.Detail.Message);
}
```

**JavaScript:**

```javascript
try {
  const result = await generateDocument(formContext);
  if (result.Message.includes("WARNING:")) {
    // The document exists, but with a warning
  }
} catch (error) {
  Xrm.Navigation.openAlertDialog({ text: "No document: " + error.message });
}
```

**HTTP:**

```http
HTTP/1.1 400 Bad Request
Content-Type: application/json; odata.metadata=minimal

{
  "error": {
    "code": "0x80040265",
    "message": "the server-side data build FAILED: 'Invoice' entity doesn't contain attribute with Name = 'Date' … No document was created: … Please check the record id, the entity name and the read privileges of the calling user."
  }
}
```

#### Markers in Message

| Marker | Meaning |
|---|---|
| `Client-Daten` | The document was created without real data from Dynamics: no record or no valid record, or the template has no data source. Normal in the designer, an empty document in an email. |
| `Fremde-Tabelle` | The primary source of the template is on a different table than `PrimaryEntity`. |

`st_GenerateDocument` only warns; the document comes anyway, but with `Fremde-Tabelle` without a flow. The email actions abort with both markers: better no email than a wrong document at the customer. A record for which the query returns nothing makes every print action abort with an error.

### Rules

- **Privileges:** The action reads with the privileges of the caller. Read privilege is required on the main table of the template and on every table it fetches data from (see Rights and roles: Printing documents). There is no security privilege of its own for the action.
- **Saved template:** `TemplateId` is the ID of a template (`st_smarttemplate`); its saved version is printed.
- **Inputs as text:** IDs are text as well. Pass them without curly braces; `formContext.data.entity.getId()` returns them with braces, hence the `replace` in the example.
- **Duration:** A document usually takes a few seconds, the first one after a longer pause ten to seventeen seconds (see Keep warm).
- **No loops:** Do not call the action in a loop over many records: every call builds a PDF, and the sandbox gives an operation two minutes. Batches belong in an asynchronous job or a flow.

### st_GenerateDocument: all inputs and outputs

#### Inputs

| Name | Required | Meaning |
|---|---|---|
| `TemplateId` | yes, or `TemplateJson` | ID of the template (`st_smarttemplate`). |
| `TemplateJson` | yes, or `TemplateId` | The template as JSON, instead of loading it. That is how the designer works. |
| `PrimaryEntity` | no | Logical name of the table, for example `invoice`. |
| `PrimaryId` | no | ID of the record. |
| `Data` | no | Sample data as JSON, for the preview only. |
| `Mode` | no | `pdf` (default), `layout` (drawing commands instead of PDF), `plan` (only the query plan, without running the template’s queries), `vorschau` or `erechnung` (both for the designer, see E-invoice). |
| `FlowId` | no | ID of a cloud flow in Power Automate that is to run after the document. See Starting a flow. |
| `Trace` | no | Switches the query log on. |

If the record is missing, the document is created from the sample data sent along. `Message` then carries the marker `Client-Daten` (see Markers).

#### Outputs

| Name | Meaning |
|---|---|
| `PdfBase64` | The document as Base64. Empty with `layout` and `plan`, with `erechnung` and with an e-invoice “XML only” without a reading copy. |
| `XmlBase64` | The e-invoice as a separate XML file (Base64): with “XML only” (`pdf`, `vorschau`) and with `erechnung`, if the XML is valid. Otherwise empty, also with “PDF with embedded e-invoice”: there the XML is inside the PDF. If you evaluate the output: `XmlBase64` filled means deliver an XML file, `PdfBase64` filled a PDF. |
| `FileName` | The name of the PDF in `PdfBase64`: the PDF name of the template (see Template settings: PDF name), without it the name of the template with `-` instead of the characters that are not allowed in file names, and `.pdf`; the same name that the email actions give the attachment. Empty if `PdfBase64` is empty. |
| `XmlFileName` | The file name of the e-invoice from the standard, for example `XRechnung_R-2026-0042.xml`, or the PDF name of the template with `.xml`. Empty if `XmlBase64` is empty. |
| `LayoutJson` | With `layout` the drawing commands as JSON. With `plan` the query plan as readable text in FetchXML notation, one `<fetch>` per query (not a single XML document). |
| `ChoicesJson` | The result of the template’s if-then choices (section `wahlen`), for example the chosen email template. Empty without `wahlen` and with `plan`. |
| `FlowRunId` | The system job of a flow started directly. Otherwise empty. |
| `TriggerRowId` | The row in the trigger table if a flow was queued through it. Otherwise empty. |
| `Message` | Success line, key figures and warnings. Warnings begin with `WARNING:`. |

All outputs are always present. “Not applicable” means an empty string.

### From buttons and Power Automate

#### From a button in Dynamics

For buttons in the Dynamics command bar, Smart Templates ships the library `st_button.js`. Its functions call the actions of this page. Which function calls which action is shown in the column *calls action* under What happens on click: The eight entries for the “Function” field. The functions `downloadEInvoice` and `downloadEInvoiceAll` call `st_GenerateEInvoice` (see E-invoice).

Which function serves which purpose and which parameters follow in which order is shown in the same place; how the path is written, under Buttons: the assistant: The path is done: test and path text; what users see on click and when a button aborts, under What happens on click. The assistant “Manage buttons in Dynamics” in the designer provides all values to copy.

#### From Power Automate

The actions are unbound and visible. In a flow, you call them through the Microsoft Dataverse connector with the action “Perform an unbound action”, for example `st_GenerateDocument` with `TemplateId`, `PrimaryEntity`, `PrimaryId` and `Mode` = `pdf`. The fields are called “Item/TemplateId”, “Item/PrimaryEntity”, “Item/PrimaryId” and “Item/Mode” there; in the flow that the designer creates, the step is named “Beleg erzeugen”. With `PdfBase64` you then create a file, send an email or start an approval. If the template has an e-invoice “XML only”, the XML is in `XmlBase64` and its name in `XmlFileName`; `PdfBase64` is then the reading copy or empty.

[Image: The expanded step “Beleg erzeugen” in Power Automate, with English labels. At the top left is a green Dataverse icon with the title “Beleg erzeugen”, on the right three vertical dots and a double arrow pointing left. Below it the tabs “Parameters” (active, underlined in blue), “Settings”, “Code view”, “Testing” and “About”. A red banner reports “Invalid connection, please update your connection to load complete details”. Next comes the required field “Action Name” with the value “st_GenerateDocument” and a blue loading circle beside it, then a divider and the selection “Advanced parameters” with “Showing 4 of 4” and the buttons “Show all” and “Clear all”. Below that are four fields one under the other: “Item/TemplateId” with the data value “body/st_vorlageid”, “Item/PrimaryEntity” with “body/st_zieltabe…”, “Item/PrimaryId” with “body/st_datens…” and “Item/Mode” with the text “pdf”. To the right of each field is a blue ×.]
Caption: The step “Beleg erzeugen” in the flow that the designer creates: the action `st_GenerateDocument` with its four fields. The red banner is shown here because no connection has been assigned to the example flow yet.
- Image marker 1: The head of the card with the Dataverse icon. The designer names the step “Beleg erzeugen”.
- Image marker 2: “Action Name”: the name of the action, here `st_GenerateDocument`.
- Image marker 3: The three IDs: template, table and record. In the created flow they come as data values from the trigger row.
- Image marker 4: “Item/Mode” with the value `pdf`: the document comes as a finished PDF, as Base64 text in `PdfBase64`.

### E-invoice

A template creates an e-invoice if its key `eRechnung` carries `"aktiv": true`. What the user sets and reads is described under E-invoice: ZUGFeRD and XRechnung. Mapping, checking, XML and PDF/A are handled by Smart Templates in a single place; the plugin and the local service call the same one. Templates without a switched-on e-invoice run as before.

The default is strict: if a required detail is missing, a check calculation does not match, a unit price is negative or the print rejects the PDF/A, nothing is created, not even a normal PDF or a reading copy. The error text is the sentence from the core. The only exception is `Mode=vorschau`. Amounts are rounded commercially to two decimal places before the check; prices, quantities and percentages are not.

#### The modes of st_GenerateDocument with e-invoice

| Mode | “PDF with embedded e-invoice” (ZUGFeRD) | “XML only” | E-invoice error | “Only if …” does not apply |
|---|---|---|---|---|
| `pdf` (default; button, email, flow, own code) | `PdfBase64` is the PDF/A-3 with the XML. | `XmlBase64` and `XmlFileName`; `PdfBase64` is the reading copy or empty. | Abort with the sentence from the core. | The document as before, a note in `Message`. |
| `vorschau` (only the full preview of the designer) | PDF/A-3 with the XML. | The normal PDF; plus `XmlBase64`. | The PDF without XML, plus `WARNING: e-invoice: …`. | Like `pdf`. |
| `erechnung` (“Check with sample record” in the designer, `st_GenerateEInvoice`) | No PDF; the report is in `LayoutJson`, `XmlBase64` with valid XML. | Likewise. | The report with the findings. | The report with `angewendet: false`. |

- `Mode=vorschau` and `Mode=erechnung` do not trigger a flow. `Mode=layout` and `Mode=plan` run without e-invoice; the plan collects its fields anyway.
- With a switched-on e-invoice, `Message` has a section “ · E-invoice: …” after the head line (in English, like the rest of the line). It names what was delivered: “embedded (PDF/A-3b, factur-x.xml, n bytes)”, “XML only (Datei, n bytes, with reading copy)”, “not applied (condition not met)” or “not created - the PDF has no e-invoice”. With “XML only” without a reading copy, the head line reads `OK: e-invoice XML, n bytes`, because there are no pages.
- All branches set `XmlBase64` and `XmlFileName`, empty where there is no e-invoice.

#### st_GenerateEInvoice: only the XML

| Input | Meaning |
|---|---|
| `TemplateId` | The template (`st_smarttemplate`) with a switched-on e-invoice. |
| `PrimaryEntity` | The table, for example `invoice`. |
| `PrimaryId` | The record. |

| Output | Meaning |
|---|---|
| `XmlBase64` | The e-invoice as XML (Base64); with ZUGFeRD the `factur-x.xml` that is otherwise inside the PDF. |
| `FileName` | The name from the standard, for example `XRechnung_R-2026-0042.xml`, or the PDF name of the template with `.xml`. |
| `Message` | `OK: e-invoice <Name> (<Dokument>), n bytes, <Datei>`, followed by the notes of the e-invoice (`WARNING:`). |

The action calls `st_GenerateDocument` with `Mode=erechnung`, with the caller’s privileges; data assembly and generator exist only once. It aborts if the record is missing, the document would not be created from the real record, the template has no switched-on e-invoice, its “Only if …” does not apply or the e-invoice has an error. The sentences are listed under Problems and messages: E-invoice. The pre-check for PDF/A does not count here because no PDF is created.

#### st_StandardLesen and st_StandardHochladen: the standards

| Input of st_StandardLesen | Meaning |
|---|---|
| `Kennung` | For example `xrechnung-ubl`. Empty returns the list of all standards, bundled and custom. |
| `Fassung` | For example `3.0.2`. Empty is the latest valid one. |
| `Teil` | Empty or `uebersicht`, `pflicht`, `abschnitt:<id>`, `codeliste:<id>` (JSON); `anmerkung` (the explanation file), `schema:<datei>` (a file of the schema set), `formatschema` (text); `vorschlaege` (the suggestions from the standard fields of the Dynamics invoice, JSON; with an identifier, tailored to the standard); `format` (the description from Own standards for the e-invoice as Markdown, in the output `Text`); `liste`. `format`, `formatschema` and `vorschlaege` work without an identifier. |
| `Sprache` | `de` or `en` for the texts of the overview. |
| Outputs | `Json` for the list and overview, `Text` for files (the other one is empty in each case), `Message`. An unknown standard or part is an error with a German sentence. |

| Input of st_StandardHochladen | Meaning |
|---|---|
| `Inhalt` | An explanation file (XSD) as text, or |
| `PaketBase64` | a ZIP with the explanation file and, with a schema set of your own, that set as well, as Base64, 768 KiB packed at most. |
| `Ersetzen` | `ja` replaces an existing standard of the same version. Empty or `nein`: does not. Any other value is an error. |
| Output `Ergebnis` | JSON with `ok`, `kennung`, `fassung`, `befunde`, `id` and `ersetzt`. On rejection `ok: false` with the findings; this is not an exception, the list of findings with their locations is the answer. |

- Checking happens before anything is stored; the identifiers of the bundled standards are blocked. Storing happens with the caller’s privileges: the role “Smart Templates Designer” has create and write privileges on the table of custom standards (see Rights and roles: Designing templates).
- Reading runs with the system’s service: whoever may print does not need a privilege on this table.
- Only the web API can delete, and only custom standards (table `st_erechnungstandard`, role “Smart Templates Designer”). Bundled ones cannot be deleted.

#### The button

The functions `SmartTemplates.Button.downloadEInvoice` and `…downloadEInvoiceAll` call `st_GenerateEInvoice` and offer the XML for saving, with several rows in a ZIP file. They do not know a flow (see What happens on click: The e-invoice).

### Actions of the AI assistant

#### st_FormatLesen

Input `Teil`: `Grundlagen`, `Daten`, `Ausdrücke`, `Objekte`, `Tabellen`, `Beispiel`, `E-Rechnung`, `E-Rechnung-Listen` or `alle`; empty returns the list of parts. Output `Text`: the part of the format description as Markdown, the same description as in the chapter Template format.

#### st_VorlageAendern

| Name | Meaning |
|---|---|
| `VorlageId` | ID of the template (`st_smarttemplateid`). |
| `Aenderungen` | The change as a JSON Patch (RFC 6902) against the JSON of the saved template. All or nothing: if one step fails, none applies. |
| `Beschreibung` | Required: one sentence saying what is changed and why. The designer displays it. If it is missing, the action answers with `ok: false` and an error whose `wo` is `Beschreibung`. |
| `Ergebnis` (output) | JSON with `ok`, `fehler` and `hinweise` (each with `wo` and `was`), `angewendet`, `vorlage`, `aenderungId` and `text`. |

The action reads the template with the caller’s privileges, applies the change, checks the result as with import and stores it in “Smart Templates KI-Änderung”. It does not change the saved template. An error comes as a response with `ok: false`, not as an exception. The designer takes the stored change over into the open template (see Working with the AI assistant in Copilot: What happens then).

---

## Template format

*For developers · Page en/vorlagenformat.html*

> **In short:** Every template is a JSON file. The designer writes it, the renderer reads it. “Export” downloads the file, “Import” loads a file back into the designer. This page describes every key: what it does, which values are allowed and what applies when it is missing.

### Structure at a glance

A template is a JSON object. The most important keys at the root:

- `name`, `culture` and the number and date settings,
- `page`: sheet size and margins,
- `brand`: default font and line spacing,
- `sources`: the data sources with relationships and rules,
- `variables`: custom variables,
- `body`: everything on the sheet (texts, images, codes, groups, tables, shapes, page breaks),
- `eRechnung`: when switched on, the e-invoice for the document (assignment to a standard).

```json Smallest complete template
{
  "name": "Sample",
  "culture": "en-US",
  "page": { "widthMm": 210, "heightMm": 297 },
  "body": []
}
```

### Ground rules

- **Spelling:** keys in camelCase, exactly as in the tables. The renderer also reads many keys in other upper and lower case, the designer does not. Values of `type` (for example `"Group"`) are always case-sensitive.
- **Units:** positions and sizes in millimetres (keys end in `Mm`), stroke widths and font sizes in points (`Pt`), rotation in degrees (`rotDeg`).
- **Numbers as numbers:** `"xMm": 10`, not `"xMm": "10"`. Only under `page` does the designer convert number text.
- **Colours:** `#RGB`, `#RRGGBB` or `#RRGGBBAA` (the `#` may be omitted) or a colour variable `{{@Name}}`. Colour names such as `red` count as »no colour« and are reported.
- **If a key is missing**, its default applies. `null` does not override a default.
- **Unknown keys** are not an error, but they have no effect. The renderer reports them as a warning (at the root, under `page` and `page.margins`, on every object, in `style`, `columns[]`, `variables[]` and `sources[]`). Under `brand`, `page.border`, `rows`, `cells`, `bild`, `anchor`, `sorts`, `borders`, `variants`, in if-then branches and in `relations[]`, `fields[]` and `rules[]` (including `select`, `group`, `vars`) they are skipped silently.
- **Keys starting with `_`** are notes of the designer. They have no effect and are not reported (except under `page` and `page.margins`). Do not write your own.
- **Strict JSON:** no comments, no trailing comma, no BOM. At most 128 JSON levels; every group counts two, which is enough for about 60 nested groups.

> **Good to know:** When opening a template, the designer converts some old forms (for example `"Band"` to `"Group"`, or a table directly on a relationship to a table on a rule). The converted form is printed only after the template has been saved in the designer.

### The root

| Key | Type | Default | Meaning |
|---|---|---|---|
| `name` | Text | – | Name of the template. In Dynamics the name of the record applies. |
| `culture` | Text | `de-DE` | Language of the template: dates, month names, yes/no words, number style; as long as `optionLabelLanguage` is empty, also the language of the option labels. An unknown code prints German, with a warning. The interface offers `de-DE`, `de-AT`, `de-CH`, `en-US`, `en-GB`. |
| `dateFormat` | Text | short format of the language (`d`) | Format for date values without their own pattern. .NET patterns such as `MM/dd/yyyy` or `%%benutzer` (format of the user who prints). |
| `dateTimeFormat` | Text | `g` | The same for date with time, for example `MM/dd/yyyy HH:mm`. |
| `currencySymbol` | Value with if-then | `€` | Currency symbol for `{{Currency:…}}`. Where it goes depends on the effective country style (`numberStyle`, otherwise from `culture`; on a variable its own): `en` in front without a space (`$1,234.56`, `-$1,234.56`, `R$1,234.56`), but with a non-breaking space if the symbol ends in a letter or a period (`CHF 1,234.56`, `-CHF 1,234.56`, `Fr. 1,234.56`), `ch` in front with a non-breaking space (`CHF 1'234.56`, `CHF -1'234.56`), otherwise after the amount with a non-breaking space (`1.234,56 €`). Empty means `€`, not »no symbol«. May be a placeholder, read on the main record. |
| `currencyDecimals` | Value with if-then | `2` | Decimal places for currency, `0` to `10`. Does not apply to `{{Number:…}}`. Like `currencySymbol`, it may be a placeholder, read on the main record. |
| `numberStyle` | Value with if-then | from `culture` | Country style: `de` 1.234,56 · `en` 1,234.56 · `fr` 1 234,56 · `ch` 1'234.56 · `plain` 1234.56. Also decides where the currency symbol goes. |
| `thousandSeparator` | Value with if-then | empty | `an` (on), `aus` (off) or empty. Empty: automatic decimals without separator, fixed decimals with separator. |
| `optionLabelLanguage` | Value with if-then | empty | Option label language: in which language choice, multi-select, yes/no, status and status reason fields from Dynamics print their label. The ID of the language in Dynamics as text (`"1031"` German, `"1033"` English; the designer offers the installed languages) or a code like `en-US`. Empty: the language from `culture` (`de-AT` and `de-CH` count as German, `en-GB` as English). If a label is missing in this language or the language is not installed in Dynamics, the base language of the environment is printed. No placeholder; a value that is not a language counts as empty and is reported as a warning. Conditions still compare with the label in the language of the user who creates the document. |
| `orphanLines` | Number | `2` | Minimum lines of a split text per page. |
| `minPages` | Number | `0` | Minimum number of pages; missing pages are added empty (at most 200). |
| `repeatTableHeader` | Yes/No | `true` | Default for all tables: repeat the header row on following pages. |
| `pdfName` | Value with if-then | empty | PDF name: the name of the file without `.pdf`, a text with placeholders as in the document, for example `"Invoice {{invoicenumber}}"`. Evaluated once per document on the main record. Characters that are not allowed in file names (such as `/`, `:` or `?`), control characters and any whitespace become `_`; `.pdf` is added. The name is used for the attachment of the e-mail actions, the output `FileName`, the download in the designer and the title of the PDF; an e-invoice »XML only« gets the same name with `.xml` (the file inside a ZUGFeRD PDF is always called `factur-x.xml`). Empty: the previous name. If it gives nothing for a record: the name of the template, as for the e-mail attachment. For a new template the designer inserts `{{<name field of the main source>}}`. |
| `pdfNameMax` | Number | `200` | At most this many characters for `pdfName`; the rest is cut off, `.pdf` does not count. 1 to 200, more counts as 200. |
| `page` | Object | A4, margins 18/15/18/20 | Sheet, see below. |
| `brand` | Object | Arimo, line spacing 1 | Font and line spacing, see below. |
| `sources` | List | – | Data sources, see below. Without a primary source the designer asks for one when opening. |
| `variables` | List | – | Custom variables, see below. |
| `body` | List | `[]` | The objects on the sheet, see below. |
| `eRechnung` | Object | – | The e-invoice for the document: which standard, which output and which value goes into which field, see »E-invoice (eRechnung)«. |
| `wahlen` | Object | – | If-then choice of the e-mail template for buttons in Dynamics: `{ "mailvorlage": { "faelle": [ { "wenn": condition, "dann": ID of the e-mail template } ], "sonst": ID } }`. The first matching case wins, otherwise `sonst` applies; a case without `dann` is skipped. Evaluated on the main record when the document is created; the result is used only if a button or the action `st_CreateEmail` or `st_SendEmail` passes no `EmailTemplateId` (an e-mail template that is passed takes precedence). No effect on the document. |
| `varLabels` | Object | – | Display names of variables in the designer, `{ "path": "display name" }`. No effect on printing. |
| `guidesOff` | Yes/No | `false` | Guide lines off in the designer. No effect on printing. |
| `art` | Text | empty | Only on a building block: `"baustein"`. If the key is missing, the file is a template. Set when created and fixed afterwards: do not write or change it. |
| `bausteinKennung` | Text | – | Only on a building block: its fixed key (GUID) by which import and building block objects find it again in every environment. Assigned when created and fixed afterwards. |
| `bausteine` | List | – | Only in an exported file: the building blocks the template uses, each once in full, each with `geaendertAm` (time of the last change, only shown on import). The import takes identical ones, creates missing ones and lets you choose for differing ones; the saved template does not contain the key. Do not write it. |

These keys occur but should **not** be written: `templateId`, `version`, `rendererVersion` and `dataSource` (no effect), `warmhalten` and `istAktiv` (mirrors of columns of the record), `pageHeader` and `pageFooter` (old form, converted to repeating groups when read).

### Sheet and margins (page)

| Key | Type | Default | Meaning |
|---|---|---|---|
| `widthMm` | Number | `210` | Sheet width. The sheet is made only from `widthMm` and `heightMm`; landscape means swapped dimensions. |
| `heightMm` | Number | `297` | Sheet height. |
| `size` | Text | `A4` | Only a label (`A4`, `A3`, `A5`, `Letter`, `Legal`, `custom`). Sets no dimension. |
| `sizeName` | Text | – | Remembers the choice in the designer, same values as `size`. |
| `margins` | Object | 18/15/18/20 | Page margins: `topMm`, `rightMm`, `bottomMm`, `leftMm`. Short forms such as `top` are not read. |
| `ignoreMargins` | Yes/No | `false` | All margins count as 0 (the values stay stored). |
| `border` | Object | – | Frame around every page, see next table. |

| Key in `page.border` | Type | Default | Meaning |
|---|---|---|---|
| `enabled` | Yes/No | `false` | Main switch. |
| `color` | Colour | `#333333` | Stroke colour. |
| `widthPt` | Number | `1` | Stroke width; 0 prints no frame. |
| `insetMm` | Number | `0` | Distance from the sheet edge. |
| `firstSpecial`, `lastSpecial` | Yes/No | `false` | The first or last page gets its own frame. |
| `first`, `last` | Object | – | That own frame: `enabled` (default `true`), `color`, `widthPt`, `insetMm`. It inherits nothing from the main frame. |

### Font and line spacing (brand)

| Key | Type | Default | Meaning |
|---|---|---|---|
| `bodyFont` | Text | `Arimo` | Default font for text without its own font and for `style.font = "body"`. A font must be uploaded to Dynamics; if it is missing, Arimo prints with a warning. |
| `headingFont` | Text | `Arimo` | Font for `style.font = "heading"`. The designer sets both the same. |
| `lineSpacing` | Number | `1` | Default line spacing, at most 5. |
| `listIndentMm` | Number | `5` | Indent per list level, at most 20. |

`logoAssetId`, `accentColor`, `accentColor2` and `headingColor` occur in older templates and have no effect on printing.

### Values with if-then

`currencySymbol`, `currencyDecimals`, `numberStyle`, `thousandSeparator`, `optionLabelLanguage` and `pdfName` are objects with a fixed value and branches. A plain value (`"currencySymbol": "$"`) is also read and counts as a fixed value without branches.

```json Value with if-then
"currencySymbol": { "value": "€", "rules": [ { "when": "country == 'US'", "value": "$" } ] }
```

| Key | Type | Meaning |
|---|---|---|
| `value` | Text | Applies when no branch matches. |
| `rules` | List | Branches `{ "when": condition, "value": value }`. The first branch with an empty or true condition wins. |

- It is evaluated once per document on the main record.
- Custom variables (`@Name`) also work in the condition, and in the value (`{{@Name}}`). If such a variable itself depends on this setting (a cycle), the choice made with the template's fixed values applies, and the document reports a warning (»template setting '…' is circular«). It names where the variable stands: in the value with »its value reads the custom variable '@…'«, in a condition with »a condition in its branches reads a custom variable«.
- A matching branch with an empty value yields the built-in default (`€`, 2 decimals, style of the language, for `optionLabelLanguage` the language from `culture`, for `pdfName` the name of the template, as for the e-mail attachment), not the fixed `value`.
- `optionLabelLanguage` with `{ "value": "", "rules": [ { "when": "country == 'US'", "value": "1033" } ] }` prints the option labels in English for customers in the US, otherwise in the language from `culture`.
- `pdfName` with `{ "value": "Rechnung {{invoicenumber}}", "rules": [ { "when": "country == 'US'", "value": "Invoice {{invoicenumber}}" } ] }` names the file `Invoice_R-1.pdf` for customers in the US, otherwise `Rechnung_R-1.pdf`.
- The checkbox “Take the currency from the record” has no key of its own. It consists of a relationship of the primary source with `"kind": "lookup"` to `transactioncurrency` (named `Currency` by the English designer, `Waehrung` by the German one) and the fixed value `{{Currency.currencysymbol}}` in `currencySymbol` and `{{Currency.currencyprecision}}` in `currencyDecimals`; if the relationship has a different name, that name is in the placeholder. The designer recognises the checkbox by this relationship and by the placeholder in `currencySymbol`. Leave both in place.

### Custom variables (variables)

A custom variable has one single value everywhere in the document. In text it is written `{{@Name}}`, in conditions `@Name`.

| Key | Type | Default | Meaning |
|---|---|---|---|
| `name` | Text | required | Unique; case counts; spaces are allowed, `{ } \| :` are not. With duplicate names the first one applies, with a message. |
| `type` | Text | `text` | `text`, `number`, `currency`, `boolean`, `date` or `color`. Always state it. Only `number` and `currency` calculate. |
| `default` | Text | – | Value when no branch matches. Text or formula with `{{…}}`; for `number` and `currency` also a plain `sum(quote_details.amount)` (over a relationship, not over a rule result), for `date` a plain `dateadd(…)`. |
| `rules` | List | – | Branches `{ "when": condition, "value": value }`; the first matching one wins. A match with an empty value yields EMPTY. |
| `symbol` | Text | template | Only `currency`: own currency symbol (may be a placeholder). If it reads a variable whose own symbol is a placeholder again (also the variable itself), it is resolved only one level deep: the inner placeholder appears literally in the document, and the document warns. |
| `decimals` | Text | template | Decimal places `0` to `10`. Empty: for `currency` the decimals of the template, for `number` automatic up to 4. |
| `numberStyle` | Text | template | `de`, `en`, `fr`, `ch` or `plain`. |
| `thousandSeparator` | Text | template | `an` (on), `aus` (off) or empty. |

- All custom variables are calculated once per document on the main record, **after** the data has been loaded and **before** the first rule runs. That is why they do not see rule results.
- A cycle (A reads B, B reads A) makes all involved variables empty and is reported.
- Display per type: `number` in the number style, `currency` with symbol, `date` in `dateFormat`, `boolean` as yes/no in the template language, `text` and `color` literally.

```json Custom variables
"variables": [
  { "name": "PaymentTerms", "type": "text", "default": "14 days",
    "rules": [ { "when": "totalamount > 1000", "value": "30 days" } ] },
  { "name": "Gross", "type": "currency", "default": "{{sum(quote_details.baseamount)}} * 1.19" },
  { "name": "Due", "type": "date", "default": "{{dateadd(createdon, 30, day)}}" }
]
```

### Data sources (sources)

`sources` is a list of sources. The **primary source** is the record the document is printed for (for example a quote). **Additional sources** are lists that are loaded independently of it (for example all currencies). Relationships hang below every source, rules hang below sources and relationships.

#### Source

| Key | Type | Default | Meaning |
|---|---|---|---|
| `id` | Text | – | Identifier, for example `src1`. |
| `name` | Text | – | Display name. |
| `primary` | Yes/No | `false` | Primary source. Set it to `true` on exactly one source. When printing without `true` the first source applies, but when opening, the designer asks for a primary source and creates a new source for it. |
| `entity` | Text | required | Logical table name, for example `quote`. |
| `basePath` | Text | primary source `""` | Primary source: must be empty. Additional source: required, not empty; its list lies at the root under this name. The designer uses the table name. |
| `idAttr` | Text | – | Primary key, for example `quoteid`. Saves a query. |
| `fields` | List | – | Used fields, see »Field«. If the list is missing or empty, all columns are fetched. |
| `relations` | List | – | Relationships. |
| `rules` | List | – | Rules on the source. |
| `sampleId` | Text | – | Sample record of the draft (GUID). |

The designer maintains `set`, `nameAttr`, `locked`, `sampleName` and `sampleMissing` itself.

#### Field

| Key | Type | Meaning |
|---|---|---|
| `name` | Text | Required: exact logical column name. A lookup is called `_<column>_value` (for example `_customerid_value`). For `{{x_code}}` and `{{_x_value_id}}` only `x` or `_x_value` goes into the list. |
| `label` | Text | Display name; maintained by the designer. Leave it out for new fields. |
| `type` | Text | `string`, `number`, `money`, `date`, `boolean`, `optionset`, `lookup`, `image` or `file`. Always state it; for lookups `lookup` (otherwise the design canvas shows the GUID instead of the name). |

> **Caution:** If `fields` is not empty, **only** what it lists is queried (plus key columns and relationship fields). A used but unlisted field stays empty. A warning appears only for fields behind relationships and in table cells, not for fields of the main record. List every used field, including sort and filter fields of rules. Do not add the primary key as a field, it belongs in `idAttr`.

#### Relationship

| Key | Type | Meaning |
|---|---|---|
| `name` | Text | Required. The name is the path segment in the placeholder (`{{Customer.name}}`). When creating a relationship the designer uses the navigation name from Dynamics; older templates also carry freely chosen names such as `Customer` or `Items`. Both work, because loading uses `entity` and `refAttr`. Only letters, digits and `_`, unique among the fields and rules of the same level. |
| `kind` | Text | Required: `lookup` (N:1, one record) or `collection` (1:N, a list). Anything other than exactly `collection` counts as N:1. |
| `entity` | Text | Required: target table (for `collection` the child table). |
| `refAttr` | Text | Required. `lookup`: the lookup column on the parent row (for example `customerid`). `collection`: the foreign key on the child table (for example `quoteid`). |
| `idAttr` | Text | Primary key of the target table (saves a query). |
| `fields`, `relations`, `rules` | Lists | as for the source. |

If `name` or `entity` is missing, the relationship is skipped silently; if `refAttr` is missing, with a message. If `kind` is missing or contains anything other than `collection`, it counts as N:1. So always state all four. A relationship is loaded only if something in it is bound. Relationships are loaded at most six levels deep.

#### Rule

A rule takes the rows of a list (relationship `collection` or additional source) and filters, groups, sorts and selects them. Its result lies **as a sibling of the relationship on the parent node** under the rule name.

| Key | Type | Default | Meaning |
|---|---|---|---|
| `id` | Text | – | Identifier, unique in the template. |
| `name` | Text | required | Unique in the whole template and different from every field and relationship on the parent node, its own included; if the result lies at the root, also different from the list of every further source (otherwise the result replaces them). The name field in the designer does not accept such a name; the check gives a hint, the document a warning. The path segment is derived from it: whitespace becomes `_`, punctuation is dropped (»Size (m²)« becomes `Size_m`). |
| `filterExpr` | Text | no filter | Condition per row, without `{{ }}` (see »Conditions«). |
| `group` | Object | – | Grouping: `by` (list of fields of the row itself, without dot path; empty = everything into one row) and `aggs` (calculations). |
| `select` | Object | – | Sorting and selecting. |
| `vars` | List | – | Rule variables, see below. |

| Key in `group.aggs[]` | Meaning |
|---|---|
| `name` | Name of the new field. |
| `fn` | `sum`, `count`, `avg`, `min` or `max`. |
| `field` | Field of the row (also via a lookup, `Product.price`); meaningless for `count`. |
| `nachkomma` | Only `sum` and `avg`: every value is first rounded to these decimals, then summed. A whole number from `0` to `6`; more counts as 6, a negative number as no value, and so does a value that is not a number (for example `"abc"`); the check reports it as a note. If it is missing, the decimals of the template apply. |

| Key in `select` | Meaning |
|---|---|
| `mode` | empty = all rows (sort only) · `topN` = the first n · `first`, `last`, `nth` = **one single record** (not table content). The selection only shortens the result, not the loading; only a filter loads less. |
| `n` | Number for `topN`, position for `nth` (from 1). A whole number; whatever cannot be read as a whole number (for example `"abc"`) counts as no value, that is 1, and the check names it as a note. |
| `sorts` | Sort levels `{ "by": field, "dir": "asc" or "desc" }`. Empty values always come last. |

Order inside a rule: filter → grouping and calculations → sorting → selecting → rule variables. After `group` only the `by` fields and the calculations remain.

| Key in `vars[]` | Meaning |
|---|---|
| `name` | Name of the new field in every result row. |
| `type` | Always state it: `number` or `currency` calculate, `text` concatenates, `boolean`, `date`, `color` insert values. |
| `default` | Formula; **every reference in `{{ }}`**, for example `{{baseamount}} * 1.19`. |
| `rules` | Branches `{ "when": condition, "value": formula }`, condition against the row. |

#### Where the result of a rule lies

| Rule sits on … | Result lies under … | Example |
|---|---|---|
| a relationship directly below the primary source | the rule name at the root | rule »Open« on `quote_details` → `Open` |
| a relationship below a lookup | lookup name + rule name | rule »Active« on the contacts of the customer → `Customer.Active` |
| a relationship below a list | the rule name in **every row** of the outer list | rule »Expensive« on the batches of every item → in a table on the items `itemsPath: "Expensive"` (relative) |
| an additional source | the rule name at the root | `AllCurrencies` |
| the primary source itself | the rule name at the root | `KeyFigure` (with `mode: first`) |

#### What a rule may see

- **Allowed:** its own row, fields via lookups, fields of the parent rows up to the root, aggregations over its own sub-lists, results of rules **below** it, on the same relationship and on a **neighbouring relationship** (their result lies at the common parent row); a rule on a **source** also reads the results of the rules on other sources; plus custom variables, `System.*`. Rules are calculated in the order of the plan: the rule that is read comes first.
- **Forbidden:** results of rules further up — for a rule on a **relationship** also the results of rules on a source (they lie at the root and count as »above everything«) —, the rule itself, cycles. A reference upwards is deleted and reported. A cycle switches off **all** rules.
- An additional source is always loaded completely; the rule shortens only afterwards.
- A rule only calculates if its result is bound somewhere (table, placeholder, other rule).
- **Empty stays empty:** if a field is on the row but empty, that holds for this row, also for its raw value `<field>_code`; a field of the same name further up does not step in. Only what the row does not have at all is looked up further up. This also applies to a path through an empty lookup that the level knows: if `currency` is empty on the row, `currency.name` in a rule filter is empty, even if a lookup of the same name further up is filled; `currency.name != ''` is then false.

```json Source with relationship and rule
"sources": [ {
  "id": "src1", "name": "Quote", "entity": "quote", "primary": true, "basePath": "", "idAttr": "quoteid",
  "fields": [ { "name": "name" }, { "name": "totalamount" } ],
  "relations": [ {
    "name": "quote_details", "kind": "collection", "entity": "quotedetail", "refAttr": "quoteid",
    "fields": [ { "name": "productdescription" }, { "name": "quantity" }, { "name": "baseamount" }, { "name": "sequencenumber" } ],
    "rules": [ { "id": "r1", "name": "Items", "filterExpr": "",
                 "select": { "mode": "", "sorts": [ { "by": "sequencenumber", "dir": "asc" } ] }, "vars": [] } ]
  } ],
  "rules": []
} ]
```

A table on this rule has `"itemsPath": "Items"`.

### Placeholders

A placeholder stands in double curly braces in the text: `{{…}}`. Paths are case-sensitive and consist of letters, digits and `_`, separated by dots.

| Form | Example | Meaning |
|---|---|---|
| Field | `{{name}}` | Field of the current level: the root, in a table cell the row. |
| via a lookup | `{{Customer.name}}` | `Customer` is the `name` of the relationship. |
| Display name of a lookup | `{{_customerid_value}}` | Name of the linked record without a relationship; `{{_customerid_value_id}}` is its GUID. Dynamics does not return the Dataverse column `customeridname`: it stays empty or makes printing fail. |
| Label of a choice | `{{statuscode}}` | Choice, multi-select, yes/no, status and status reason from Dynamics: the label in the option label language (`optionLabelLanguage`); multi-select separated by »; «. Also in a table cell, in `first(…)` and in a group row. |
| Raw value of a choice | `{{statuscode_code}}` | Number or true/false instead of the label. |
| Rule result (single value) | `{{MostExpensive.price}}` | Rule with `mode: first`, `last` or `nth`. |
| First value of a list | `{{first(Items.name)}}` or `{{Items[0].name}}` | A list on its own (`{{Items}}`) prints nothing. |
| Aggregation | `{{Currency:sum(Items.baseamount)}}` | `first`, `sum`, `avg`, `min`, `max` over a **field** of a list, that is a relationship `collection` or a rule result; `count` also over the list itself (`count(Items)`). The brackets hold exactly one field: with a calculation, a comma or a second aggregation (`sum(Items.price * Items.quantity)`) it stays empty — `count` still counts the rows —, and the document warns (»summary '…' could not be calculated«), also in a condition (there it is empty, not 0), in the value of a custom variable and in a rule formula; inside a calculation the empty result counts as 0, like an empty field. In a rule calculation, a sum, average, minimum or maximum whose field holds a calculation stays empty as well. |
| Custom variable | `{{@Gross}}` | Always the value on the main record. |
| Date arithmetic | `{{Date:dateadd(createdon, 30, day)}}` | see »Date arithmetic«. |
| System | `{{System.Date}}`, `{{System.DateTime}}`, `{{System.Time}}`, `{{Date:System.Now}}`, `{{System.User}}` | Today's date and the user who prints. |
| Page | `{{Page.Current}}`, `{{Page.Total}}` | Only in text (also header, footer, cell), never in conditions or formulas. |

#### Formatters

Without a formatter a date prints as ISO text and a number with a dot. Choice and yes/no fields from Dynamics appear with their label (»Yes«/»No«, »Paid«) in the option label language; real truth values (`_code`, rule variables without a type) appear as `True`/`False`, a rule variable of type `boolean` holding a truth value as »Yes«/»No« in the template language (its raw value is under `<Name>_code`). So always format. The names are case-sensitive.

| Placeholder | Effect |
|---|---|
| `{{Currency:totalamount}}` | Decimals, style and symbol of the template (or the variable). `{{Currency:totalamount\|USD}}` sets another symbol. |
| `{{Number:quantity}}` | Without a value as many decimals as needed, at most 4, without thousands separator. `{{Number:quantity\|2}}`: exactly 2 decimals, with separator. |
| `{{Date:createdon}}` | In the `dateFormat` of the template. `{{Date:createdon\|en-US\|MM/dd/yyyy}}` with language and own pattern; `{{Date:createdon\|\|yyyy-MM-dd}}` with pattern only. |
| `{{DateTime:createdon}}` | Like `Date`, with time (`dateTimeFormat`). |
| `{{Bool:field}}` | A yes/no field from Dynamics: its label in the option label language, also a custom one like »Unpaid«. Without a label from Dynamics (custom variable, rule variable, data without Dynamics): yes/no in the template language. |
| `{{Rich:field}}` | Display the field content as markup, for example HTML from Dynamics or Outlook. Named characters such as `&uuml;` or `&euro;` are read as in the browser. Whitespace between two paragraphs yields lines of its own, as in the browser: `</p> <p>` or `</p>\n<p>` one empty line, `</p>\n  <p>` (line break and indentation, as from Outlook) two; a line break directly after `<div>` before the first paragraph is exactly one. Otherwise data values always appear literally. |

#### Where a placeholder looks

- **In document text:** at the root (main record).
- **In a table cell:** in the row. What the row does not have stays empty; only custom variables, `System.*`, `Page.*` and aggregations over paths outside the row go to the root — the same in the cell text, in a cell condition and in the cell's if-then text. For such an aggregation the document loads the list even if it does not need it otherwise (one more query or join per list).
- **In a table inside a table cell:** `itemsPath` and all paths relative to the outer row.
- **In the simple column header `header`** placeholders are not resolved; use `headerCell` for that.

### Conditions

Conditions stand in `filterExpr`, in `when` of if-then branches and text versions (`variants`), in `visibleIf`, in `wenn` of image rules, of cases under `wahlen` and of cases of a list of the e-invoice, and in `w` of the branches of a dynamic text. They name fields **without** `{{ }}`. If a field is written in `{{ }}` anyway, the condition does not read it; the PDF warns, the check names the place, and in the e-invoice it is an error.

| Element | Meaning |
|---|---|
| `==` `!=` | equal, not equal |
| `>` `<` `>=` `<=` | greater, less |
| `contains` `notContains` `startsWith` `endsWith` | part of text, case-insensitive; with spaces before and after |
| `&&` `\|\|` `!` `( )` | and, or, not, brackets |
| `'Text'` or `"Text"` | text; a doubled character stands for itself (`'O''Neill'`) |
| `1.5` | number, always with a **dot** |
| `true` `false` `null` | truth values, empty |
| `@Name` | custom variable (as a whole side of a comparison) |
| `sum(…)` `avg(…)` `count(…)` `min(…)` `max(…)` `first(…)` | aggregation over a field of a list (as a whole side) |
| `dateadd(…)` | date arithmetic (as a whole side) |

- **No arithmetic** in conditions: `sum(a) * 1.19 > 5` does not work, nor does a calculation inside the brackets (`sum(a * b) > 5`, see »Placeholders«). Create a variable for that.
- Do **not** write `=`, `<>`, `&`, `|`, `AND`, `OR`, `UND`, `ODER` (also in lower case: `and`, `or`, `und`, `oder`), `not` or `isEmpty` (also `notEmpty`, `isNotEmpty`). That is reported, and the expression evaluates wrongly. If such a word belongs to the name of a custom variable with spaces (`@Shipping and Handling`), it does not count.
- **Incomplete:** if a part is missing (`a == 1 &&`, `|| b == 2`, `status !=` without a value, `!` with nothing after it, `()`), it is reported, and the missing part never counts as met: `a == 1 &&` is never true, `a == 1 ||` only if `a == 1` is true. A completely empty condition still means »always«.
- **Always a text:** A condition is written as text in quotes (`"visibleIf": "statecode_code == 0"`). Under `eRechnung`, a `wenn` or the `when` of an if-then branch without quotes (`true`, `false`, a number), as an object or as a list is an error: no e-invoice is created. If it always applies, leave `wenn` out or write `"when": ""`.
- **Choice and yes/no from Dynamics** arrive as a label (»Active«, »Yes«). Compare numbers via the raw value with `_code`: `statecode_code == 0`. A multi-select has a list of numbers as its raw value: `contoso_tags_code contains 100000001` checks whether this option is selected, `notContains` the opposite (the number without quotes; in quotes `contains` compares text). The designer writes it this way too when “by option value” is chosen. `contoso_print == true` and `contoso_print == false` follow the raw value of a yes/no field from Dynamics, even with custom labels such as »Unpaid«; so do the bare name (`contoso_print`, `!contoso_print`) and a yes/no variable that takes over the field: a custom one then prints »No«, a rule variable still prints the label and carries the raw value as `<Name>_code` next to it. Without a raw value (own data) the label counts: everything except the no-words is true. The comparison uses the label in the language of the user who creates the document, not the option label language that is printed.
- **Date:** `==` and `!=` always compare two date values by calendar day only. `<`, `>` and the like compare by day as soon as one side has no time (`createdon >= '2026-08-01'`).
- **Text:** `==` compares exactly, case counts.
- **Checking for empty:** `!field` means »empty«, `field` means »filled«. 0 and every zero with a dot (`0.00`), `false` and »nein«, »no«, »off«, »n«, »non«, »nee« and »nie« (case-insensitive) also count as »empty«; »0,00« with a comma, on the other hand, counts as filled. With `==` and `!=` empty equals empty: an empty or missing field, a field behind an empty lookup, `null` and the empty text `''` are equal to one another. So `field == ''` and `field == null` both mean »empty«, `field != ''` means »filled«. The number 0, a label such as »No« and a real truth value No do not count as empty there: for the raw value `field_code` of a yes/no field and for an own variable of type `boolean`, `== ''` and `== null` are false for No. Conversely, an empty value is neither yes nor no: `field == false` does not match an empty field, not even through a yes/no variable. Check whether a yes/no field is empty with `field == ''`, and whether it is No with `field == false`. A rule with `mode: first`, `last` or `nth` that found nothing is empty: `!MostExpensive` is true, `MostExpensive != ''` false, `count(MostExpensive)` is 0.
- **Unknown variable:** the result is always No, also with `!` and `!=`.

```json Conditions
"filterExpr": "statecode_code == 0 && (totalamount > 1000 || prioritycode_code == 1)"
"when": "count(quote_details) > 0 && name contains 'Ltd'"
"visibleIf": "discountamount == null"
```

### Formulas

Formulas stand in `default` and `value` of variables. Every reference stands in `{{ }}`. If only numbers, `+ - * /`, brackets and whitespace remain after inserting, it calculates; otherwise the text is concatenated.

- Decimal numbers with a **dot**: `{{net}} * 1.19`. A comma (`1,19`) turns the formula into text.
- A missing field counts 0. A real truth value (for example `{{contoso_print_code}}`) counts 1 or 0; the yes/no field itself is text (»Yes«) and turns the formula into text, and so does a rule variable of type `boolean`.
- A formatter in a reference does not apply in a formula: `{{Currency:net}} * 2` calculates with `net`, `{{Bool:contoso_print}}` inserts the value of the field (its label). This also holds for custom variables: `{{Currency:@Net}} * 1.19` calculates with the value of `@Net`.
- Dividing by 0 yields empty, with a message.
- There are no further functions (`round`, `%`, `^`).
- **Round first, then sum:** `sum` and `avg` round every single value to the display decimals before summing. That way the total matches the printed rows.

### Date arithmetic

`dateadd(base, count, unit)` calculates with whole days, months or years.

- **Base:** a field, `@Variable`, an ISO date (`2026-01-31`), `System.Now` or another `dateadd`.
- **Count:** number, field, `-field` or `@Variable`; decimals are cut off.
- **Unit:** `day` (default), `month` or `year` (also `tag`, `monat`, `jahr`).
- One month added to 31 January gives 28 February.
- The result is ISO text; to display it use `{{Date:dateadd(createdon, 30, day)}}`.
- `dateadd` always stands alone, nothing before or after it.
- If the calculation does not work out (count empty, missing or yes/no, unknown unit, base empty or not a date), nothing is printed and the document reports it, also for a bare `dateadd(…)` in the value of a variable.
- A pure time of day (»10:30«) is not a date in print: `{{Date:…}}` and `{{DateTime:…}}` print it as it is, also through a variable of type `date`; `dateadd` with it as the base gives nothing.

### Objects in the document (body)

`body` is a list of objects. Every object has a `type`. Objects also stand in `children` of a group and in table cells (`columns[].cell`, `columns[].headerCell`, `rows[].cells[].content`, `subRows[].cells[].content`).

| `type` | Object |
|---|---|
| `Text` | Text field with placeholders and markup |
| `Image` | Image |
| `Barcode` | Barcode, QR code or GiroCode (type in `barcode.art`) |
| `Group` | Container for other objects; with `repeatEveryPage` a header or footer |
| `Table` | Data table (with `itemsPath`) or free-form table (without `itemsPath`, with `rows`) |
| `Grid` | Grid of cells, older form: a new grid can no longer be created in the designer. For new templates use a free-form table (`Table` without `itemsPath`, with `rows`). |
| `Line`, `Rect`, `Ellipse`, `Triangle`, `Star`, `Arrow`, `Polygon` | Shapes |
| `PageBreak` | Page break, only directly in `body` |

#### Position and size

| Object | `xMm` counts from | `yMm` counts from |
|---|---|---|
| directly in `body` | left page margin | top of the usable area of sheet `pageIndex` (top margin or bottom edge of a header docked at the top) |
| header or footer (`repeatEveryPage`) | left page margin | top page margin |
| in a group | top left corner of the group | top edge of the group |
| in a table cell | cell plus padding | cell plus padding |

- `pageIndex`: design sheet, from 0. **Every object directly in `body` except header and footer needs it.** If no object carries a `pageIndex`, an older model applies: `yMm` is then an offset in the flow, and some rules (riding along, tables) work differently. If it is missing, the designer assigns the sheet itself when the template is opened, which can change the printout; the check on import reports it as a note, and an AI change that leaves an object without `pageIndex` is rejected (short rule 9).
- `wMm`: width. Required for text (without it there is one word per line). Group and grid without `wMm`: full width. Tables: sum of the column widths.
- `hMm`: height. `heightMm` is the older spelling and applies only when `hMm` is missing; the designer writes it for new groups in `body` (`25`).
- The width between the margins of an A4 sheet with the standard margins is 175 mm.

#### Common keys

| Key | Type | Default | Meaning |
|---|---|---|---|
| `id` | Text | – | Identifier, target of an anchor, name in messages. |
| `place` | Text | see below | Positioning behavior: `static` (Fixed position), `auto` (Flowing on contact), `flow` (Flowing). |
| `marginTopMm` | Number | `0` | Minimum distance upwards. Directly in `body` only with `auto`, in a group with `auto` and `flow`. |
| `visibleIf` | Text | visible | Condition: print the object only if true. Directly in `body` the space of a hidden object stays free; nothing moves up. A hidden group is missing together with its content. A header or footer with a false condition is missing on all pages and keeps no space free. A sheet that holds only hidden objects is dropped. |
| `keepTogether` | Yes/No | `true` | At a page break, move as a whole to the next sheet. `false`: may be split (long text). Works only directly in `body` for text, group and unrotated rectangle, not with `static` and not for header and footer. In a group, the group's value decides: with `false` on a group with `autoHeight: true`, a text in it also runs on past the sheet edge; a grid in it stays whole and moves to the next sheet together with everything beside it. On images, codes, lines, shapes, rotated rectangles and grids (`Grid`), printing ignores `false`: they always move as a whole; only a grid taller than a sheet is split, and only between two rows (with a message). |
| `rideAlong` | Yes/No | `true` | Only directly in `body` with `pageIndex`: an object that lies on a larger one with at least 20 % of its own area moves with it; not for `static`, tables, grids and page breaks, and not if the larger one itself moves along with another. `false` switches it off. |
| `frontRank` | Number | `0` | Front rank −50 to 50; higher lies in front. |
| `rotDeg` | Number | `0` | Clockwise rotation; only shapes, images and codes (codes only `0`, `90`, `180`, `270`). |
| `cornerRadiusMm` | Number | `0` | Corner radius: rectangle, fill and frame of group and text, table frame. |
| `style` | Object | – | Font, colour, fill, frame; see »Style«. |
| `anchor` | Object | – | Position relative to a sibling in the same group: `to` (its `id`), `h` (`alignLeft`, `alignRight`, `alignCenterH`, `rightOf`, `leftOf`), `v` (`alignTop`, `alignBottom`, `alignMiddle`, `below`, `above`), `dx`, `dy`. |

**If `place` is missing:** directly in `body` every object behaves like `auto`. In a group or cell, text, image, codes and shapes are fixed (`static`), groups, tables and grids behave like `auto`. The designer writes `"place": "auto"` for new texts, images, codes and shapes in `body`; new groups, tables and page breaks get no `place`.

- `static` stays exactly where it is and may overlap. Exceptions: a table starts at its design position but breaks across pages normally; a grid directly in `body` behaves like `auto`.
- `auto` stays where it is and only moves down if an object above would otherwise overlap it.
- `flow` keeps the drawn distance to the object above and moves down by exactly as much as that object grows. It never moves up. To move along, the object above needs a drawn bottom edge (table with data, group with height or text with `autoHeight: false`).

#### Header and footer

A group with `"repeatEveryPage": true` appears on every page. If its `yMm` is at most `0.5` (so it starts at most 0.5 mm below the top margin), it is a header, and the remaining content starts below it. If it ends at most 0.5 mm above the lower end of the printed area or lower, it is a footer, and the content ends above it. In between it is a free-standing area: the remaining content continues below it if it would otherwise run into it, across the full width.

- Position of the footer: `yMm` = sheet height − bottom margin − height − top margin. For A4 with the standard margins and 12 mm height: 297 − 18 − 12 − 18 = `249`.
- `pageRule`: `first`, `notFirst`, `last`, `notLast`, `even`, `odd`; empty = all pages.
- `excludePagesText`: exclude pages, for example `"1, 3-5"`.
- `reserveSpace` occurs in older templates and has no effect.

#### Text

| Key | Type | Default | Meaning |
|---|---|---|---|
| `value` | Text | – | Content with placeholders and markup; `\n` breaks the line. |
| `wMm` | Number | required | Width of the text field. |
| `autoHeight` | Yes/No | `true` | Height follows the text. `false`: `hMm` is the drawn height (for »Flowing« and riding along); the whole text is still printed, frame and fill as high as the text, an overflow is reported. |
| `minHeightMm`, `maxHeightMm` | Number | – | Height limits, only with `autoHeight: true`; what goes beyond `maxHeightMm` is dropped and reported. |
| `padTopMm`, `padRightMm`, `padBottomMm`, `padLeftMm` | Number | `0` | Padding. |
| `variants` | List | – | Text versions `{ "when": condition, "value": text, "name": … }`. The first matching one replaces `value` completely; if none matches, the text stays **empty**. The version with an empty `when` belongs at the end. |

**Markup in `value`:** `<b>`, `<i>`, `<u>`, `<s>` (strikethrough), `<sup>`, `<sub>`, `<br>`, `<span style="color:#C00000; font-size:12pt">`, paragraphs and lists `<p a="l" e="0" m="•">` (`a`: `l`, `c`, `r`, `j`; `e`: indent level 0 to 5; `m`: marker) (markers `•`, `–`, `▪`, `1.`, `a)`, `i.`), links `<a href="https://…">` (only `http`, `https`, `mailto`, `tel`), image in text `<img k="logo_full" w="25" h="15">`. Dynamic text: `<cif d="…">label</cif>`; `d` is Base64 (UTF-8) of a list `[{ "w": condition, "h": content }]`. The `h` of the first branch with an empty or true condition is printed; if none matches, nothing. Only the designer shows the label between the tags. Formula: `<formel w="…" h="…" u="…" q="…" d="…">`; `q` is the LaTeX source, the designer calculates the dimensions and `d` from it. Keep both unchanged; new ones are created by the designer. A part of a bold text (style `bold`, table header or `<b>`) prints regular with `<span style="font-weight:normal">…</span>`; the innermost markup wins, a `<b>` inside is bold again. Likewise a part of an italic text (style `italic` or `<i>`) prints upright with `<span style="font-style:normal">…</span>`; an `<i>` inside is italic again. Both together: `<span style="font-weight:normal;font-style:normal">…</span>`. Underline and strikethrough cannot be switched off this way. A highlight is `<span style="background-color:#FFF59D">…</span>`; only a color code is allowed (`#rrggbb`, `#rgb`, `#rrggbbaa`), no color name. `<strike>`, `<del>` and `text-decoration:line-through` print like `<s>`; write `<s>`. As in the browser, a `style` also works on `<b>`, `<strong>`, `<i>` and `<em>` (not `text-align`; alignment belongs on the paragraph `<p a="…">`), `text-decoration-line:underline` or `line-through` like `<u>` or `<s>`, and `font-style:oblique` (without an angle or from `14deg`) like `italic`; still write the forms above. Other tags (for example `<ul>`) stay as text including their brackets; a list marker `m="…"` that is not allowed yields a paragraph without marker. Named HTML characters (`&uuml;`, `&euro;`, `&ndash;`) apply as in the browser. Text after `</p>` or `</div>` starts a new line. Font names in `style` stand in `'…'`; the renderer reads `&quot;` (for example from Outlook) as well. The designer writes `rich: true` itself; the renderer does not need it.

#### Image

| Key | Type | Meaning |
|---|---|---|
| `wMm`, `hMm` | Number | Required; the frame of the image. |
| `bild` | Object | The image source, see below. |

| Key in `bild` | Default | Meaning |
|---|---|---|
| `art` | `asset` | `asset` (uploaded image), `feld` (image column), `datei` (file column), `base64`. |
| `pfad` | – | For `asset` the key of the image (`logo_full`), otherwise the data path (may be `{{…}}`). |
| `entitaet`, `idFeld` | – | Only `feld` and `datei`: table and key field of the source. |
| `einpassung` | `einpassen` | `einpassen` (fully visible), `fuellen` (fill the frame, overflow is cut), `original`. |
| `lage` | `mittig` | Position when fitting: `obenLinks`, `oben`, `obenRechts`, `links`, `mittig`, `rechts`, `untenLinks`, `unten`, `untenRechts`. |
| `maske` | – | Cut-out: `kreis`, `ellipse`, `eckenRund`, `dreieck`, `stern`, `vieleck`. |
| `wennKeinBild` | `still` | `still` (nothing, takes no height), `notiz`, `platzhalter` (grey box). |
| `qualitaet` | `original` | Only `feld`: `original` or `niedrig`. |
| `vorschau` | `true` | Designer only: show the image on the design canvas or a placeholder. |
| `regeln` | – | »Unless«: `{ "wenn": condition, "dann": { "art", "pfad", … } }`; the first matching one chooses the source. |
| `daten` | – | Only on import, when uploading AI changes and in changes made through the AI assistant: a new image as a `data:` address, PNG, JPEG or SVG (`data:image/png;base64,…`, an SVG graphic also `data:image/svg+xml;utf8,<svg …>`). The designer uses an identical existing image or creates it in the image table (SVG as PNG), puts its short name into `pfad` and removes `daten`. `pfad` is the wish for the short name. Also works in a branch of `regeln`. |
| `name` | – | Only together with `daten`: the name of the new image in the image table. |

Older images carry `binding` (`"@logo"`) and `fit`; with `bild` they are not read.

#### Barcode, QR code and GiroCode

`"type": "Barcode"` is a barcode, a QR code or a GiroCode (EPC QR code per EPC069-12, for SEPA credit transfers in euros); which one is given by `barcode.art`. Position, size, `visibleIf` and `place` as for an image. A code is never split and never shortened at the bottom edge of a group with a fixed height: if it does not fit there completely, it is left out and the document warns (a GiroCode then prevents the document).

| Key | Type | Meaning |
|---|---|---|
| `wMm`, `hMm` | Number | Required; the box. The code is fitted print-sharp: a bar or a dot is a whole multiple of 1/600 inch, so the code is often a little smaller than the box. |
| `rotDeg` | Number | `0`, `90`, `180` or `270`; the whole box is rotated, including the text. |
| `barcode` | Object | Type, content and appearance, see below. |

| Key in `barcode` | Default | Meaning |
|---|---|---|
| `art` | `code128` | `code128`, `ean13`, `ean8`, `code39`, `itf` (barcodes), `qr` (QR code), `epc` (GiroCode). |
| `wert` | – | Not for `epc`: the content, text with placeholders (`"{{invoicenumber}}"`) or a value with if-then as under »Values with if-then« (`{ "value": …, "rules": [ { "when": …, "value": … } ] }`), evaluated at the object, in a table row at the row. It goes into the code literally, without markup; a number field without a formatter gives the number with a dot. |
| `zahlung` | – | Only `epc`: the fields of the credit transfer, each like `wert`: `empfaenger` and `iban` (required), `bic`, `betrag` (number in euros with a dot, without a formatter; empty: the payer enters it), `verwendungszweck` **or** `referenz` (never both), `zweckCode`, `hinweis`, `waehrung` (check only: if it gives anything other than `EUR`, the code is invalid). |
| `fehlerkorrektur` | `M` | Only `qr`: `L`, `M`, `Q`, `H`. The GiroCode always has `M`. |
| `klartext` | `true` | Barcodes only: the content readably below the bars (font: the template's default font, `brand.bodyFont`). |
| `klartextPt` | `8` | Font size of the text, 5 to 14. |
| `ruhezone` | `true` | The white margin scanners need lies inside the box. |
| `farbe` | `#000000` | Color of the bars or dots. |
| `hintergrund` | `#FFFFFF` | Area behind the code including the quiet zone (for a barcode the full height of the box); `""` = transparent. |
| `lage` | `mittig` | Position of the code in the box, values as for `bild.lage`. A barcode fills the full height. |
| `wennLeer` | `still` | Not for `epc`: if `wert` gives nothing, `still` (nothing, takes no height), `notiz`, `platzhalter` (grey box). |

- An invalid barcode or QR code (wrong EAN check digit, a character the type cannot hold, content too long, box too small) is not printed; the spot keeps its space and the document warns.
- A visible, invalid GiroCode (for example a wrong IBAN check digit, an amount of 0 or less, another currency) prevents the document. For credit notes, hide it with `visibleIf`.
- `{{Page.Total}}` (the total number of pages) works in the content of a code only in a group that repeats on every page (header or footer); in the body the code is not printed (barcode or QR code: warning, GiroCode: the document is not created).
- Code 128: letters without umlauts, digits, spaces and punctuation (ASCII without control characters); EAN-13 and EAN-8: 12 or 7 digits (the check digit is added) or 13 or 8 with the check digit; Code 39: `0`–`9`, `A`–`Z`, space and `- . $ / + %`; ITF: digits in an even number.
- QR Code is a registered trademark of DENSO WAVE INCORPORATED.

```json GiroCode
{ "type": "Barcode", "xMm": 140, "yMm": 230, "wMm": 30, "hMm": 30, "pageIndex": 0, "place": "auto",
  "barcode": { "art": "epc",
    "zahlung": { "empfaenger": "{{@Payment recipient}}", "iban": "{{@Payment IBAN}}", "betrag": "{{totalamount}}",
                 "verwendungszweck": "Invoice {{invoicenumber}}" } } }
```

#### Shapes

| `type` | Special feature |
|---|---|
| `Line` | Horizontal line in the middle of the frame `xMm`, `yMm`, `wMm`, `hMm`; slanted via `rotDeg`. Older lines carry `x1Mm`, `y1Mm`, `x2Mm`, `y2Mm`. |
| `Rect` | Fill and frame, `cornerRadiusMm`. |
| `Ellipse` | Circle if `wMm` equals `hMm`. |
| `Triangle`, `Star` | Point at the top, five-pointed star. |
| `Arrow` | Arrow in the middle of the frame; `arrowBoth: true` for two heads. |
| `Polygon` | `points`: at least three points `[x, y]` in 0 to 100 of the frame. |

Colours and stroke are in `style`: `strokeColor`, `strokeWidthPt` (0 = no stroke), `fillColor`, `dash` (`solid`, `dashed`, `dotted`; no effect on the rectangle).

#### Group

| Key | Type | Default | Meaning |
|---|---|---|---|
| `children` | List | – | The objects in the group. |
| `wMm` | Number | full width | Width. |
| `hMm` or `heightMm` | Number | – | Height. |
| `autoHeight` | Yes/No | `false` | `false` with `hMm`/`heightMm`: fixed height, content below is cut off (even through the middle of a line). Without a height the group is as high as its content. `true`: at least the given height, otherwise it grows with the content; only then does a »Flowing« object below move along. |
| `gapMm` | Number | `0` | Extra distance between objects that move out of each other's way. |
| `repeatEveryPage` | Yes/No | `false` | Header or footer, see above. |

Fill and frame come from `style`: `fillColor`, `strokeColor`, `strokeWidthPt`, `borderSides` (comma list of `top`, `right`, `bottom`, `left`; empty = no line; missing = full frame). Without fill and frame the group is invisible in the PDF.

**Building block object.** A group with `baustein` is an inserted building block: `"baustein": { "id", "kennung", "name", "bindung", "praefix" }` and `"children": []`. When printing, Smart Templates inserts the content of the building block there; width and height come from the building block. You may move such an object (`xMm`, `yMm`, `pageIndex`, `place`), set its visibility (`visibleIf`) and its behavior (`keepTogether` …), or remove it; `style`, `cornerRadiusMm`, `gapMm` only if the building block does not bring them. `baustein` stays, `children` empty, only the designer creates a new one. The template only sees the variables of a building block, with the prefix: `{{@Prefix.Name}}` in text, `@Prefix.Name` in conditions.

**A building block itself** (`"art": "baustein"`) is a file like a template, with fixed rules. `body` contains exactly one group, the area (`id` »bereich«, `xMm`/`yMm` 0, `autoHeight`: `true`); the page is as large as the area, the margins are 0. On the area only `wMm`, `hMm`, `autoHeight`, `gapMm`, `style`, `cornerRadiusMm` and `children` take effect: visibility, position and behaviour belong to the building block object in the template. A building block has no `eRechnung`, `wahlen`, `pdfName` or `minPages`, and its area has no page break, no `repeatEveryPage` and no further building block. If the building block has data, every source and every relation with a rule needs a field list (`fields`). It only reads what it has itself: a reference its own tree does not know is an error, and once inserted it never looks above its binding — a field that is empty on the bound record stays empty, even if the template has one of the same name. A field behind a lookup (`parentaccountid.name`) it reads through its own relation (`kind` `lookup`). Language, number and currency format and font come from the template it sits in when printing. A change to a building block takes effect at once in every template that uses it; `art` and `bausteinKennung` stay as they are.

#### Table

| Key | Type | Default | Meaning |
|---|---|---|---|
| `itemsPath` | Text | – | Data table: path to a **list**, usually the result of a rule (`"Items"`). In a table cell relative to the outer row. A single record (`mode: first`) prints no rows. |
| `columns` | List | required | Columns, see below. |
| `rows` | List | – | Free-form table (without `itemsPath`): one row per entry `{ "cells": [ { "content": object } ] }`. |
| `subRows` | List | – | Extra rows per record (only with `itemsPath`), same structure as `rows`. |
| `headerStyle` | Style | white, bold, 9 pt | Header row: `fillColor`, `color`, `sizePt`, `bold`. The default applies only if `headerStyle` is missing completely; whoever states it sets `color`, `sizePt` and `bold` completely (otherwise black, 10 pt, regular). Without `headerStyle` and without fill the white font would be invisible. |
| `rowStyle` | Style | 9 pt | Data rows: `sizePt`, `color`, `fillColor`, `rowBorderColor` (line under every row), `paddingMm`, `lineSpacing`. A `rowStyle` without `sizePt` yields 10 pt. |
| `showHeader` | Yes/No | `true` | Show the header row. |
| `repeatHeader` | Yes/No | template | Repeat the header on following pages. |
| `headerHeightMm` | Number | `8` | Minimum height of the header row. |
| `headerMaxHeightMm` | Number | – | Maximum height of the header row; empty or 0 = grows with the content. |
| `rowMinHeightMm`, `rowMaxHeightMm` | Number | `7`, – | Minimum and maximum height of a row. |
| `cellPaddingMm` | Number | `rowStyle.paddingMm`, otherwise `1.5` | Cell padding. |
| `rowAltColor`, `colAltColor` | Colour | – | Zebra for every second row or column. |
| `allowRowBreak` | Yes/No | `false` | A row may break across a page boundary. |
| `sorts` | List | – | Additional sorting `{ "by", "dir", "numeric" }`; `numeric: true` sorts numbers as numbers (otherwise »10« before »9«). Better sort in the rule. |

Filtering belongs in the rule; a key `filter` on the table is not read.

| Key in `columns[]` | Meaning |
|---|---|
| `key` | Name of the column (`c1`, `c2` …), no data binding. |
| `header` | Header text, without placeholders. |
| `headerCell` | Header as an object (usually a group); replaces `header`. |
| `widthMm` | Required: column width. |
| `align` | `left`, `center`, `right`, `justify`. |
| `value` | Cell content per row, for example `{{Currency:baseamount}}`. |
| `cell` | Cell as an object (usually a group with `autoHeight: true`); replaces `value`. |
| `vAlign` | `top`, `middle`, `bottom`. |
| `headerFill`, `headerColor` | Header background and header font colour of this column. |
| `cellBorder`, `headerBorder` | Frame of the cells: `strokeColor`, `strokeWidthPt`, `borderSides`. |
| `colSpan`, `headerColSpan`, `rowSpan` | Merge cells (from 2). |

In `rows[].cells[]` and `subRows[].cells[]`: `content` (the object), `colSpan`, `rowSpan` (only in `subRows`). If a text stands directly as `content`, the designer wraps it in a group when opening.

#### Grid and page break

- `Grid` (older form, can no longer be created in the designer; for new templates a free-form table): `rows` with cells as above, optionally `heightMm` per row (minimum height of that row; it grows with its content), `colWidthsMm` (empty = evenly distributed), `rowMinHeightMm`, `borders` (`color`, `widthPt`, `outer`, `rowLines`, `colLines`), cell colour `fill` per cell.
- `PageBreak`: stands directly in `body` with `pageIndex` and `yMm` (position of the cut). It only breaks if something is already on the sheet. What lies below it on the same design sheet moves up by this `yMm` on the following page (an object at 120 below a break at 100 stands at 20 there). With `visibleIf` false it has no effect.

#### Style

| Key in `style` | Default | Meaning |
|---|---|---|
| `font` | template | `body`, `heading` or the name of an uploaded font. |
| `sizePt` | `10` | Font size. |
| `align` | `left` | `left`, `center`, `right`, `justify`. |
| `color` | `#000000` | Font colour. |
| `bold`, `italic`, `underline` | `false` | Font style. |
| `fillColor` | – | Fill. |
| `strokeColor` | – | Frame or line colour; empty = no stroke (line and arrow: black). |
| `strokeWidthPt` | `1` | Stroke width; 0 = no stroke. |
| `borderSides` | full frame | Comma list of `top`, `right`, `bottom`, `left`; empty = no line. |
| `dash` | `solid` | `solid`, `dashed`, `dotted` (shapes except rectangle). |
| `lineSpacing` | template | Line spacing, at most 5. |

### E-invoice (eRechnung)

`eRechnung` at the root additionally turns the document into an electronic invoice according to a **standard**. Included are »XRechnung 3.0« (identifier `xrechnung-ubl`, XML only) and »ZUGFeRD 2.5.2 (EXTENDED)« (`zugferd-extended`, also as a PDF with embedded XML). The key assigns a value to every **entry** of the standard: a field, a variable, a fixed value or an if-then that picks one of them per document. Smart Templates calculates nothing itself. It writes what is assigned, rounds amounts and checks the result against the rules of the standard. If the key is missing or `aktiv` is not `true`, no e-invoice is created and the document stays as it is.

| Key | Type | Default | Meaning |
|---|---|---|---|
| `aktiv` | Yes/No | `false` | Only `true` switches it on. When switched off, the assignment is kept. |
| `standard` | Text | – | Identifier of the standard: `xrechnung-ubl`, `zugferd-extended` or that of an own standard. |
| `fassung` | Text | the newest valid one | Version of the standard, for example `3.0.2`. |
| `fassungFest` | Yes/No | `false` | `true`: exactly this version, even if there is a newer one. |
| `ausgabe` | Text | from the standard | `pdfMitXml` (PDF/A-3 with embedded XML, only with a standard that supports it) or `nurXml`. |
| `lesekopie` | Yes/No | `false` | With `nurXml`: additionally the PDF for reading. |
| `wenn` | Condition | always | »Only if …«: if the condition is not met, the document is created without an e-invoice. Read on the primary record, written as under »Conditions«. |
| `werte` | Object | – | The entries of the header, per identifier a text (`{ "BT-1": "{{invoicenumber}}" }`) or an if-then (see below). `null` means »not assigned«. |
| `listen` | Object | – | The lists (line items, tax rates, allowances …), see below. |
| `umsetzung` | Object | – | Per code list: value from Dynamics → code, for example `{ "EINHEIT": { "hrs": "HUR" } }`. Complements the recognition of common spellings. |
| `beispiele` | List | – | Up to three sample records for the check in the assignment window: `{ "id": GUID, "name": Text }`. Has no effect on the document. |
| `zuPruefen` | List | – | Identifiers the assignment window shows in yellow (»please check«). Maintained by the designer; has no effect on the document. An AI may add identifiers when it applies a suggestion with »pruefen«, but must not remove any. |

Other keys are an error, including a mistyped `Wenn`.

#### Entries and identifiers

The identifiers are those of the standard: `BT-…` of the standard EN 16931 (accompanying entries with `-1`, such as `BT-34-1`), `BG-…` for lists and groups, for ZUGFeRD also own identifiers `ZX-…` and `ZXG-…`. Which entries a standard has, which are mandatory and which codes apply is in its **overview**: through the action `st_StandardLesen` (parts `uebersicht`, `pflicht`, `abschnitt:<id>`, `codeliste:<id>`), in the AI package in the section »E-invoice«. An unknown identifier, an entry on the wrong level or a list under `werte` is an error.

| Form of the value | Example | Meaning |
|---|---|---|
| Field | `{{invoicenumber}}`, `{{customerid_account.name}}` | like a placeholder, but without a formatter |
| Variable | `{{@InvoiceType}}` | an own variable; in a list from a rule also a rule variable of the row (`{{Net}}`) |
| Summary | `{{sum(Items.Net)}}` | over a field of a list, as in the placeholder; for amounts each line is rounded before adding up |
| Fixed value | `"380"`, `"S"`, `"19"` | text; numbers with a dot, dates as `YYYY-MM-DD` |
| Running number | `{{#}}` | only in lists and only for entries the standard provides it for |
| Composed | `"Order {{ordernumber}}"` | only for text entries |
| If-then | `{ "value": "380", "rules": [ … ] }` | per document one of the values above, see »If-then at an entry« |

- Formatters (`{{Currency:…}}`, `{{Date:…}}` …) are allowed only for text entries; amounts, dates and codes go without.
- **Amounts** are written rounded commercially to 2 decimal places, also from a variable. A summary (`{{sum(Items.Net)}}`) rounds each line to these places before adding up — so the total matches the written lines. Unit prices, quantities and percentages stay as they are. The arithmetic check tests the rounded values.
- **Codes** (countries, units, tax categories …): a code of the code list, a common name (»Germany« becomes `DE`) or a line in `umsetzung`. Anything that cannot be recognised is an error.
- **Empty stays empty:** there is no substitute value. If a mandatory entry is missing, the document is not created and a message names it; only the full preview warns and shows the PDF without XML.
- **Mandatory if …:** The check on saving the template names such an entry as missing if its condition is certainly met for the template without data, for example `BT-34-1` when `BT-34` is assigned as a fixed value. If it cannot be judged without data (the entry depends on a field), it does not count.
- **The invoice type** (`BT-3`: invoice 380, credit note 381 …) is an entry like any other. If it comes from a choice field, write an if-then at `BT-3` by the raw value of the field, one branch per value (example below), with the most common type as `value`. Never derive the type from the sign, the number or the label. With XRechnung a credit note automatically becomes a credit note document. Older templates assign an own variable with these branches here (`{{@InvoiceType}}`); that still works.
- **Calculations happen only in variables.** If an entry needs a calculated value, create a variable and assign it: in the header an own variable under `variables` (`{{@Name}}`), in a list from a rule a rule variable in `vars` of that rule (`{{Name}}`, calculated per row).
- Assign totals and taxes the way the document prints them. The arithmetic check of the standard reveals every deviation.

#### If-then at an entry

If a value differs from document to document, `werte` holds an object with branches instead of the text, in the same form as under »Values with if-then«. This works in the header, per row of a list and in fixed entries, always at a single entry, never at a whole list or group.

```json If-then at an entry
"BT-3": { "value": "380",
          "rules": [ { "when": "new_documenttype_code == 100000001", "value": "381" },
                     { "when": "new_documenttype_code == 100000002", "value": "384" } ] }
```

| Key | Type | Meaning |
|---|---|---|
| `value` | Text | »Otherwise«: applies if no branch matches. |
| `rules` | List | Branches `{ "when": Condition, "value": Text }`. The first branch whose condition is met applies; an empty condition always applies. |

- Every value is a text as in the table above: field, variable, summary, fixed value or code. A branch only picks, it does not calculate; a variable delivers the calculated value (see above).
- Write the condition as under »Conditions«. It reads your data, never other entries of the e-invoice (an identifier such as `[BT-3]`, `BT-3` or `[BG-3]` in a condition is an error; the designer then rejects the template): in the header the primary record and own variables (`@Name`), in a list the row (see »What a row sees«). Compare choice fields by their raw value (`<field>_code == 100000001`).
- A matching branch with an empty value means »no value«, not the fixed `value`. For a mandatory entry no document is created then, and the message names the template as the cause; this way a reminder, for example, never goes out silently as an invoice.
- A branch with an empty condition always applies; the branches after it and `value` are then never reached, and the check reports it as a note. What should always apply therefore belongs at the end as `value`.
- If a condition cannot be read or a variable is missing, no document is created; the message names the entry.
- A plain text keeps working as before. Write an if-then only where the value really differs.

**Credit note with positive amounts.** A credit note (381) needs positive amounts. If Dynamics stores it negative, switch all amounts together with if-then: in the line items the line amount (`BT-131`) and the unit price (`BT-146`) or the quantity (`BT-129`), in the header the totals (`BT-106`, `BT-109`, `BT-110`, `BT-112`, `BT-115`) and in `BG-23` the tax per tax rate (`BT-116`, `BT-117`). A variable calculates each positive value. If only the line amount is turned, quantity × price and the totals no longer match, and the document is not created.

```json Credit note
"variables": [ { "name": "DocumentType", "type": "number", "default": "{{new_documenttype_code}}" } ],
"eRechnung": {
  "werte": { "BT-106": { "value": "{{sum(Items.Net)}}", "rules": [ { "when": "@DocumentType == 100000001", "value": "{{sum(Items.NetPositive)}}" } ] } },
  "listen": { "BG-25": { "itemsPath": "Items", "werte": {
    "BT-131": { "value": "{{Net}}", "rules": [ { "when": "@DocumentType == 100000001", "value": "{{NetPositive}}" } ] },
    "BT-146": { "value": "{{priceperunit}}", "rules": [ { "when": "@DocumentType == 100000001", "value": "{{PricePositive}}" } ] } } } } }
```

This needs the rule variables `NetPositive` (`0 - {{baseamount}} + {{manualdiscountamount}}`) and `PricePositive` (`0 - {{priceperunit}}`) on the rule `Items`. In its branch, `BT-106` sums the positive rows. The other totals in the header (`BT-109`, `BT-110`, `BT-112`, `BT-115`, each with an own variable such as `0 - {{totaltax}}`) and `BT-116` and `BT-117` in `BG-23` (with rule variables on their rule) need the same branch.

#### Lists

`listen` assigns the entries of every list of the standard, for example `BG-25` (line items), `BG-23` (tax per tax rate), `BG-20` (allowance on the whole invoice) or `BG-21` (charge on the whole invoice). Whether a list takes a rule, fixed entries or both is stated in the overview (`quelle`).

| Key | Meaning |
|---|---|
| `itemsPath` | The rule whose rows become the entries, as for a table (`"Items"`). For the line items take the rule of the line item table in the document. If none fits, create a rule without limit on the same relation, named »<relation> (e-invoice)«, with the sorting of a sorted rule of this relation, never with its limit. Never a rule with »the first N« or exactly one row: an e-invoice leaves out no line. |
| `wenn` | Condition for the rule as source (»Only if«), evaluated once in the context above; also on the line items (`BG-25`). If only individual entries differ (credit note), write the if-then on the entry. If the entries themselves differ, use `faelle`. |
| `werte` | The entries per row of the rule, paths relative to the row; text or if-then. |
| `listen` | Lists in the list, per row, for example `BG-27` (allowance on the line) in `BG-25`. |
| `eintraege` | Fixed entries after the rows of the rule: `{ "name": Text, "wenn": Condition, "werte": { … }, "listen": { … } }`. Only the designer shows `name`. `wenn` is evaluated in the context above (in the header on the primary record, in a list per row); without `wenn` the entry always applies. Other keys (also `Wenn`) are an error on a list, a case and an entry. |
| `faelle` | Different entries depending on the document, see below. What stands on the list itself counts as »Otherwise«. |

**Different entries depending on the document (`faelle`).** If the entries of a list themselves differ, not just one entry in it (for a cancellation or corrected invoice the preceding invoice, for a final invoice the advance payments), write cases. The **first** case whose condition is met applies. If none is met, »Otherwise« applies: what stands on the list itself (`itemsPath`, `wenn`, `werte`, `listen`, `eintraege`); it may be empty.

| Key of a case | Meaning |
|---|---|
| `name` | Only the designer shows it. |
| `wenn` | The condition of the case, evaluated in the context above like `wenn` of the list. Without `wenn` the case always applies; the cases after it and »Otherwise« are never reached, and the check names it as a note. |
| `itemsPath`, `werte`, `listen`, `eintraege` | As on the list. Fixed entries belong to the case and keep their own `wenn`. |

- The condition of a case reads your data and own variables, **never** other entries of the e-invoice. For the type of invoice, ask the field `BT-3` comes from (or the variable that feeds it), not `BT-3`.
- A case has no cases of its own (error). `listen` in a case may carry `faelle` again.
- The rule of a case is an ordinary rule of the template and holds as on the list (never »the first N«). It is loaded with every document, even if the case does not apply. A relation such as `new_bezugsrechnung` is a join, not a query.
- If no case applies and »Otherwise« is empty, the list stays empty; a mandatory list then yields no document. The check on saving warns about it.
- An older version of Smart Templates does not know `faelle` and creates no e-invoice for such a template.

```json Preceding invoice depending on the case
"BG-3": { "faelle": [
  { "name": "Storno oder Korrektur", "wenn": "new_rechnungstyp_code == 100000001 || new_rechnungstyp_code == 100000002",
    "eintraege": [ { "name": "Bezug", "werte": { "BT-25": "{{new_bezugsrechnung.invoicenumber}}", "BT-26": "{{new_bezugsrechnung.new_rechnungsdatum}}" } } ] },
  { "name": "Schlussrechnung", "wenn": "new_rechnungstyp_code == 100000005 || new_rechnungstyp_code == 100000006",
    "itemsPath": "Abschlaege", "werte": { "BT-25": "{{invoicenumber}}", "BT-26": "{{new_rechnungsdatum}}" } } ] }
```

Here `new_rechnungstyp` is the choice field `BT-3` comes from, and `Abschlaege` is the rule on the advance payment invoices.

**Preceding invoice.** If the type of invoice (`BT-3`) is 381, 384, 876 or 877 (credit note or cancellation, corrected, partial final or final invoice) and `BG-3` is empty, the check reports the note `ST-BG-3`. This is an own check rule of Smart Templates, not one of the standard; the e-invoice is still created. The result counts, whichever case it comes from.

**What a row sees.** Values and conditions per row read the row itself, the rule variables of its rule, its relations (including a reference of the row back to the invoice; that is a join) and the own variables (`@Name`). A row does not see fields of the primary record directly, just like a table row. If it needs one, create an own variable for it, for a choice field with the raw value (`"default": "{{<field>_code}}"`, like `DocumentType` above), and read it as `@Name` or `{{@Name}}`. The reference of the row to the invoice works too; if the row has several references to the invoice, ask which one is meant instead of guessing.

```json E-invoice
"eRechnung": {
  "aktiv": true, "standard": "xrechnung-ubl", "ausgabe": "nurXml",
  "werte": { "BT-1": "{{invoicenumber}}", "BT-2": "{{createdon}}",
             "BT-3": { "value": "380", "rules": [ { "when": "new_documenttype_code == 100000001", "value": "381" } ] },
             "BT-5": "{{transactioncurrencyid.isocurrencycode}}", "BT-106": "{{sum(Items.Net)}}",
             "BT-109": "{{@NetTotal}}", "BT-110": "{{totaltax}}", "BT-112": "{{totalamount}}", "BT-115": "{{totalamount}}" },
  "listen": {
    "BG-25": { "itemsPath": "Items",
               "werte": { "BT-126": "{{#}}", "BT-129": "{{quantity}}", "BT-146": "{{priceperunit}}", "BT-131": "{{Net}}",
                          "BT-151": "S", "BT-152": "19" },
               "listen": { "BG-27": { "eintraege": [ { "name": "Discount", "wenn": "manualdiscountamount > 0",
                                                      "werte": { "BT-136": "{{manualdiscountamount}}", "BT-140": "95" } } ] } } },
    "BG-21": { "eintraege": [ { "name": "Freight", "wenn": "freightamount > 0",
                                "werte": { "BT-99": "{{freightamount}}", "BT-102": "S", "BT-103": "19", "BT-105": "FC" } } ] }
  },
  "umsetzung": { "EINHEIT": { "hrs": "HUR" } }
}
```

This needs the rule `Items` on the line items with the rule variable `Net` (`{{baseamount}} - {{manualdiscountamount}}`; `baseamount` already contains the volume discount) and the own variable `NetTotal` (`{{totalamount}} - {{totaltax}}`). `BT-3` picks the invoice type with an if-then by the raw value of the type field `new_documenttype`. The example still lacks entries every invoice needs, such as your company; which ones is stated in the part `pflicht` of the overview.

#### Suggestions for the Dynamics invoice

If the primary source is the invoice (`invoice`), Smart Templates knows suggestions from the standard fields of Dynamics, never from own fields — neither a company's nor those of an add-on solution, not even from Microsoft. An own field carries the prefix of its publisher before its name (`cig_`, `ep_`, `msdyn_`, `new_`, `cr1a2_` …); the fields of Dynamics itself have none, only the address fields (`billto_`, `shipto_`, `address1_` … `address3_`) and `entityimage_` carry an underscore there. A lookup counts by its name without `_…_value`. In the designer, “Apply suggestions” in the assignment window applies them; the table comes from the action `st_StandardLesen` with the part `vorschlaege` (with an identifier, cut to the standard). A suggestion applies only if its field exists in the sources of the template and the entry is still empty; several `pfade` mean: the first one that exists. The entries in the part `kopf` also carry an `art`:

| `art` | What is assigned |
|---|---|
| missing | the first existing field from `pfade` |
| `belegart` | the invoice type: a choice field of Dynamics itself (without a publisher prefix) whose name or label matches `feldMuster`, as an if-then directly at the entry, one branch per value by the raw value; otherwise the fixed value `sonstWert`. If only an own field matches (such as `cig_invoice_type`), the fixed value stays, yellow with the sentence `eigenesFeldPruefen`; the user assigns the own field himself. Do not create a variable for it. |
| `summe` | the summary over the rule variable of the line items (`{{sum(Items.Net)}}`), otherwise a field from `ersatz` |
| `variable` | a new own variable as described in `variable`, otherwise a field from `ersatz` |

The part `positionen` contains the rule variable (`regelVariable`, on the rule of the line item table) and the entries per row with the kinds `laufendeNummer`, `fest` (fixed value for every line item), `vorgabe` (the default of the standard) and `regelVariable`; `kopfListen` and `positionen.listen` name fixed entries with a condition (`eintrag`) and the tax entry (`art` `steuer`). Whatever carries `pruefen` is a substitute, a pre-assignment or a value for every document: the user must look at it and confirm it. An entry that creates a variable also carries `pruefenVorhanden`: if the variable already existed (rule variable: same name; `variable`: same name and same formula) and is used, this sentence applies instead of `pruefen`, whose beginning »Neu angelegt« (newly created) would then be wrong.

#### Own standards

An own standard is described by an annotation file, itself an XSD next to the unchanged official schema. Its structure is described on the page »Own standards for the e-invoice« (action `st_StandardLesen` with the part `format`); it is uploaded in the designer under “Manage standards …” or with the action `st_StandardHochladen`.

### A complete example

A quote with logo and line at the top, customer and title, an items table on a rule, the total below it and the page number at the bottom.

```json Quote
{
  "name": "Quote",
  "culture": "en-US",
  "page": { "size": "A4", "widthMm": 210, "heightMm": 297,
            "margins": { "topMm": 18, "rightMm": 15, "bottomMm": 18, "leftMm": 20 } },
  "brand": { "bodyFont": "Arimo", "headingFont": "Arimo" },
  "sources": [ {
    "id": "src1", "name": "Quote", "entity": "quote", "primary": true, "basePath": "", "idAttr": "quoteid",
    "fields": [ { "name": "name" }, { "name": "_customerid_value" } ],
    "relations": [ {
      "name": "quote_details", "kind": "collection", "entity": "quotedetail", "refAttr": "quoteid",
      "fields": [ { "name": "productdescription" }, { "name": "quantity" }, { "name": "baseamount" }, { "name": "sequencenumber" } ],
      "rules": [ { "id": "r1", "name": "Items", "filterExpr": "",
                   "select": { "mode": "", "sorts": [ { "by": "sequencenumber", "dir": "asc" } ] }, "vars": [] } ]
    } ],
    "rules": []
  } ],
  "body": [
    { "type": "Group", "repeatEveryPage": true, "xMm": 0, "yMm": 0, "hMm": 20, "children": [
      { "type": "Image", "xMm": 0, "yMm": 0, "wMm": 45, "hMm": 14, "place": "static",
        "bild": { "art": "asset", "pfad": "logo_full", "einpassung": "einpassen" } },
      { "type": "Line", "xMm": 0, "yMm": 16, "wMm": 175, "hMm": 4, "place": "static",
        "style": { "strokeColor": "#2B4CC4", "strokeWidthPt": 1.5 } } ] },
    { "type": "Group", "pageIndex": 0, "yMm": 0, "heightMm": 30, "children": [
      { "type": "Text", "value": "{{_customerid_value}}", "xMm": 0, "yMm": 0, "wMm": 90, "place": "static" },
      { "type": "Text", "value": "Quote {{name}}", "xMm": 0, "yMm": 14, "wMm": 175, "place": "static",
        "style": { "font": "heading", "sizePt": 18, "bold": true, "color": "#16234B" } } ] },
    { "type": "Table", "pageIndex": 0, "yMm": 34, "place": "auto", "itemsPath": "Items",
      "headerStyle": { "fillColor": "#2B4CC4", "color": "#FFFFFF", "sizePt": 9, "bold": true },
      "rowStyle": { "sizePt": 9, "color": "#222222", "paddingMm": 1.5 },
      "columns": [
        { "key": "c1", "header": "Description", "widthMm": 105, "align": "left", "value": "{{productdescription}}" },
        { "key": "c2", "header": "Quantity", "widthMm": 30, "align": "right", "value": "{{Number:quantity|2}}" },
        { "key": "c3", "header": "Amount", "widthMm": 40, "align": "right", "value": "{{Currency:baseamount}}" } ] },
    { "type": "Text", "pageIndex": 0, "xMm": 95, "yMm": 50, "wMm": 80, "place": "flow",
      "value": "Total: {{Currency:sum(Items.baseamount)}}", "style": { "align": "right", "bold": true } },
    { "type": "Group", "repeatEveryPage": true, "xMm": 0, "yMm": 249, "hMm": 12, "children": [
      { "type": "Text", "value": "Page {{Page.Current}} of {{Page.Total}}", "xMm": 140, "yMm": 2, "wMm": 35, "place": "static",
        "style": { "sizePt": 7.5, "align": "right", "color": "#888888" } } ] }
  ]
}
```

### Older keys and keys without effect

These keys occur in older templates. The renderer still reads most of them, the designer converts them when opening. New templates do not need them.

| Key | What about it |
|---|---|
| `elements` | Old child list of a group; if a group carries both, `elements` wins. The designer switches to `children`. |
| `type` `Band`, `Container` | Old names for `Group`. |
| `excludePages` | Old exclusion list of page numbers (negative ones count from the end); `excludePagesText` takes precedence. |
| `rowCount` | Old free-form table with `columns[].value`; the designer converts it to `rows`. |
| `sortBy`, `sortNumeric` | Old sorting on the table; the designer moves it into the rule. In `select` of a rule, `sortBy` and `sortDir` are the fallback when `sorts` is missing. |
| `numeric` | No effect in the sort levels of a rule (`select.sorts`); in `sorts` of a table, `true` switches on number sorting. |
| `formula` | Old form of `default` for rule variables; the designer rewrites it. |
| `borders` on a table | Old lines (`style`, `color`, `widthPt`, `outer`, `rowLines`, `colLines`, `headerBottom`, `headerColor`, `headerWidthPt`); the designer converts them into `cellBorder` and `headerBorder` of the columns. On the grid, `borders` are current. |
| `binding`, `fit` | Old image source; with `bild` they are not read. |
| `x1Mm`, `y1Mm`, `x2Mm`, `y2Mm` | Old line via end points; the designer switches to the frame. |
| `layout`, `reserveSpace`, `rich` | No effect. |
| `minWidthMm`, `maxWidthMm` | On objects and columns only limits in the designer. |
| `dataSource` (`type`, `rootEntity`, `itemsPath`) | No effect; the data is in `sources`. |

### What the designer maintains itself

The designer writes these keys itself. Leave them if they are already there, but do not create new ones:

- in `sources`: `set`, `nameAttr`, `locked`, `sampleName`, `sampleMissing`, on fields `label`, `stellen`, `stellenQuelle`, `schreibname`, `mehrzeilig`, `schreibbar`, `pflicht`, `anlegbar`, `weg`, on relationships `linkLabel`, `weg`;
- all keys starting with `_` (for example `_loaded`, `_refLabel`, `_ot51b`);
- the builder mirrors `visGroup` (for `visibleIf`), `filter` (for `filterExpr`), `condGroup` and `cond` (for `when`) and `gruppe` (for `wenn`, on image rules and on the cases under `wahlen`). If you change an expression, remove its mirror. If an old mirror stays, the designer may rewrite the expression from the mirror when the editor is opened. Without a mirror it shows a rule filter as »not built with the builder« and leaves it as it is; visibility, image rules and variable branches it reads back into the condition parts, as far as they can represent the expression.

### Short rules for AI tools

1. Structure: source → relationship → rule. A data table sits on a **rule**, not directly on a relationship: `itemsPath` = path of the parent node plus the path segment of the rule name (»Open items« → `Open_items`).
2. Use only tables, fields and relationships that exist. Every used field stands with its exact logical name in `fields` of its level; a lookup is called `_<column>_value`.
3. Relationships need `name`, `kind` (`lookup` or `collection`), `entity` and `refAttr`. At most six levels deep.
4. Rule names are unique in the whole template. A rule may read fields above it and custom variables, but a rule on a relationship reads no rules above it or on sources (neighbouring relationships are fine). A reference upwards is deleted, a cycle switches off all rules.
5. Conditions name fields **without** `{{ }}`, text in quotes, numbers with a dot, `&&` `||` `!`. Formulas put every reference **in** `{{ }}` and only calculate `+ - * /`.
6. Aggregations (`sum`, `avg`, `count`, `min`, `max`, `first`) go over a field of a list (relationship `collection` or rule result): `sum(Items.baseamount)`. There is no `last()`.
7. Always format numbers and dates in text: `{{Currency:…}}`, `{{Number:…|2}}`, `{{Date:…}}`, `{{Bool:…}}`.
8. A text needs `wMm`. A group with a height but without `autoHeight: true` cuts off whatever reaches beyond its bottom edge.
9. Every object directly in `body` except header and footer carries `pageIndex`; if it is missing, the change is rejected (in a template without any `pageIndex`: only a note).
10. Compare choice and yes/no fields via `_code` (`statecode_code == 0`); without `_code` the label is there.
11. `select` (topN, first) only shortens the result; only a filter loads less.
12. In table cells paths are relative to the row. Placeholders in the column header only via `headerCell`.
13. Page numbers only via `{{Page.Current}}` and `{{Page.Total}}` in text, never in conditions or formulas.
14. Always give custom variables a `type`; they are calculated before the rules and do not see rule results.
15. Keep all keys you are not supposed to change, including unknown ones. If you change an expression, remove its builder mirror (`visGroup`, `filter`, `condGroup`, `cond`, `gruppe`).
16. Write values of `type` exactly (`Group`, not `group`). Numbers as numbers, colours as `#RRGGBB`.
17. To put something **below** a table: directly in `body` after the table, with the same `pageIndex`, a `yMm` below that of the table and `"place": "flow"` (like the total in the example). It then keeps the drawn distance and moves down by exactly as much as the table grows. Without `place` it works like `auto`: it stays where it is until the table reaches it, and then sits below it without a gap (only `marginTopMm`). If there is already a group below the table, such as a totals block, you can also put it in there.
18. Codes: `"type": "Barcode"` with `barcode.art`. The content is in `barcode.wert` (for the GiroCode in `barcode.zahlung` with `empfaenger` and `iban`); numbers and amounts there without a formatter. Rotation only `0`, `90`, `180`, `270`.
19. Objects with `baustein`: never change `baustein`, `children` or values of the building block.

---

## Own standards for the e-invoice

*For developers · Page en/eigene-standards.html*

> **In short:** A standard for the e-invoice consists of the official schema set (XSD, unchanged) and an own **annotation file**, which is itself a valid XSD. For every place in the document it states which entry goes there, what it is called, whether it is mandatory and which rules apply. This page describes its structure (format 1) so that developers and AI tools can write their own standards. It is uploaded in the designer under “Manage standards …” or with the action `st_StandardHochladen`.

### Why an own standard

Smart Templates includes »XRechnung 3.0« (`xrechnung-ubl`) and »ZUGFeRD 2.5.2 (EXTENDED)« (`zugferd-extended`). An own standard is worthwhile if a recipient wants individual entries explained differently, demands additional checks or needs a different syntax. The easiest way: in the designer, choose “Save as file” for an included standard, adapt the file (own identifier, own texts, own rules) and upload it again.

> **Caution:** Uploaded description files are not part of Smart Templates. Whoever uploads them is responsible for their content and its rights. Write names, explanations and messages yourself: texts from specifications, standards and Schematron rules are protected. Identifiers such as `BT-1` or `BR-CO-10` are references and may stay.

### What a standard consists of

- **Schema set:** the official XSD files, unchanged byte for byte. Included are `ubl-2.1` (UBL 2.1 for XRechnung) and `factur-x-1.09.2-extended` (Factur-X/ZUGFeRD EXTENDED). An own standard uses one of them or brings its own set in a package.
- **Annotation file:** an XSD with its own `targetNamespace` that only imports the schemas and describes them in `xs:annotation` blocks. It has exactly one root `xs:schema`; below it only `xs:import` and `xs:annotation` are allowed. Own declarations (`xs:element`, `xs:complexType` …) are rejected.
- The core checks every element with the prefix `st:` against the format schema (action `st_StandardLesen`, part `formatschema`). Namespace: `urn:smart-templates:e-rechnung:anmerkung:1`.

```xml Skeleton of an annotation file
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:st="urn:smart-templates:e-rechnung:anmerkung:1"
           xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
           xmlns:cn="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2"
           xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
           xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
           targetNamespace="urn:example:standard:my-xrechnung:1">
  <xs:import namespace="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" schemaLocation="ubl-2.1/maindoc/UBL-Invoice-2.1.xsd"/>
  <xs:import namespace="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2" schemaLocation="ubl-2.1/maindoc/UBL-CreditNote-2.1.xsd"/>
  <xs:annotation> … one block per header, entry, list, group, code list, code name or check … </xs:annotation>
</xs:schema>
```

- **Prefixes:** the prefixes in paths are those of the standard and are all declared on `xs:schema`. The XML is written with exactly these prefixes.
- **`schemaLocation`** is never resolved: the core puts all files of the set together itself, without network and without file system.
- **A block** is an `xs:annotation` directly below `xs:schema` with one `xs:appinfo` (containing exactly one carrier: `st:standard`, `st:feld`, `st:liste`, `st:gruppe`, `st:codeliste`, `st:codename` or `st:pruefung`) and next to it the texts as `xs:documentation`.
- **Texts:** `<xs:documentation source="name" xml:lang="de">…</xs:documentation>`, `source` is `name`, `erklaerung`, `grund`, `beispiel` or `meldung`. Text only; whitespace is collapsed. A missing German mandatory text is an error; a missing English one is a note (the German one applies).

### The header: st:standard

```xml Header
<xs:annotation>
  <xs:appinfo>
    <st:standard kennung="my-xrechnung" fassung="1.0" formatVersion="1" syntax="UBL" schemasatz="ubl-2.1"
                 gueltigAb="2024-02-01" einbettbar="nein" downloadName="XRechnung_{BT-1}.xml" mime="application/xml">
      <st:wurzel element="ubl:Invoice" dokument="Invoice"/>
      <st:wurzel element="cn:CreditNote" dokument="CreditNote"/>
    </st:standard>
  </xs:appinfo>
  <xs:documentation source="name" xml:lang="de">Meine XRechnung</xs:documentation>
  <xs:documentation source="name" xml:lang="en">My XRechnung</xs:documentation>
</xs:annotation>
```

| Attribute | Mandatory | Meaning |
|---|---|---|
| `kennung` | yes | Family, the same across versions: lower-case letters, digits, `-`, at most 60 characters. The identifiers of the included standards are locked. |
| `fassung` | yes | Letters, digits, `.` and `-`, at most 40 characters. |
| `formatVersion` | yes | Version of this format, today `1`. A higher one requires a newer version of Smart Templates. |
| `syntax` | yes | display only, such as `UBL` or `CII`. |
| `schemasatz` | yes | an included set (`ubl-2.1`, `factur-x-1.09.2-extended`) or `eigen` (schema files in the package). |
| `gueltigAb`, `gueltigBis` | – | date `YYYY-MM-DD`. Without a version in the template, the newest valid one applies. |
| `nachfolgerVon` | – | versions of the same identifier that this one replaces (separated by spaces). |
| `einbettbar` | yes | `ja` or `nein`: whether »PDF with embedded e-invoice« is offered. `ja` requires `st:einbettung`. |
| `downloadName` | yes | file name; placeholders `{BT-x}` only with header entries; without `/`, `\`, `:`. |
| `mime` | yes | `application/xml`, `text/xml` or an `application/…+xml`. |

- **`st:wurzel`** (at least one): `element` (the root element) and `dokument` (name of the document form, unique). Several roots need an entry that chooses the form (see »Code lists and document form«).
- **`st:einbettung`** (at most one): `dateiname`, `beziehung` (`Data`, `Source`, `Alternative`, `Supplement`, `Unspecified`), `pdfa` (such as `3B`), `profil`, `version` (default `1.0`), `dokumentArt` (default `INVOICE`). From it the attachment and the metadata of the PDF/A-3 are built.

### Entries: st:feld

```xml Entry
<xs:annotation><xs:appinfo>
  <st:feld id="BT-84" abschnitt="zahlung" liste="BG-17" typ="kennung" pflicht="wenn"
           wenn="[BT-81] == '30' || [BT-81] == '58'" bereinigen="ohneLeerzeichen grossbuchstaben">
    <st:pfad>/ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID</st:pfad>
    <st:pfad>/cn:CreditNote/cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID</st:pfad>
  </st:feld></xs:appinfo>
  <xs:documentation source="name" xml:lang="de">IBAN</xs:documentation>
  <xs:documentation source="erklaerung" xml:lang="de">Ihre Kontonummer, auf die der Kunde zahlen soll.</xs:documentation>
  <xs:documentation source="grund" xml:lang="de">bei Zahlung per Überweisung</xs:documentation>
</xs:annotation>
```

| Attribute | Mandatory | Meaning |
|---|---|---|
| `id` | yes | Identifier starting with a letter, at most 40 characters: the `BT-…` of EN 16931 (accompanying entries `BT-34-1`), otherwise own ones. Entries, lists and groups share the identifiers. |
| `abschnitt` | yes | `rechnung`, `verkaeufer`, `kunde`, `lieferung`, `zahlung`, `positionen`, `nachlaesse`, `steuern` or `weiteres`: where the entry appears in the assignment window. |
| `liste`, `gruppe` | – | the list or group it belongs to. Without `liste` it is a header entry. |
| `typ` | yes | `text`, `kennung`, `code`, `datum`, `betrag`, `preis`, `menge`, `prozent` or `janein`. |
| `codeliste`, `erkennen` | with `code` | the code list (only and always with `code`); `erkennen="ja"`: names and synonyms become the code. |
| `pflicht` | yes | `ja`, `nein` or `wenn` (then with `wenn` = an expression of the check language and a text `grund`). |
| `zuordnung` | – | `frei` (default), `vorgabe` (pre-filled with `wert`, changeable), `fest` (always `wert`, not shown in the window) or `laufendeNummer` (lists only: the window offers »running number«). |
| `wert` | with `vorgabe`, `fest` | the value. |
| `haeufig` | – | `ja`: shown in the window straight away. |
| `max`, `muster` | – | maximum length; regular expression for the whole value (time limit 100 ms). Both apply to the cleaned value. |
| `bereinigen` | – | `ohneLeerzeichen`, `grossbuchstaben` (separated by spaces). |
| `nachkommastellen` | – | how many decimal places the standard allows (`0` to `10`) or `frei`. Numbers only. Without it: `betrag` 2, `preis`, `menge`, `prozent` without a limit. Values are rounded commercially to this many places before checking; `frei` does not round. |
| `pflichtwert` | – | text for a place only the schema requires (the standard has no value for it), such as `NA`. An assigned value comes first; the mandatory value never counts as content. Only with `text`, `kennung`, `code`. |
| `begleitwert` | – | `ja`: the value does not make its container appear; it is in the XML only if the container appears for another reason. Not together with `pflicht="ja"`. |

**Type against schema:** `betrag`, `preis`, `menge` and `prozent` only on numeric types (`xs:decimal` and derived), `datum` on `xs:date` or on text with a type rule format (CII), `janein` on `xs:boolean`, `text`, `kennung` and `code` on text types. Written invariantly with a dot, without thousands separators; amounts and prices with at least 2 places, dates as `yyyy-MM-dd` or by type rule, truth values `true`/`false`. Identifiers and codes are trimmed at both ends, texts only by whitespace that is not a line break.

**Several paths:** one path per document form. Several paths of the same form are a conditional path: all but the last carry `wenn`, the first that matches applies. Further attributes on `st:pfad`: `wurzel`, `wenn`, `jeEintrag="alle"` and `format` (see »Path language«).

### Path language

A small subset of XPath 1.0:

```text Path language
Path      := "/" Step ( "/" Step )*                    at most 64 steps, 2,000 characters
Step      := Prefix ":" Name Predicate?  |  "@" Name   attribute only as the last step, without prefix
Predicate := "[" Number "]"                             number, from 1
           | "[" Rel "='" Value "']"                    feature equal
           | "[not(" Rel ")]"                           feature missing
           | "[not(" Rel "='" Value "')]"               feature not equal
Rel       := ( Prefix ":" Name "/" )* ( Prefix ":" Name | "@" Name )
```

- At most one predicate per step; values in single quotes, without `'` inside.
- **Number** `cac:TaxTotal[2]`: the second occurrence. Numbers without gaps: whoever names `[2]` needs an entry in `[1]`.
- **Feature equal** `cac:PartyTaxScheme[cac:TaxScheme/cbc:ID='VAT']`: the occurrence whose child has this value. The feature is also a fixed value and is written as soon as the occurrence appears.
- **Feature missing** `cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode)]`: nothing below this occurrence may write into the feature path.
- **Feature not equal** `cac:PartyIdentification[not(cbc:ID/@schemeID='SEPA')]`: a value with the excluded value is an error when writing.
- **Two occurrences** of the same element below the same parent occurrence must be distinguishable: different numbers, different values of the same feature, »equal« against »missing« or »equal« against »not equal«. Anything else is an error.
- **A step without a predicate** on a repeatable element that is not a list means one shared occurrence (like `[1]`): name, phone and e-mail of a contact end up in one contact.
- **Conditional path:** several `st:pfad` with `wenn`, if the element depends on the value. On a list the condition decides per entry.
- **Header entry, element in a list:** a header path through a list needs `[n]` (only into the n-th occurrence) or `jeEintrag="alle"` (into every one). Such a list appears at least once, even without an entry.
- **Composition** `format="[#{BT-21}#]{BT-22}"`: `{identifier}` is a value, `[ … ]` is dropped as soon as an entry inside is empty; `{{`, `}}`, `[[`, `]]` write the characters. The composition names the entry that carries it.

### Lists and groups

```xml List and group
<st:liste id="BG-25" abschnitt="positionen" min="1" quelle="regel eintraege">
  <st:pfad>/ubl:Invoice/cac:InvoiceLine</st:pfad>
  <st:pfad>/cn:CreditNote/cac:CreditNoteLine</st:pfad>
</st:liste>
<st:gruppe id="BG-6" abschnitt="verkaeufer">
  <st:pfad>/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:Contact</st:pfad>
</st:gruppe>
```

- **List:** the path of a repeatable element; one occurrence per entry. Predicates on the list element are allowed (`…/cac:AllowanceCharge[cbc:ChargeIndicator='false']`). Attributes: `liste` (the parent list), `gruppe`, `min` and `max` (only where the standard is stricter than the schema), `quelle` (`regel`, `eintraege` or both), `wert="selbst"` (the list element itself is the value, with exactly one entry) and `haeufig`. A list needs a path for every document form in which its entries occur.
- **Line items:** the top line item list carries `abschnitt="positionen"`, its line identifier `zuordnung="laufendeNummer"`.
- **Group** without repetition: a sub-heading in the window. `filled([BG-x])` is true as soon as an entry of the group has a value. A group can lie inside another one (`gruppe="BG-11"`); `filled` then also sees the sub-groups.

### Fixed values, attributes, type rules, locks

| Element | Example | Meaning |
|---|---|---|
| `st:fest` | `<st:fest pfad="…/cac:TaxScheme/cbc:ID" wert="VAT"/>` | fixed text or attribute value. Does not count as content: a container with only fixed values does not appear. |
| `st:attribut` | `<st:attribut pfad="…/cbc:TaxAmount/@currencyID" quelle="BT-6"/>` | an attribute from an entry; does not count as content. |
| `st:typregel` | `<st:typregel xsdTyp="udt:AmountType"><st:attribut pfad="@currencyID" quelle="BT-5"/></st:typregel>` | applies at every place of this type (or a derived one); children with a relative path; `schreibweise` (`yyyy-MM-dd`, `yyyyMMdd`) for dates. |
| `st:gesperrt` | `<st:gesperrt element="cbc:EmbeddedDocumentBinaryObject" kennungen="BT-125" grund="…"/>` | a locked place via exactly one of `pfad`, `xsdTyp`, `element`. An entry on it is an error. |

Precedence on an attribute: entry before fixed value or feature, before `st:attribut` on the path, before `st:attribut` from a type rule, before a fixed value from a type rule. Two different sources of the same kind at the same place are an error.

### Code lists and document form

```xml Code list
<st:codeliste id="EINHEIT" quelle="UN/ECE Rec 20/21">
  <st:code wert="H87" haeufig="ja" synonyme="pcs;piece"/>
  <st:code wert="C62"/>
</st:codeliste>
```

- The codes are complete in the list. Common codes get names through an own block `st:codename` (`liste`, `wert`) with texts; rare ones appear as code. `namen="cldr-49"` on the code list takes country names from the included list (Unicode CLDR 49).
- **Recognition:** without regard to case against code, names and `synonyme` (separated by `;`). Two different hits give no result; nothing is guessed. The conversion of the template applies in addition.
- **Document form:** with several `st:wurzel` there is exactly one header entry of type `code` whose code list carries `dokument="…"` on every code (XRechnung: `BT-3`, 380 becomes `Invoice`, 381 `CreditNote`). Empty or unknown is an error.

### Mandatory, »mandatory if …« and checks

Mandatory comes from two sources: the schema (a mandatory element below a written container needs a value) and the annotation (`pflicht`, `st:pruefung`).

```xml Check
<st:pruefung id="BR-CO-17" art="rechnung" stufe="fehler" je="BG-23" felder="BG-23/BT-117 BG-23/BT-116 BG-23/BT-119"
             bedingung="abs([BT-117] - round([BT-116] * [BT-119] / 100, 2)) &lt; 1"/>
<!-- next to it: xs:documentation source="meldung" xml:lang="de" with the message in plain language -->
```

| Attribute | Meaning |
|---|---|
| `id` | identifier of the rule (reference to the standard) or an own `ST-…`. |
| `art` | `pflicht`, `rechnung` (arithmetic check), `gruppierung`, `code`, `muster` or `sonst`. |
| `stufe` | `fehler` (no document) or `hinweis` (document is created). An arithmetic check is always `fehler`, with the tolerance of the standard in the expression. |
| `verbindlich` | only and mandatory with `gruppierung`: the identifier of the arithmetic check (`art="rechnung"`, same `je`) this grouping check belongs to. |
| `je` | the list whose entries are checked one by one; the message names the entry. |
| `felder` | the entries involved (`BT-x` or `List/BT-x`). |
| `bedingung` | must be true, otherwise the message applies (text `meldung`, German mandatory). |

#### Check language

```text Check language
Expression := Or
Or         := And ( "||" And )*            And  := Equal ( "&&" Equal )*
Equal      := Comp ( ("=="|"!=") Comp )*    Comp := Sum ( ("<"|"<="|">"|">=") Sum )*
Sum        := Prod ( ("+"|"-") Prod )*     Prod := Unary ( ("*"|"/") Unary )*
Unary      := ("!"|"-") Unary | Primary
Primary    := "(" Expression ")" | "[" Id ("/" Id)* "]" | "'" Text "'" | Number | true | false | Function "(" Arguments ")"
```

- `[BT-81]` is the value of an entry. An entry of a list only inside an entry of its list (`je`, `any`, `all` or a reference of the same list), otherwise `[BG-25/BT-131]` for all values. `[BG-15]` stands for a group or list only in `filled`, `count`, `any` and `all`.
- Text in single quotes (`''` is a quote), numbers with a dot, `true` and `false`.
- Functions: `filled(x)`, `sum([L/F])` and `sum([L/F], b)` (only entries in which `b` is true), `count([L])`, `count([L/F])` and `count([L], b)`, `any([L], b)`, `all([L], b)`, `round(x, n)` (n from 0 to 10, commercially), `abs(x)`, `matches(x, 'regex')` (time limit 100 ms, empty is false), `iban(x)` (check digit), `aussen(x)` (only in a condition of `sum`, `count`, `any`, `all`: evaluates `x` in the entry outside the innermost iteration).
- Calculation uses decimal numbers. Empty counts as 0 when calculating; compared with a number as 0, with text as empty text. `true` and `false` only with `==` and `!=`; empty is not `false`. A condition is met only when `true`.
- **Checked when loading:** unknown identifiers, entries of a list outside their entries, text in calculations, lists in comparisons, groups outside `filled`, a condition that does not give a truth value.
- **Tolerances** are in the expression itself, such as `abs(…) < 1` or `<= 0.02`.
- **Regular expressions** are those of .NET, the standards write XPath: end of text as `(?![\s\S])` instead of `$`, whitespace as `[ \t\r\n]` instead of `\s`, »any character of the line« as `[^\r\n]`. The value is checked before writing; a line break can be CR, CRLF or LF.

**Order on a document:** first values of unknown identifiers, of the wrong level or without a place in the document form; then per level (header, every entry) format, `pflicht`, `wenn`, code, `max`, `muster`; then `min` and `max` of the lists; finally every `st:pruefung`. Empty is: missing, `null`, empty text or only whitespace; 0 and `false` are values.

### What happens when generating

- The XML is built from the root in the order of the compiled schema. A container appears only with assigned content or because the schema requires it; a mandatory text without a value is then an error. With a choice in the schema the branch with values applies (two filled ones are an error).
- Data type and facets (length, pattern, enumeration) are checked before writing; more occurrences than allowed are an error. Finally every non-empty value is compared with what was written: nothing gets lost silently.
- Written as UTF-8 without BOM, with a declaration and all namespaces at the root. Afterwards the core checks the finished XML against the schema set; every warning outside extension areas is an error.

### Uploading: file or package

- **File (.xsd):** an annotation file on an included schema set. Smart Templates packs it for storage.
- **Package (.zip):** exactly one annotation file (the only `.xsd` with the `st:` namespace) and, with `schemasatz="eigen"`, the schema files. Only `.xsd`; absolute paths, drives, `..`, empty path parts and duplicate names are rejected. With an included schema set the package contains only the annotation file. In own schema sets, patterns with nested repetitions are rejected.
- The core checks completely before it stores anything. If identifier and version already exist, it overwrites only with »replace« (designer: question; action: `Ersetzen` = `ja`). A deactivated row does not count, just as in the list and when printing: uploading a deactivated standard again creates a new, active row; the deactivated one stays as it is. In Dynamics, own standards are stored in the table `st_erechnungstandard`; uploading and deleting requires the security role »Smart Templates Designer«.

| Limit | Value |
|---|---|
| Package, packed | 768 KiB |
| unpacked or annotation file | 10 MB |
| Files in the package | 100 |
| Entries | 5,000 |
| Path | 64 steps, 2,000 characters |
| Expression | 4,000 characters, nesting 64 |
| Nesting of every XSD | 128 levels |
| Regular expressions | time limit 100 ms |
| DTD, external references | forbidden |

**Findings when loading** carry a code and a location (file, line, column), such as `xml.wohlgeformt`, `format.schema`, `text.fehlt`, `id.doppelt`, `ausdruck.syntax`, `pfad.schritt`, `pfad.doppeltreffer`, `liste.eltern`, `pflicht.ohneAngabe`, `standard.gesperrt`, `paket.zip` or `grenze.angaben`. Notes such as `text.englisch` do not prevent storing.

### The overview

From the standard, the core builds an **overview** for the assignment window, the AI assistant and the AI package: sections, entries (identifier, name, explanation, reason, mandatory from standard and schema, type, list, group, code list), lists (source, `min`, mandatory from the schema), groups, code lists (common codes) and checks. It is a view, never stored, without paths and without XML. The action `st_StandardLesen` returns it:

| `Teil` | Content |
|---|---|
| empty or `uebersicht` | the whole overview, code lists only with common codes |
| `pflicht` | only mandatory entries (standard or schema) |
| `abschnitt:<id>` | one section |
| `codeliste:<id>` | one code list with all codes |
| `vorschlaege` | the suggestions for the Dynamics invoice (with an identifier, cut to the standard) |
| `anmerkung` | the annotation file as text |
| `schema:<datei>` | one file of the schema set |
| `formatschema` | the format schema of the annotation files |
| `format` | this description as Markdown |

Without `Kennung` the action returns the list of standards (included and own ones); `Sprache` = `en` returns the English texts.

---

## AI package: structure of the file

*For developers · Page en/ki-paket.html*

> **In short:** The AI package is a Markdown file with which any AI can change a template or build a new one. It contains the task, the description of the template format, the template with the list of its building blocks, on request sample data, selected images and a directory of all reachable tables. By default, the AI answers with a change list (JSON Patch, RFC 6902); the designer checks it when it is uploaded and applies it as a single undo step. It delivers a whole template only on explicit request.

### What it is for

The AI assistant works in Microsoft 365 Copilot and reads everything from Dynamics itself. The AI package is the way for every other AI: it gets no access to Dynamics, but everything it needs in one file. How users create the package is described in Working with an external AI.

### Structure of the file

The sections appear in this order:

1. **Task for the AI:** what the file is for, how the AI should answer (by default exactly one change list in the format JSON Patch as a `.json` file, otherwise as exactly one JSON code block; the whole template only on explicit request), what a change list looks like (kinds, paths per RFC 6901, `test` steps) and what it must observe, including: The examples in the format are in English, and labels and texts in the template are written by the AI in the language of the template (`culture`) or of the user. Where the request goes is the sentence “The user will tell you in a moment what to change or build.”
2. **Template format:** the whole description from the chapter Template format.
3. **The current template:** the JSON of the open template, as “Save” writes it, but without sample record and without internal notes of the designer (keys that begin with `_`).
4. **Building blocks in this template**, only if the template contains building block objects: for each building block object its name, binding, prefix and its variables, plus what the AI may change on a building block object (see Building blocks: Building blocks and AI).
5. **Sample data,** only with the check mark “Include sample data”: a record of the primary source and the records attached to it through the relationships of the template. The keys are the paths of the placeholders (`name` under `Kunde` is `{{Kunde.name}}`). Lists show at most three rows, further sources their first three; empty fields are missing, long texts are shortened, images and files are only noted. Results of rules are not included.
6. **Images:** the images of the image library that are checked in the window, with short name, name, format and size in pixels, plus how the AI inserts an image and how it supplies a new one.
7. **E-invoice,** only with the check mark “Include the e-invoice standard”: the checked standards (identifier, version, output, document forms), whether the template already has the e-invoice turned on, the other standards of the environment, then per section the details in one line (identifier · name · type · required), the lists with their details, the common codes of the code lists, for the Dynamics invoice the suggestion table as JSON and, at the end, the description from Own standards for the e-invoice. If several standards are checked, there is a section “Standard” for each checked standard, with its output, its details and its common codes. What all of them have in common appears only once: the explanation of the lines, the description of own standards, the suggestion table if it is the same for all, and a code list that an earlier section already contains in the same form (it then says “as in …”). The AI assigns the template to exactly one of these standards. The explanation file itself is not included.
8. **Table directory:** all tables that the template can reach through its data sources, down to the sixth level, each exactly once; those used by the template first. First an overview, then, per table under “### Table <name> · <display name>”, the fields with display name and type, the option values as code and label and the relationships (N:1 and 1:N) with navigation name and lookup column.
9. **Once more at the end:** the answer rule in one paragraph, because an AI often retains the end of a long file better than the beginning.

#### Field types in the directory

For each type, the directory names the value for `type` in `fields`:

| Type | `type` |
|---|---|
| Text | `string` |
| Number | `number` |
| Currency | `money` |
| Date | `date` |
| Yes/No | `boolean` |
| Choice, multi-select | `optionset` |
| Lookup | `lookup` |
| Image | `image` |
| File | `file` |

A lookup appears as the field `_<column>_value` and as a relationship. A condition compares option values through `<field>_code`, for example `statecode_code == 3`.

### Name, language, size

- The file name is the name of the template, converted as for the PDF (see Full preview and PDF: The file name), with `-ki.md` at the end, with an English interface `-ai.md`; “Auftragsbestätigung” becomes `auftragsbestaetigung-ki.md`. With an English interface, the task, the format and all own texts of the file are in English, so that the AI answers in English.
- The table directory makes the file large: It contains every table that the template reaches down to the sixth level, with all option values. Measured in a test environment with 2,360 tables: roughly 12 to 13.5 MB. After downloading, the designer names the size and the number of tables.
- The e-invoice section, by contrast, is small: measured with the suggestion table, roughly 84 KB for ZUGFeRD 2.5.2 (EXTENDED), roughly 52 KB for XRechnung 3.0 and roughly 100 KB for both together, because the shared parts appear in it only once.

> **Caution:** With sample data, the file contains real values from Dynamics, including personal data. The check mark is therefore always off. Who users may give the file to is described under Working with an external AI: The settings in the “AI package” window.

### The way back

1. The AI delivers a change list (JSON Patch) as a `.json` file or as a code block in its answer. If, on request, it has written an own standard for the e-invoice, it is in the same file: `{ "aenderungen": [ … ], "standards": [ { "dateiname": "….xsd", "inhalt": "<xs:schema …" } ] }`. After a confirmation prompt, the designer uploads it before the changes; an identical existing one (the content is compared) is not uploaded again, and if the upload fails, it applies nothing.
2. The user uploads it with “Upload AI changes”, as a file or as pasted text (see Working with an external AI: Taking over the AI’s answer). Both go the same way: The designer looks for the list in the text, also between sentences and in code blocks; if it finds several, it reports that and applies none.
3. Applying and checking is done by the core of Smart Templates, the same place as for the AI assistant: all or nothing, at most 500 steps, then the same check as for the import (see Template format: What the check reports on import). The open template goes along with it; that is why it also works for a template that has not been saved yet.
4. For an image that the AI supplies in `daten`, the designer uses the same image from the image library if it is already there (the content is compared); otherwise it creates it there. After that, the image object contains only the short name. When an image is not applied and the spot stays empty is described under Managing templates: Images included.
5. The result goes into the open template as one undo step; “Save” makes it effective. If the core rejects it, the designer shows the error list, and the template stays unchanged. The user can give the list back to the AI; the task tells it that it should then correct exactly these spots and deliver the change list again.

If the user explicitly asks for a whole template, they open it as before through “Import” (see Managing templates: Importing). It opens as a new template that has not been saved yet; with “Duplicate” the user stores it in Dynamics (see Managing templates: After opening).

The same check also runs for changes by the AI assistant; it sits in the core of Smart Templates, not in the browser.

> **Good to know:** Like the AI assistant, the external AI also delivers by default only its changes as JSON Patch; the same place in the core applies them (action `st_VorlageAendern` for the AI assistant, see Actions and APIs). An AI that copies out a whole template can falsify uninvolved spots in the process; the check catches formal errors, but not silently changed texts. Therefore compare a whole template especially carefully with the full preview.
