Skip to content

Text

The Text widget shows a text on the dashboard: a note (“Rechnungen bis zum 15. einreichen”, submit invoices by the 15th), a greeting or a sentence with current numbers: “Today: 7 open orders, 2 of them overdue.” The numbers come from an SQL query via placeholders.

Text widget Heute (today) with the sentence Heute sind 3 Urlaubsanträge offen und 2 Materialbestellungen erfasst
Two placeholders, filled from the first row of a query.

Setting up

Dialog Configure text with the content containing placeholders, the alignment, the preview with inserted values and on the right the SQL query with test result
Content on the left, query on the right, preview with the values of the test row.

Configure text opens the dialog:

  • Content: the text, multi-line. Placeholders are written in double curly braces, {{offen}}.
  • Alignment: three icons for left-aligned, centered, right-aligned.
  • SQL query (optional): returns the values for the placeholders. Test shows the columns and the first rows.
  • Preview: the text with the values of the test row.
  • Apply saves; the content must not be empty.

Rules for placeholders

  • A placeholder is named like a column of the query: {{offen}} needs … AS offen.
  • Allowed are the letters a to z, digits and underscore; no umlauts, hyphens or spaces.
  • The first row of the result is inserted. If the column is missing or the value is empty, the spot stays empty on the dashboard.
  • Values come unformatted; amounts and dates are formatted in the query, see Formatting numbers and dates.
  • The text is plain text: no bold, no links, line breaks are kept.
  • The query runs only if the text contains at least one placeholder.

On the dashboard

The text loads when the dashboard opens and on Refresh dashboard; with a query also via the refresh icon in the header. If the content changes after an action on the dashboard, the frame flashes briefly. In a filter container, its filters and period also apply to the query of the text.

Example

Content: “Heute abzuarbeiten: {{offen}} offene Aufträge, {{ueberfaellig}} davon überfällig.” (to do today: … open orders, … of them overdue)

sql SELECT COUNT(*) AS offen, SUM(CASE WHEN faellig_am < current_date THEN 1 ELSE 0 END) AS ueberfaellig FROM auftraege WHERE status = 'offen'

Frequently asked questions

The placeholder appears literally on the dashboard.

The query returns no row or reports an error; the raw text then stays. Check the query in Data analytics.

The placeholder is empty.

The column is missing in the query, has a different name or the value is NULL. COALESCE(…, 0) inserts a 0.

Does {{Anzahl-offen}} or {{überfällig}} work?

No, only a to z, digits and _. Name the column in the query with AS anzahl_offen.

Next step

Record view: show a record selected in another widget.