Most Interaction flows contain multiple variable types. The input for these variables can come from many different sources, such as data from user input questions, responses from external web services (Integration Points), or results of internal calculations in the Interaction.

Each variable has a specific data type (e.g., text, number, date, and so on). Each of these data types can have several different display formats. For example:

  • A number can be displayed with or without a decimal point.
  • A date can be shown in long or short format.
  • An amount of currency can be displayed together with the symbol associated with a given currency type.

The Format feature of the Interaction Designer allows you to define the required formatting for a data type, so the output of the variable will be displayed to the end user in the proper format (e.g., with the correct currency symbol).

Note: When special formatting is defined for a data type, the formatting specified appears only when the variable is displayed to the end user in a visual Interaction element (e.g., a Statement). The defined format is not displayed during data input (for example, while the user is answering a input question).

Using the Format Feature

When defining a variable of the type Number, Currency, Date, or Text (or a collection of one of these simple types), the Format button is enabled.


Clicking the Format button opens the Return Format popup. Formatting options are displayed in the upper portion of the popup. (The options presented vary according to the data type selected.) The preview frame at the bottom of the popup allows you to view an example of the selected format.

 The following sections explain the formatting options for specific data types.

Formatting Number Data Types

The Number Return Format popup enables you to define the following settings:

SettingDescription/Notes
Decimal Places Allows you to specify how many decimal places will be shown.
Locale Select the required locale from the dropdown list. The format of the separators in the number (for thousands and decimal points) are displayed according to the custom in the selected locale.
Show thousands separator This checkbox determines whether or not thousands separators are displayed (e.g., 1,000 vs. 1000).

In the following example, a Swedish locale is selected. Thousands separators appear as blank spaces, and the decimal places are separated by a comma.

Formatting Currency Data Types

The Number Return Format popup enables you to define the following settings:

SymbolAllows you to enter the symbol associated with the currency used in the selected locale.

SettingDescription/Notes
Decimal Places Allows you to specify how many decimal places will be shown.
Locale Select the required locale from the dropdown list. The format of the separators in the number (for thousands and decimal points) are displayed according to the custom in the selected locale.
Show thousands separator This checkbox determines whether or not thousands separators are displayed (e.g., 1,000 vs. 1000).
Position Allows you to enter the symbol associated with the currency used in the selected locale.

Formatting Date Data Types

The Date Return Format popup enables you to define the style in which the date is displayed. The options are:

  • Short Date: Presents a short format with the day of the month displayed first, e.g., 15/10/2013.
  • Long Date: Presents a format with the month spelled out, e.g., October 15, 2013.
  • US Date: Presents a short format with the month displayed first, e.g., 10/15/2013.
  • Custom: Allows you to configure a display format of your choice. For example:

Note: Before working with date formatting, verify that the initial value of the variable is set in US Date format (e.g., 11/24/2013). For more information, refer to User Variables.

Formatting Text Data Types

The Number Return Format popup enables you to define the following settings:

SettingDescription/Notes
Format Allows you to customize how the text is displayed in runtime. The symbol # represents the characters in the string. Supplement spaces, hyphens, and other special characters to the string, as required. The example in the figure below illustrates the formatting for a credit card number.
Secure Answer Determines whether or not the display is masked as the user enters input. When the checkbox is selected, the Mask settings are enabled.
No at the start Allows you to specify how many characters at the beginning of the string are displayed in clear text. (The rest of the string is masked.)
No at the end Allows you to specify how many characters at the end of the string are displayed in clear text. (The rest of the string is masked.)

Revision:

Comments