Decimal number Variable

A
Decimal Number
variable allows users to enter precise numeric values, including decimals and negatives, with optional minimum/maximum constraints and formatting such as currency, percentage, or fractions.
  • Question
    : Specifies the question text that is displayed on the questionnaire shown to end users.
  • Guidance
    : Specifies the guidance text displayed on the questionnaire, which supports rich text formatting through the controls provided above the text box.
    note
    If you want to make a specific question compulsory for the user, check the
    Answer required
    box. Required questions display a red asterisk and prevent submission until they are answered.

Advanced settings

This section is divided into three different categories. On the Questionnaire, lists questions and input fields shown to end users in Author Online to collect structured feedback or data, which may vary by content type. The document outlines the values that will be included in the final document generated after the questionnaire is completed and the template is assembled. Repeated groups help authors organise content that could be repeated.

On the Questionnaire

  • Default Value
    : Default values are pre-filled entries that appear in questionnaire fields when accessed for the first time. You can later type these values manually in the edit boxes or derive them using expressions in the questionnaires.
    If a variable remains unanswered, because the user removed the default or skipped the relevant questionnaire page, the default value will not appear in the final document. This ensures only confirmed user inputs are included.
  • Min. Value
    : Specifies the minimum numeric value (including decimals or negatives) allowed in the questionnaire.
  • Max. Value
    : Must be a numeric value representing the maximum value allowed in the questionnaire. The text box will prevent the user from entering more characters than the specified value for this attribute.

In the Document

Default case

The default case specifies the casing of variable values in a generated document when no local case is defined. The available options are:
Format Option
Description
Capitalize Each Word (capitals)
The first letter of all words will appear capitalised in the generated document.
Uppercase (upper)
All letters will appear in uppercase in the generated document.
Lowercase (lower)
All letters will appear in lowercase in the generated document.
As entered
All letters will appear as they are entered on the questionnaire in the generated document.
Title case (proper)
The first letter of all major words will be capitalised in the generated document.
First letter capitalize (firstletter)
The first letter of each word will be capitalised in the generated document.
If no default case is selected, the value will be generated as entered in the questionnaire, by default.
For detailed instructions, see Field format and case overview.

Default format

The default format attribute determines how variable values appear in a generated document when no local formatting is applied. The default format used depends on the variable type. You can select a pre-defined format from the dropdown or create a custom format by choosing
Create new
. Clicking
Edit format
opens the Format dialog, where the newly created format is automatically set as the default.
If you choose
None
as the default format, the generated document will undo the previous selection and remove the selected format.
You can manage both newly created and existing formats by selecting the format and clicking
Edit format
. This will open the Edit Format dialog box, which provides options to Delete, Save, or Cancel.
  • Delete
    – Removes the selected format.
  • Save
    – saves the custom formats in the Format table according to applicable conditions.
  • Cancel
    – Discards the custom formats, and they will not be stored in the format table.
note
When custom formats are created for a data type, they will be displayed as options in the '
format
' dropdown, ordered by the most recently added and appearing immediately after the default format list. If any format is modified, it will be re-ordered to appear by the most recently modified status in the dropdown.
For
Decimal Number Variables
, the available default formats are:
Pre-defined formats
Description
Digits(digits)
Simple digit characters for the number (e.g. "2004")
Digits with thousand separator (thousands)
Digit characters with thousand-point separators (e.g. "2,004")
Currency digits (currencydigits)
digit characters to 2 decimal places with prefix/suffix currency symbols (e.g. "$1,003.50"). The 2 decimal places are not enforced for whole-number currency amounts.
Words for 0-9, digits for 10 and above (currencywordslow)
if the value is between 0-9 then "currencywords" otherwise "currencydigits" equivalent to the format-by-value text "0-9=currencywords|currencydigits"
Fractions (fraction/2/4/8)
fractional formatting to the nearest half, fourth, eighth as words, eg, One Third, Seven Ninths.
Two decimal spaces with thousands separators (0,0.00)
Digit characters with comma separators for thousands and exactly two digits after the decimal point (e.g. "1,234.89").
Percentage (0.00#%)
The decimal number expressed in digits as a percentage between 2 and 3 (e.g. 1.003%).
Currency symbol ($0,0.00)
Digit characters to 2 decimal places with prefix currency symbol and thousands separators (e.g. "$1,234.89").
See Number format and Number Format by Value for details on how to apply different formatting options.

Related Content