Properties of screen fields: Field conditions tab
After you have opened a screen in the Screen editor, right-clicked a screen field on it and chose Properties in the pop-up menu, the Screen object properties window opens. On the Field conditions tab in that window, you can set conditions under which any or all occurrences of the current screen field must be hidden from view or must be set to non-editable (read-only).
Click here for information on how to edit screen object properties in general.
On the current tab you'll find the following settings:
The Copy button
If the Copy button is active, it means there's a hidden field condition in the pre-6.6.0 format present. Click the Copy button to convert it to the 6.6.0 (and higher) format and make it visible. A hidden condition still works but it's better to make it visible by converting it. If the Copy button is greyed out, it just means there never was any condition for this field.
Suppress & Read-only conditions
In Collections, any or all occurrences of screen fields may be conditionally hidden or set to read-only. This means that a screen field occurrence may be visible or not, or may be editable or not, dependent on the value(s) in certain other fields. In Collections, the checking of values works on occurrence level (while in Adlib it worked across all occurrences at once). This functionality is meant to be able to create less cluttered screens by only showing fields if an associated key field is filled in by the user. When a field is not visible during editing of a record as a consequence of a condition which you set here, then no strange empty spot will be present in the relevant screen, because all fields and labels underneath it will have moved one line up. And as soon as the field does become visible, the other fields will move back down again.
Suppressing fields this way is not a safe way to protect confidential information, because there would still be other ways to extract the information you want to protect. Confidential information is better protected with the proper access rights.
With the upper box you specify the conditions under which the current screen field must become/remain invisible, while in the lower box you determine when the current screen field should be read-only. Enter a single expression or a plural, Boolean expression as the condition in either or both boxes. Every time you open a record for display or editing, and every time you leave a field in edit mode, all relevant expressions will be evaluated. All occurrences of the fields in the expresion will be checked. When this screen is associated with the current data source and if the field condition is true, the screen field will be hidden or set to read-only in the detailed display of a record, while if the result if false, the screen field will be shown and/or be editable. See the general topic Conditional screens and fields for a full description of this functionality and its possibilities.
The basic form of a single expression is:
<field or constant> <operator> <value>
Example of a suppress condition:
S6 = English && S7 = GBP
Result: the current screen field occurrence will be hidden if the tag S6 contains the value English and the tag S7 contains the value GBP.
Adding comments to field conditions
From 7.4, only the first line in the Field conditions properties box is considered the conditional expression. After the first new line (press Enter behind the condition), all text is ignored by Collections, so you could add comments here to explain the conditional expression.