Develop > Tailoring > Form creation > Format Control > Using expressions in Format Control > Format Control Boolean (logical) fields

Format Control Boolean (logical) fields

In the forms for Additional File Queries, Calculations, Validations, and Subroutines, you will find some or all of the following fields:

Conditional Field Format Control processing area Description
add Additional File Queries, Calculations, Validations, JavaScript Conditional expressions used in this field are evaluated before a record is added.
update Additional File Queries, Calculations, Validations, JavaScript Conditional expressions used in this field are evaluated before a record is updated.
delete Additional File Queries, Calculations, Validations, JavaScript Conditional expressions used in this field are evaluated before a record is deleted.
display Additional File Queries, Calculations, Validations, JavaScript Conditional expressions used in this field are evaluated when a screen/format is displayed or when the Format Control record is used with reports.
initial Additional File Queries, Calculations, Validations, JavaScript Conditional expressions used in this field are evaluated once, before a record is displayed the first time.
before Subroutines This field determines when the Conditional expressions in the add, update, and delete fields are evaluated. If the condition is true, the expression will be evaluated before the record is added, updated, or deleted. If the condition is false, the evaluated after the record is added, updated, or deleted. You cannot use a variable in this field.

These fields must evaluate to true or false only. A value of true (or an expression that evaluates to true) in any of these fields causes the Format Control functions to execute. These functions execute before the edit is performed. If the fields are blank, the calculation or validation are not performed for this table. For example, a value of true in the add field causes Format Control functions to be performed before a record is added. If the other fields (update, delete, display) are blank, the functions are not performed when the record is updated, deleted, or displayed.

Normally, these fields contain true, false, blank, or they can contain a variable that is calculated in the Calculations process before being used in another process. When using either of these methods, use either the short or long version of Format Control to enter an expression that is evaluated to true or false at execution time.

This is an example of an expression that is frequently used:

index ("SysAdmin", $lo.ucapex)>0

This expression searches the user’s capability array in the Operator Record to see if it has SysAdmin capabilities. The function executes if this evaluates to true, indicating that the operator has SysAdmin listed as a capability and therefore is authorized for the function.

Related topics

Format Control
Using expressions in Format Control
Format Control system functions
Format Control file variable

Open a Format Control record
Add a Format Control record
Turn on menu forms by using Format Control

Service Manager Programming