Computed Values
Work out a value from an answer or attribute, such as a zodiac sign from a birth date, and use it in text or to split the flow.
Computed Values
A computed value turns an answer or a user attribute into something you can show or route on. Ask for a birth date, and the next screen can say "You're a Leo". Ask for a weight goal, and a Response Split can send each band of answers to its own plan.
You set computed values on the flow. No code runs: you pick one of five types and fill in its rows.
The five types
| Type | Reads | Result |
|---|---|---|
| Date ranges | A date | The row whose day range holds the date. Turn on Use the zodiac signs for the built-in table. |
| Number ranges | A number | The row the number falls in. Each row runs from From (included) to Below (excluded). |
| Text matches | Text | The row whose When the answer is equals the answer, ignoring case and surrounding spaces. |
| Age in years | A date | Whole years since the date, as a number. |
| Days until the date | A date | Days from today to the date, as a number. It goes negative once the date has passed. |
Each row of a Date ranges, Number ranges or Text matches value has a Value (what the flow stores and splits on) and an optional Label (what you show to the user). When nothing matches, the Otherwise value is used. Leave it empty and the computed value stays empty for that user.
- Date ranges are written
MM-DD, for example03-21to04-19. A range can wrap the end of the year, such as12-22to01-19. - Number ranges can leave out either limit, so one row can cover "below 18.5" and another "25 and above".
- Dates are read in the format a DatePicker stores,
YYYY-MM-DD. A date that does not exist, such as2026-02-30, counts as no answer. - Numbers accept a comma as the decimal separator, so
18,4reads as 18.4. Thousands separators are not supported:1,500reads as 1.5.
Creating a computed value
- Open the flow in the flow builder.
- Open the variable picker on any text property and choose Manage computed values, or click Manage in a Branch node's source settings.
- Click Add computed value and give it a Name: lower-case letters, digits and underscores, starting with a letter, for example
zodiac_sign. - Set the Source. Click Use an answer to pick an input from the flow, or type one reference.
- Choose the Type and fill in its rows.
- Click Save.
The source is a single reference:
| Source | Syntax | Reads |
|---|---|---|
| An answer in this flow | {{input.birth_date}} | What the user entered in the input named birth_date. |
| A user attribute | {{user.birthday}} | The attribute your app set with identifyUser. |
| Another computed value | {{computed.age}} | A computed value listed above this one. |
A computed value can only read one listed above it, so you can build one on another: an Age in years value, then a Number ranges value over {{computed.age}} that turns the age into bands.
Computed values are a flow setting, not part of the draft. On a published flow, saving changes them for your users right away.
Showing a computed value in text
Insert it from the variable picker's Computed values group, or type it:
| Expression | Shows |
|---|---|
{{computed.zodiac_sign}} | The value, for example leo. |
{{computed.zodiac_sign.label}} | The label, for example Leo. Without a label, the value. |
Computed values work in the editor Preview, on share links and in your app, and they update as soon as the user gives the answer they read.
Splitting the flow on a computed value
A Branch node can split on a computed value instead of an answer on a screen. Set Split on to A computed value and pick it. The Branch node lists every value the computed value can produce, including the Otherwise value, and you map each one to a destination.
Age in years and Days until the date produce an open-ended number, so they cannot drive a split directly. Add a Number ranges value over {{computed.age}} and split on that.
A computed value that a Branch node splits on cannot be removed. Change the split first. Text that still reads a removed computed value is allowed, but it shows nothing.
Example: zodiac sign from a birth date
- On screen 2, add a DatePicker with the Variable Name
birth_date. - Add a computed value named
zodiac_sign, with the source{{input.birth_date}}, the type Date ranges, and Use the zodiac signs turned on. - On screen 3, add a Text component with:
You're a {{computed.zodiac_sign.label}}. Here's what your week looks like.A user who picks 1994-08-01 reads "You're a Leo. Here's what your week looks like."
The zodiac table uses the Western tropical dates. Its values are aries through pisces, and its labels are the English sign names. To route each sign to its own screen, add a Branch node that splits on zodiac_sign.
Limits
| Limit | Maximum |
|---|---|
| Computed values per flow | 20 |
| Rows in a Date ranges or Number ranges value | 50 |
| Rows in a Text matches value | 100 |
| Length of a value | 100 characters |
| Length of a label or a match | 200 characters |
Next steps
- Variable Bindings -- the full binding syntax.
- Branching -- route users on their answers.
- Input Components -- the DatePicker and the other inputs a computed value can read.