Skip to content

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.

{
"name": "total",
"expression": "{quantity} * {unitPrice}"
}
  • Type: string
  • Required: Yes

Name of the calculated value. Reference it in expressions as {total}.

  • Type: expression
  • Required: Yes

Expression used to calculate the value.

  • Type: boolean

When true, includes the calculated value in submitted response data.

{
"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}" }
]
}
]
}