Expression Schema Properties
A read-only element that displays the result of a calculated expression.
Element type: expression
Key properties: 8
Generation Hints
Section titled “Generation Hints”- Aliases: calculated display, formula display, read-only computed value.
- Use when: showing a calculated value to respondents.
- Recommended properties:
type,name,title,expression,displayStyle,currency.
{ "type": "expression", "name": "total", "title": "Total", "expression": "{quantity} * {unitPrice}" }Key Properties
Section titled “Key Properties”expression
Section titled “expression”- Type:
expression - Default:
—
An expression used to calculate the question value.
format
Section titled “format”- Type:
string - Default:
— - Localizable: Yes
A string that formats a question value. Use {0} to reference the question value in the format string.
displayStyle
Section titled “displayStyle”- Type:
string - Default:
"none" - Allowed values:
none,decimal,currency,percent,date
Specifies a display style for the question value.
currency
Section titled “currency”- Type:
string - Default:
"USD" - Allowed values:
AED,AFN,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD
A three-letter currency code. Applies only if the displayStyle property is set to “currency”.
minimumFractionDigits
Section titled “minimumFractionDigits”- Type:
number - Default:
-1
The minimum number of fraction digits. Applies only if the displayStyle property is not “none”. Accepts values in the range from -1 to 20, where -1 disables the property.
maximumFractionDigits
Section titled “maximumFractionDigits”- Type:
number - Default:
-1
The maximum number of fraction digits. Applies only if the displayStyle property is not “none”. Accepts values in the range from -1 to 20, where -1 disables the property.
precision
Section titled “precision”- Type:
number - Default:
-1
Specifies how many decimal digits to keep in the expression value.
useGrouping
Section titled “useGrouping”- Type:
boolean - Default:
true
Specifies whether to use grouping separators in number representation. Separators depend on the selected locale.
Shared Properties
Section titled “Shared Properties”This page lists only properties that are specific to this element type or especially important for generation.
- Use Shared Question Properties for common fields such as
name,title,description,isRequired,requiredIf,visibleIf,enableIf,readOnly,defaultValue,validators,width, and layout options.