SetInitialValue – XpressDox

Assign a default value to a field in the interview with the SetInitialValue command.

 

Examples:

  1. A simple example:
«FormatNumber(Hourly_rate)»
«SetInitialValue(Hourly_rate,450)»

 

  1. Setting the default of a radio button to something other than its first value:
«ChooseFromHzRDBList(Authorisation_required,Yes,No)»
«Caption(Authorisation_required,Do you require an authorised signatory?)»
«SetInitialValue(Authorisation_required,No)»

 

  1. An example inside a ForEach:
«ForEach(Party)»
«ChooseFromHzRDBList(Type,Individual,Company)»
«if(Type = ‘Company’)»
«NumberOfDirectors»
SetInitialValue(NumberOfDirectors,3)»
«End()»
«End(ForEach)»
or
«SetInitialValue(Party/NumberOfDirectors,4)» (if the command is placed outside of the ForEach)

 

The Question command:

The Question command does provide a parameter to include initial data in the interview. You may want to refer to this article on the benefits on using Full Code over Low Code.

 

Include default values in your XpressDox interviews

 

 

The Define command:

The Define command also provides a parameter to pass in an initial value into a field on the interview, should you be choosing Define over separate commands.

 

Include default values in your XpressDox interviews

 

 

Important note:

Any default values supplied to the interview using the SetInitialValue command will be overwritten when providing the interview with other data, e.g. an xml dataset in the form of “Use Other Data”, or IncludeFileData; or if you will be publishing this template on our Publisher framework which sends data to the interview using the concept of Firm information.