Data Sources New in 2
Audience:
Low-code EngineersSkill Prerequisites:
Dashboard,Entities,SQL,Tokens
Every widget reads its own data, chosen on its Data tab under Data Source. KPI tiles and charts have the same six sources, so one dashboard can mix an entity's records, a table on another database and a workflow's output.

| Data source | What it reads | Best for |
|---|---|---|
| Entities | An entity's records, counted or summed by the platform | Your app's own records, with the viewer's permissions |
| Database Tables | A table or view, counted or summed by the platform | Tables outside entities, on this or another database |
| SQL Query | The rows of your own query | Anything a query can compute |
| Workflow | An output of one of your workflows | Data from other systems, or computed in steps |
| Token | Text or JSON with tokens replaced | A value a token already gives |
| Constant | Text or JSON typed in | Fixed values, targets, examples |
Entities and Database Tables
You don't write SQL: you pick the entity or the table and say what to calculate, and the platform builds the query. The fields read as a sentence:

- Entity, or Database and Table or View. A table can be on this site's database or on any Database connector defined in Connectors.
- Where (optional): a SQL WHERE clause that narrows the records, e.g.
Status = 'Open'. The filter button next to the table opens an editor for it. Tokens work, and their values are escaped. - Calculate
Count,Sum,Average,MinimumorMaximumof a number property or column. On a chart, + Add value adds another calculation, e.g.Sum of Costnext toSum of Revenue, each with its Legend name. - Group By (charts): a date per
Day,Week,Month,QuarterorYear, or any other property or column, e.g.Region. A chart draws a point or a bar per group. Records grouped by a reference to another entity are labeled with the referenced records' names; records without a value form a "(none)" group. - Time Range based on a date property or column:
All Time,Today,Last 24 Hours,Last 7 Days,Last 30 Days,ThisorLast Week,MonthorYear, orCustomdays. See Filters. - Format (KPI tiles): how the number is written, e.g.
Rounded Money.
The counting and grouping happen in the database, so a large table returns one row per group. A widget of an entity applies the entity's view permissions: each viewer sees the numbers of the records they can read.
SQL Query
Write a SELECT and the widget draws its rows.

- A KPI shows the first column of the first row:
SELECT COUNT(*) FROM dbo.Orders WHERE Status = 'Open'. - A chart draws the rows, up to 1,000. Choose the X Axis and Values from the query's columns; by default the first column is the X axis and every other number column is a value.
- Database: this site's database, or a Database connector from Connectors. The connection string stays in the connector.
- Tokens are replaced before the query runs, and their values escaped for SQL:
WHERE Region = '[QueryString:region]'orWHERE OwnerId = [User:UserID]. - The query runs in a transaction that is always rolled back, and stops after 30 seconds.
- Dates on the first of each month are labeled as months ("Jan 2026"), and on 1 January as years, so a query grouped by month needn't format its labels.
The builder previews the query's rows when you leave the editor. If it fails, the reason shows under it.
Only Low-code Engineers, Administrators and superusers can write or change a widget's SQL, here and in a WHERE clause. For others the query is read-only, and SQL Query can't be chosen for a widget that doesn't already use it.
Workflow
Choose one of your app's workflows and one of its outputs. The workflow runs on the server, as the viewer, when the widget loads.
- A KPI shows the output's value.
- A chart reads rows from the output: JSON rows, or a list or table the workflow built.
Use it for data from another system's API, or numbers that take several steps to compute.
Token
Text whose tokens are replaced for the viewer.
- A KPI shows the text, e.g.
[GetData:BounceRate]%. - A chart reads JSON from it, so a custom token can return the whole chart's rows, e.g.
[Charts:RevenueByMonth]from a SQL query ending inFOR JSON PATH.
Constant
Text shown as you typed it.
-
A KPI shows the text, e.g. a target:
$250,000. -
A chart reads JSON: a list of objects, one per row, or an object of names and values, one row each:
[{"Month": "Jan", "Sales": 10}, {"Month": "Feb", "Sales": 14}]{"Open": 5, "Closed": 7}
Numbers written as text count as numbers, and ISO dates as dates.
Tokens in a widget's data
Tokens work in a SQL query, a WHERE clause, a Token or Constant value, the title, the description and the Show Condition. They're replaced for each viewer, so one dashboard can show each viewer their own numbers:
[User:UserID]for the viewer's own records.[QueryString:region]for the page's address: on/Sales?region=Norththe widget shows North's numbers.[Filter:Region]for the dashboard's filters. See Filters.
How long data is kept
The server keeps what a widget read for the time set in Keep data for (5 minutes for a new dashboard), and serves it to every viewer who asks. A widget whose data depends on the viewer, such as an entity's (its permissions), a workflow's (it runs as the viewer) or any source with a token, keeps its data apart for each viewer. See Keep the data fresh.