Orders by Status

Variables

Using variables

Add variables in SQL with {{var_name}}. When you type one, Lotus detects it and adds an input in the toolbar.

SELECT *
FROM orders
WHERE status = {{status}}
  AND created_at >= {{from_date}}
  AND total_amount >= {{min_amount}}

Types

  • Text – plain strings (quoted for you)
  • Number – integers/decimals
  • Date – date picker, ISO date

Widgets

  • Input – free text/number entry
  • Dropdown – choose one:
    • Static options – one per line. value.
    • SQL query – return columns as value, label (or a single value column).

Labels & defaults

  • Label defaults to title-cased variable name (min_age → Min Age).
  • Default value is used if the toolbar input is empty.
Values are always sent as prepared parameters (no string interpolation), using your DB dialect’s placeholders.
Toolbar
Source
Schema

Results

Running...
Lotus v0.11.0 Lotus.Web v0.10.1