Queries
Queries define what an app may read and change. They live in the Queries tab of the App-Builder and run on the server: the browser only sends the name of the query and the values of its parameters – table, filter, fields and values never reach it and cannot be altered.
Kinds
| Kind | For | Fields |
|---|---|---|
| List records | lists for tables, lists, charts, selects | table, fields (none = all), filter, sort, maximum per page |
| One record | details, e.g. in a dialog | table, record (primary key), fields |
| Create record | saving a form | table, values (column → value) |
| Change record | setting a status, editing | table, record, values |
| Delete record | – | table, record |
| Upload a file | attachments to a record, e.g. photos or receipts | table, record, attachment column; the file comes from a File input |
| Run workflow | logic on the server | workflow (see Workflows and REST sources) |
| Custom endpoint | existing script endpoints | method, path |
| REST source | external API | source, method, path, body |
Parameters and placeholders
A query only accepts declared parameters (name, type text/number/yes-no/date/any, required). In filter, values, record, path and body, placeholders insert them:
{{params.<name>}}– a parameter. Standing alone it keeps its type.{{user.id}},{{user.email}},{{user.role}}– the logged-in account (empty in public apps).{{now}}(point in time) and{{today}}(date).
Placeholders are inserted into the stored structure, never into query text – a value can only ever become a value. In paths of REST sources they are URL-encoded. Empty filter value = no condition: if a placeholder of a filter condition is empty, the condition is dropped – an empty search field shows everything. From placeholders creates the parameters from the placeholders used.
Data elements give the parameter values in their properties, actions in the step Run query (with Form the values of a form become parameters of the same name). At the bottom of the tab every query can be tried out with sample values (writing queries really change data).
Rights
- Apps with login: every query reaches exactly its table at its level (read or write) – and never more than the account may anyway: for viewers their table permissions apply as well.
- App users have no table permissions; only the queries of their apps apply to them.
- Public apps run with a nameless app identity: exactly the queries of the app, the same for every visitor – logged-in ones too.
- Computed fields belong to the table: lookups, rollups, formulas, links, child records and the display values of foreign keys come with the query’s table (or the tables of a workflow), even when they reach into other tables – in
fieldsandwherethey go by their API name. App users and public apps see them as the table is built; for viewers, fields from tables they may not read stay hidden. - Hooks, webhooks and computed fields work as with the REST API. The runtime allows 600 calls per minute and IP.