InitialValue property

SwitchField.InitialValue — Logical

Represents the initial value of a switch field, displayed before the user has entered an explicit value.

An unchanging initial value can be assigned to a switch field simply by clicking its handle in Calcapp Creator.

When a field is reset through a reset button, its value is set to the initial value (unless the reset button has been configured to instead assign blank values).

If an initial value is set through a formula, the formula is evaluated just before the screen housing the field is shown. In other words, the formula can reference values of fields that have been shown previously.

If this property is not set, it returns FALSE.

Example

MainScreen!Result < 0MainScreen!Result < 0

Sets the initial value to TRUE only if the value of the Result field is less than 0, where the Result field appears as part of the screen MainScreen. Otherwise, the initial value is set to FALSE.