This topic applies to the following properties:
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:
The chart below lists the controls this property is available for:
Override Rule Property Name | Available for Control Types | Valid Values when Enforcing an Override |
---|---|---|
Checked (Override Rule) | Check Box | A Boolean value (True, False) |
Selected Item (Override Rule) | Combo Box, List Box, Option Group | An item that is selectable from the control (see caution below) |
Selected Option (Override Rule) | Option Button | A string that is selectable from the Group Name to which the option button belongs. |
Value (Override Rule) | Spin Button | Numeric value only |
Text (Override Rule) | Text Box | String 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.
The default value of the property can be changed by any of the following methods:
This example overrides the value of a Check Box that has the Name MyCheckBox
Property Value | Result | Notes |
---|---|---|
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 Value | Result | Notes |
---|---|---|
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 Value | Result | Notes |
---|---|---|
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 Value | Result | Notes |
---|---|---|
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 Value | Result | Notes |
---|---|---|
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.