Skip to main content

Variables

Check in the app

Variables are placeholders in a template, written in curly braces — {variable}. When you generate a document from a template, each variable is replaced with a concrete value. This is what makes one template reusable for many documents.

User vs system variables​

TypeWho fills itExample
User variableYou — entered manually when generating the document{clientName}, {clientEmail}
System variableThe app — recognised by key, filled automatically (some you provide){date.today}, {supplier.name}, {amount.total}

Any {key} that is not a known system variable is treated as a user variable. The template editor classifies each variable automatically and lists them in the sidebar (see Creating a template).

Data types​

Each variable has a data type that controls how its value is interpreted:

TypeMeaning
STRINGText
DATEDate in YYYY-MM-DD format
NUMBERNumeric value (integer or decimal)
BOOLEANtrue / false

System variables — catalogue​

Filled automatically​

These are resolved by the app when the document is generated — you don't enter them.

VariableTypeValue
{date.today}STRINGToday's date
{date.yesterday}STRINGYesterday's date
{date.tomorrow}STRINGTomorrow's date
{supplier.name}STRINGCounterparty name
{supplier.firstname}STRINGCounterparty first name
{supplier.nip}STRINGCounterparty Tax Id (NIP)
{supplier.business}STRINGBusiness flag/type
{supplier.accountNumber}STRINGBank account number
{supplier.email}STRINGE-mail
{supplier.phone}STRINGPhone
{supplier.supplierAddress.city}STRINGAddress — city
{supplier.supplierAddress.street}STRINGAddress — street
{supplier.supplierAddress.postalCode}STRINGAddress — postal code
{supplier.supplierAddress.number}STRINGAddress — building number
{supplier.supplierAddress.country}STRINGAddress — country
supplier.* requires a counterparty

The supplier.* variables are filled from the counterparty (Kontrahent) selected when you generate the document. Manage counterparties under Suppliers.

You provide a value​

These system variables are recognised by the app but their value is entered when the document is generated (alongside your user variables):

VariableType
{date.start}DATE
{date.end}DATE
{date.payment_due}DATE
{amount.total}NUMBER
{status.external}STRING
{is.priority}BOOLEAN

The System variables screen​

The app has a dedicated System variables screen — a reference list of every system variable, with a friendly label and a copy button for each key. Open it from System variables in the side navigation.

System variables screen

Each entry shows the human label (e.g. Today's date, Total amount, Tax ID (NIP)) and the key you insert in a template (e.g. date.today, amount.total, supplier.nip). Click the copy icon to copy the {key} and paste it into the editor.

How variables are filled when generating a document​

  1. The app scans the template for {...} variables.
  2. It splits them into:
    • automatically filled system variables (dates, supplier.*) — resolved from the current date and the selected counterparty;
    • to fill — your user variables plus the editable system variables above — presented as a form for you to complete.
  3. The final document is rendered with all values substituted in.

See also​

  • Creating a template — add variables in the editor.
  • Suppliers — manage the counterparties that feed supplier.* variables.
note

The system-variable catalogue above reflects the current backend (autodocuments-be). The source version is recorded in the documentation plan.