Variables and Parameters
An app produces data that must either be held temporarily or passed to another context. Variables store and update temporary state in the current context; parameters pass data during page navigation or a logic call.
Data that must be retained should be stored in the database.
Variables
A variable holds temporary state for a particular runtime context. Its value can be read and updated within its scope.
Each variable type has its own availability and lifecycle:
| Type | Available in | Current value expires when | Example |
|---|---|---|---|
| Client variable | Multiple pages in the current client | The page reloads or the client reloads or closes | A cross-page temporary selection or display preference |
| Page, modal, or component variable | The page, modal, or component instance where it is declared | That instance unmounts | A search filter, unsubmitted input, or selected item |
| Actionflow variable | The current Actionflow run | That run finishes | An intermediate calculation or loop total |
To create and use page variables, see Use Page Variables and Parameters. To update client variables, see Client and Page Actions. To configure Actionflow variables, see Build Actionflows.
Parameters
Parameters pass data during page navigation and between the caller and callee of an Actionflow, API, or AI Agent call. A page parameter provides data to the target page; an Actionflow, API, or AI Agent call receives data through input parameters and returns results through output parameters.
Page parameters
Page parameters pass data to a target page during navigation. Web page parameters are either path parameters or query parameters:
- A path parameter is a dynamic part of a page route template and affects the generated page path.
- A query parameter is a key-value pair appended to the page URL and does not change the page path itself.
To configure and pass page parameters, see Use Page Variables and Parameters.
Component outputs
Input components expose their current values as component outputs, so other components and actions can bind to them.
Actionflow, API, and AI Agent parameters
When an Actionflow, API, or AI Agent is called, the caller passes data through input parameters and receives returned data through output parameters (action results) after it completes.
To configure inputs and results for Actionflows, APIs, and AI Agents, see Build Actionflows, Integrate APIs, and Build AI Agents.