Is Control

Determines whether the field is a control field in a form component, meaning that it can be selected with the mouse but not get focus. This affects validation behavior.

Value Description
"" Property value is inherited.
T (Control Field) The field is a control field.

It cannot get focus through mouse clicks, and this prevents data from being validated as a result of a focus change. Focus is retained by the component, occurrence, or field that already has it.

Note:  However, a control field can get focus via keyboard navigation (Tab key) and $prompt, in which case validation is performed.

F (Not a Control Field) If the user clicks the field's widget, the focus is changed, and various validation checks are performed.

Description

This property is only applicable if the following conditions are met:

  • The field is in a Form component.
  • The field's Is External property is False and Is Static property is True.

The most common scenario for defining a control field is for a Cancel or Quit button that enables the user to abandon a change, or leave a component that contains invalid data.

Tip: Then the user clicks a control field, it gets visual focus (which varies depending on the operating system), even though it doesn't have insert focus. To ensure that visual focus is returned to the field that has insert focus, consider adding the following ProcScript at the end of code for the detail trigger:

trigger detail
...
$fieldname = $prompt
end; detail

Data Validation on Focus Change

Any field in a form can get focus when the user selects it with the mouse, uses the Tab key or functions such as ^Next_Field or ^Prev_Field to navigate to it, or when focus is set in ProcScript using the $prompt function.

When focus is changed, Uniface first validates the field, occurrence, or component that currently has focus:

  1. It performs declarative checks (If the field is mandatory, does it contain data? Is the field syntax correct?).
  2. It then fires a sequence of triggers such as validate, loseFocus, and so on, which validate data in the previous field or occurrence.
  3. Finally, it fires the getFocus trigger of the field that now gets focus.

In a control field, none of this occurs when the user clicks the widget (normally a Command Button). However, it does happen if the focus is changed to the control field in any other way.

For more information, see Validation Process Flows .

Applies To

Related Topics