Calculated Value Schema
Calculated values are defined on the form root with calculatedValues. Use them for derived values that can be referenced by expressions, visibility conditions, and display text.
Minimal Shape
Section titled “Minimal Shape”{ "name": "total", "expression": "{quantity} * {unitPrice}"}Properties
Section titled “Properties”- Type:
string - Required: Yes
Name of the calculated value. Reference it in expressions as {total}.
expression
Section titled “expression”- Type:
expression - Required: Yes
Expression used to calculate the value.
includeIntoResult
Section titled “includeIntoResult”- Type:
boolean
When true, includes the calculated value in submitted response data.
Example
Section titled “Example”{ "title": "Order request", "calculatedValues": [ { "name": "total", "expression": "{quantity} * {unitPrice}", "includeIntoResult": true } ], "pages": [ { "name": "page1", "elements": [ { "type": "text", "name": "quantity", "inputType": "number", "title": "Quantity" }, { "type": "text", "name": "unitPrice", "inputType": "number", "title": "Unit price" }, { "type": "expression", "name": "totalDisplay", "title": "Total", "expression": "{total}" } ] } ]}