Home Search

DriveWorks Pro 22
Override Rule

Send Feedback

(Override Rule)

This topic applies to the following properties:

  • Checked (Override Rule)
  • Selected Item (Override Rule)
  • Selected Option (Override Rule)
  • Value (Override Rule)
  • Text (Override Rule)
  • Date (Override Rule)

The ...(Override Rule) property forces a value to be set for the Return value of the control.

Property Type: Dynamic

Default Value: No default value is applied to this property

Hierarchical Reference: ControlNameReturn

The rule for this property is required to have:

  • A valid value for the control type when an override is to be enforced
  • The Name ( without the return suffix) of the control the override rule is being applied to, when an override is not required.

The chart below lists the controls this property is available for:

Override Rule Property NameAvailable for Control TypesValid Values when Enforcing an Override
Checked (Override Rule)Check BoxA Boolean value (True, False)
Selected Item (Override Rule)Combo Box, List Box, Option GroupAn item that is selectable from the control (see caution below)
Selected Option (Override Rule)Option ButtonA string that is selectable from the Group Name to which the option button belongs.
Value (Override Rule)Spin ButtonNumeric value only
Text (Override Rule)Text BoxString or Numeric values

Use of the Override Rule on a List Type Control (Combo Box, List Box, Option Group)

The value being enforced by the Override Rule must be available from the listed items, available for selection, in order for it to be displayed in the control once the Override Rule is enforced.

When using the Override Rule on any of the above list type controls it is important to remember that the control remains active during specification.

This is important because selecting a different value from the control while the OverRide Rule is enforced will mean the user form is reporting, to the user, something different from the actual result (return value) of the control.

The Override Rule always takes precedence over any other value selected from the control.

Recommendations to avoid this scenario

If the above is a situation that could happen in the user interface you are designing we recommend setting the controls Enabled or Visible property to FALSE.

If the control is required to have a preset value applied that can then be changed consider the  Default Value property.

To Change the Default Value

The default value of the property can be changed by any of the following methods:

  • Enter the required value directly into the enabled property field.
    1. Click in the property for the control to be changed.
    2. Type the required value directly into the property field.
  • Activate the rule builder.
    1. Click in the property for the control to be changed.
    2. Click the build button at the end of the property field to launch the rule builder .
    3. Enter the rule in the rule editor and click OK to apply.

Examples

This example overrides the value of a Check Box that has the Name MyCheckBox

Property ValueResultNotes
IF( LengthReturn>100, TRUE, MyCheckBox)When the value being returned from the control Length is greater than 100 MyCheckBox will be checked (TRUE), otherwise the control will allow user interaction as denoted by the result MyCheckBox.The Name (not Return value) of the control the rule is applied to is required when the Override Rule is not to be enforced, i.e. MyCheckBoxNOT MyCheckBox Return.

This example overrides the value of a Combo Box, List Box or Option Group that has the Name GlassType

Property ValueResultNotes
IF( FireRatingReturn<>0, "Fire Rated Glass", GlassType)When the value being returned from the control FireRating does not equal 0 (zero) the control GlassType will result in "Fire Rated Glass", otherwise the control will allow user interaction as denoted by the result GlassType.

The Name (not Return value) of the control the rule is applied to is required when the Override Rule is not to be enforced, i.e. GlassType NOT GlassType Return.

The value "Fire Rated Glass" must be available from the listed items, available for selection, in order for it to be displayed in the control once the Override Rule is enforced.

Also consider disabling the control or turning visibility off when this property is enforced.

This example overrides the value of an Option Button that has the Name FireRatedGlass

Property ValueResultNotes
IF( FireRatingReturn<>0, "FireRatedGlass", FireRatedGlass)

When the value being returned from the control FireRating does not equal 0 (zero) the option button named "FireRatedGlass" will be selected, otherwise the control will allow user interaction as denoted by the result Fire Rated Glass

The Name (not Return value) of the control the rule is applied to is required when the Override Rule is not to be enforced, i.e. GlassTypeNOT GlassType Return.

The value "Fire Rated Glass" must be available from the listed items, available for selection, in order for it to be displayed in the control once the Override Rule is enforced.

Also consider disabling the control or turning visibility off when this property is enforced.

The Override Rule should only be applied to one of the Option Buttons in the group.

This example overrides the value of a Spin Button that has the Name MySpinButton

Property ValueResultNotes
IF( LengthReturn>100, 2, MySpinButton)When the value being returned from the control Length is greater than 100 MySpinButton will be set to 2, otherwise the control will allow user interaction as denoted by the result MySpinButton.The Name (not Return value) of the control the rule is applied to is required when the Override Rule is not to be enforced, i.e. MySpinButtonNOT MySpinButton Return.

This example overrides the value of a Text Box that has the Name MyTextBox

Property ValueResultNotes
IF( LengthReturn>100, 2, MyTextBox)When the value being returned from the control Length is greater than 100 MyTextBox will be set to 2, otherwise the control will allow user interaction as denoted by the result MyTextBox.The Name (not Return value) of the control the rule is applied to is required when the Override Rule is not to be enforced, i.e. MyTextBoxNOT MyTextBox Return.
IF( FireRatingReturn<>0, "Fire Rated Glass", MyTextBox)When the value being returned from the control FireRating does not equal 0 (zero) the control MyTextBox will result in "Fire Rated Glass", otherwise the control will allow user interaction as denoted by the result MyTextBox.The Name (not Return value) of the control the rule is applied to is required when the Override Rule is not to be enforced, i.e. MyTextBoxNOT MyTextBox Return.

Value can be controlled by a rule.