The Default Value property sets an initial value to the control while allowing a new value to be entered or selected by the user.
Property Type: Static
Default Value: (Check Box) False
Default Value: (Combo Box, List Box, Text Box, Option Group) No default value is applied to this property
Default Value: (Numeric Text Box, Slider, Spin Button) 0
Hierarchical Reference: ControlName.DefaultValue
The Default Value property only affects the value of the control when a rule applied to it recalculates while in a running State.
Any other interaction with the control, that affects its value, will override the Default value.
A rule applied to this property is not recalculated when starting a new specification or when transitioning to another State.
Ensure the property is a static property (It will display the gray orb alongside the property name)
Default Value Property Value (static) | Result |
---|---|
True (Check Box) | Will set the value of the control to be True until changed by the user. |
Blue (Combo Box, List Box, Text Box, Option Group) | Will set the value of the control to be Blue until changed by the user.
The value being returned by the Default Value rule must be selectable from the
listed Items. |
200 (Numeric Text Box, Slider, Spin Button) | Will set the value of the control to be 200 until changed by the user. |
A rule can also be built for this property by changing the type to dynamic.
See How To: Change A Static Property To A Dynamic Property.
Default Value Property Value (Dynamic) | Result |
---|---|
IF(LengthReturn<500, True, False) (Check Box) | Will set the value of the control to be True when the control Length is less than 500. |
IF(CheckBoxReturn=True, Blue, Red) (Combo Box, List Box, Text Box, Option Group) | Will set the value of the control to be Blue when the control Checkbox is True. |
IF(CheckBoxReturn=True, 500, 100) (Numeric Text Box, Slider, Spin Button) | Will set the value of the control to be 500 when the control CheckBox is True. |
Using the Default Value property, controls can reference each other. The circular reference created is handled by DriveWorks.
Default Value Property Value (Dynamic) | Result |
---|---|
On a control named NumericTextBox SliderReturn | Will set the Default Value to be the result of the control NumericTextBox |
On a control named Slider NumericTextBoxReturn | Will set the Default Value to be the result of the control Slider |
DriveWorks Tech Tips Portal |
Default Value Rule Default Value and Override Value rules on your controls can be utilized to produce desirable form behavior. Editing Table Data This project shows how to add, edit and delete data from a Simple Table. The methods used in this can be transferred to Group Tables and also SQL Tables. |
DriveWorks Tech Tips Portal is available to DriveWorks Pro customers with an active subscription and support contract. Tech Tips provide cut down projects that highlight specific functionality for faster and more effective learning. To access the portal:
The portal provides a search facility, start typing the name of the Tech Tip (as indicated above) to display the Tip you require. |
Value set in Form Designer. Static properties can be made Dynamic by double clicking the gray radio button.