Defining a default value

You can set a default value on an input data node to provide a fallback value if no value is available.

About this task

You can set default values for the following purposes:

  • The data that is handled by the node is optional, and might not always be provided by the client application. For example, if the customer's country is US for almost all transactions, the client application might provide this information only if the country is different.
  • For convenience, the validation feature uses the default value if no value is provided in the test data. Default values can reduce your data entry in the data sets that you create.

The following examples show how to set the default value on a data node:

  • On a built-in data type:
    set gender to "Female";
  • On a custom data type:
    set loan to a new loan where 
        the amount is 100000, 
        the monthly repayment is 688;

Procedure

To create a default value for an input data node:

  1. Open the Default value tab of the node.
  2. Click the + button, and select Default rule.
  3. Define the default rule in the rule editor.