Variables
How to define and use variables to make documents reusable across different contexts.
Variables are named parameters that make a dynamic document reusable across different contexts without rebuilding it. Instead of creating a separate day sheet for every collaborator, you define a Collaborator variable, bind your Query Block filters to it, and the document renders for whichever collaborator the viewer selects.
Managing Variables
Variables are managed through the Variables button in the top-right corner of the document editor. Clicking it opens a sidebar where you can add, edit, and remove document variables.
Each variable has a name that appears in the configuration bar and in filter binding menus (for example, "Collaborator" or "Show Date"), a type that determines what kind of picker the viewer sees when setting a value, a required flag that controls whether the document waits for the variable before rendering, and an optional default value that pre-selects a value when the document opens.
Variable Types
| Type | What it points to |
|---|---|
| Collaborator | A collaborator on the event |
| Area | An area on the event |
| Activity | A schedule activity on the event |
| Crew | A crew member on the event |
| Resource Type | A procurement resource type |
| Date | A date value |
| Text | A free-text string |
Entity-typed variables display as a dropdown populated with the available options from the event. Date variables render a date picker. Text variables render a free text input.
Multi-Select Variables
Any variable can be set to allow multiple selections. A multi-select Collaborator variable lets the viewer pick several collaborators at once, and any filter bound to it automatically expands to match against all selected values. This makes it straightforward to build a document that shows data across a defined subset, such as all the areas a department head manages or all the collaborators working a specific stage.
Binding Variables to Filters
Variables become useful when bound to Query Block filters. In the filter configuration for any block, the value field includes a pin icon. Clicking it opens a variable selector, letting you connect the filter to any variable defined on the document. Once bound, that filter is dynamic. When a viewer changes the variable value, the block re-queries using the new value and the table updates.
Setting Variable Values
When a document contains variables, a configuration bar appears at the top of the document. This bar shows controls for each variable: dropdowns for entity-typed variables, date pickers for date variables, and text inputs for text variables.
If a variable has a default value configured, it pre-selects that value when the document opens and the document renders immediately. If a required variable has no default, the document waits in an unresolved state until the viewer makes a selection. Query Blocks don't render with incomplete context.
Setting default values on required variables lets a document open fully rendered for the most common case, while still allowing viewers to switch contexts when needed.