- Answer scores attach a number to each answer option, exposing a variable you can feed into a calculation.
- Calculated values are variables computed from other variables with a guided formula builder.
{{variable}} text path, and the computation runs as a managed action on the device the SDKs already support.
Answer scores
A choice question normally just records which option the user picked. Answer scores let it also produce a number, without changing what the choice variable stores. In the choice block controller there is an “Answer values” section with a toggle “Use answers in a calculation”: “Give each answer a number, then reference it in a Calculated value.” Turning it on adds a small # field to every option, where you type that answer’s number. This is editable in Simple mode, on the choice controller.How scoring behaves
- It is non-destructive. The choice variable still stores its
option_Nvalue. Scoring adds a separate, managed number variable on the side, named by the “Variable name” field (default “Answer score”). - Single-select: the score variable holds the picked answer’s number. “The picked answer’s number becomes a Calculated-value operand.”
- Multi-select: the score variable holds the sum of the selected answers’ numbers. Leave every number at 1 to make it count selections.
Example
A question “How many hours a day on your phone?” with options scored 2, 4, 6, 8 exposes a number variable, sayphone_hours, holding the picked number. You then feed phone_hours into a calculated value.
Calculated values
A calculated value is a variable whose value is computed from other variables. You create one in the variable manager by setting the variable’s type to Calculated (“Computed from other variables (e.g. “27 years”)”). The variable manager is an Advanced-mode surface, so you build calculated values in Advanced. The numbers they usually consume (answer scores) can still be set in Simple.The guided formula builder
The default editor is a guided, left-to-right “Formula” builder, so you do not have to write an expression:Set the first term
The first row starts the formula (its placeholder reads “start”). Pick a variable or type a number.
Add steps
Click Add step to add a row. Each row has an operator (+, −, ×, ÷) and another variable or number.
The raw-expression escape hatch (Advanced)
For more control, toggle “Edit as expression (advanced)” to write a FlowExpression directly (toggle back with ”← Back to guided builder”). It supports multi-operator chains, parentheses, and the functionsround(), floor(), ceil(), and abs(). Reference variables by name, for example:
Showing the result
A calculated value is just a variable. Show it anywhere text is rendered by interpolating it: put{{your_variable}} in a Title or Normal Text block.
How it runs on the device
You do not wire anything up. When you create a calculated value, the editor compiles the formula and attaches a managedassign action to the consuming screen’s appear event, so the number is recomputed each time that screen shows. The SDKs already execute assign actions, so calculated values need no new runtime. See Conditions and expressions for the expression grammar.
In this version, a calculated value cannot reference another calculated value. Compute from captured and answer-score variables.
Common mistakes
- Assuming math precedence. The guided builder is strictly left to right. Reorder the steps, or switch to the raw expression and add parentheses.
- Scoring a multi-select and expecting one number. A multi-select score is the sum of the selected options. Use single-select if you want exactly one number.
- Renaming the score or calculated variable, then losing the reference. Other features read it by key. Rename consistently in the variable manager.
- Putting a calculated value on a screen that never shows. The value is recomputed when its screen appears. Reference it on or after the screen where its inputs are collected.