Whole number Variable

A Whole number variable allows users to enter a positive or negative number without decimals in the questionnaire.
  • Question
    : This is the question we want to ask the user. It typically specifies the question text displayed on the questionnaire shown to end users.
  • Guidance
    : This specifies the guidance text that appears below the question in the questionnaire. It also supports rich text formatting using the controls above the text box.
  • Counted on questionnaire
    : When this option is checked, the system uses the variable to calculate a value instead of asking the user a question. As a result, the Question, Guidance, and Answer required fields are hidden because the user doesn't need to see or answer anything.
    Even though the fields are hidden, their values are still stored in the background. If you later uncheck
    Counted on questionnaire
    , those fields re-appear with all their original text and settings intact.
    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. When setting a default value for a text variable, it must be enclosed in double quotes.
    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
    : Must be a positive whole number representing the minimum value in the questionnaire.
  • Max. Value
    : Must be a positive whole number representing the maximum number of characters 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 is interpreted based on the variable type. You can choose from popular formats using the dropdown menu or create your own by selecting the
Create new
option. Selecting the
Edit format
button will open the Format dialog, and the newly created format will be selected 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
Whole Number Variables
, the available default formats are below:
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")
Words(words)
the cardinal value expressed as words (e.g. "two thousand and four")
Words for 0-9, digits for 10 and above (wordslow)
If the value is between 0-9, then "words"; otherwise "digits" equivalent to the format-by-value text "0-9=words|digits"
Ordinal digits(nth)
the ordinal value expressed as digits (e.g. "2004th")
Ordinal words(wth)
the ordinal value expressed as words (e.g. "two thousand and four")
Ordinal words for 0-9, ordinal digits for 10 and above (wthlow)
If the value is between 0-9, then "wth"; otherwise "nth" equivalent to the format-by-value text "0-9=wth|nth"
Currency words (currencywords)
the currency value expressed as words (e.g. "three hundred and forty-five pounds")
See Number Format for details on how to apply different formatting options.

Related Content