Specifies how the FieldMask is treated in a LIST command.
Syntax
SET OUTPUT MASKFIELD ON|OFF
Comments
The OUTPUT MASKFIELD option is set ON by default.
Normally, the FieldMask is used to format data output from the database using the LIST command. To suppress the FieldMask, set OUTPUT MASKFIELD to OFF.
The OUTPUT MASKFIELD setting is unaffected by the SET SAVE and SET RESTORE commands.
See Also
LIST
Output Masks
The elapsed number of seconds since 12:00 am, 1 January 1970.
Syntax
$timesecs
Return Value
A number. Cannot be reset by an application program.
Description
The number of seconds that have elapsed since 12:00 am on 1 January 1970.
This variable is useful for measuring the number of seconds between two events.
See Also
$Date
$Time
A binary true value for comparison.
Syntax
$true
Return Value
Binary true (“1”). Cannot be reset by an application program.
Description
A “true” value for comparisons in logic expressions.
Example
if Event.ScrollingKey = $True
... commands ...
endif
See Also
$False
$Null
The current date.
Syntax
$date
Return Value
A number in date format (YYYYMMDD). Cannot be reset by an application program.
Description
The current date, as set in the operating system.
Example
From the zim prompt:
out $date
This extracts the DATE from the TIMESTAMP and then prints the proper $DayName.
OUT $DayName($GetUTCDate($TimeSecs))
See Also
$adddays
$addmonths
$addweeks
$addyears
$day
$dayname
$month
$monthname
$Time
$TimeSecs
$weekday
$year
About Data Types
System Variables
$transmitkey Object
Syntax: $transmitkey
Return Value: Character string
Description:
The $transmitkey object captures the name of the last EXIT or TRANSMIT key pressed during form input operations. This object is essential for managing form navigation and submission, especially when custom key bindings are involved.
Key Concepts:
- EXIT and TRANSMIT Keys:
- These keys are defined using the
FORM SET or WINDOW SET ACCELERATOR commands. - EXIT Key: Typically used to exit or cancel the form input process.
- TRANSMIT Key: Used to submit the form data.
- Form Input Termination:
- Normally, a TRANSMIT key cannot terminate
FORM INPUT if any “required” fields are empty. - Exception: If the TRANSMIT key is pressed while the cursor is in a modified transmit field or an “always transmit” field, the field will transmit, causing
FORM INPUT to terminate. - If required fields are still empty after this action,
$transmitkey will be set to an empty string ("").
- Resetting
$transmitkey:- The
$transmitkey object can be reset at any time to clear its value. This is useful for ensuring that the object accurately reflects the most recent key press.
Practical Usage:
Defining Keys:
To define EXIT and TRANSMIT keys, you use the FORM SET or WINDOW SET ACCELERATOR commands. For example:
FORM SET ACCELERATOR EXIT F2
FORM SET ACCELERATOR TRANSMIT F1
In this example, the F2 key is set as the EXIT key, and the F1 key is set as the TRANSMIT key.
Handling Key Presses:
You can check the value of $transmitkey to determine which key was pressed and take appropriate actions. For example:
IF $transmitkey = "F1" THEN
// Handle the F1 key press (TRANSMIT)
CALL ProcessFormSubmission()
ELSE IF $transmitkey = "F2" THEN
// Handle the F2 key press (EXIT)
CALL CancelFormInput()
ENDIF
In this example, different actions are taken based on whether the F1 or F2 key was pressed.
Special Considerations:
- Modified Transmit Fields: These are fields that can trigger form submission even if other required fields are empty. This is useful for scenarios where partial data submission is allowed.
- Always Transmit Fields: These fields always trigger form submission when the TRANSMIT key is pressed, regardless of the state of other fields.
Example Scenario:
Imagine a form with several required fields. If the user presses the TRANSMIT key (F1) while in a modified transmit field, the form will attempt to submit. If any required fields are still empty, $transmitkey will be set to an empty string, indicating that the submission was not successful.
FORM SET ACCELERATOR TRANSMIT F1
FORM SET ACCELERATOR EXIT F2
// User presses F1 while in a modified transmit field
IF $transmitkey = "F1" THEN
IF AllRequiredFieldsFilled() THEN
CALL SubmitForm()
ELSE
$transmitkey = "" // Reset because required fields are empty
ENDIF
ENDIF
This ensures that the form submission logic is robust and handles incomplete data appropriately.
Traces the execution of explicit transaction commands.
Syntax
SET TRANSACTION FLOW ON|OFF
Comments
The execution of explicit transactions (implemented using TRANSACTION, ENDTRANSACTION, and QUITTRANSACTION commands) is traced through the display of special messages, even in single-user systems.
Implicit transactions are not traced.
See Also
$InTransaction
ENDTRANSACTION
QUITTRANSACTION
SET TRACEOUTPUT
TRANSACTION
These system variables have been removed from the Zim syntax and are replaced by WINDOW STATUS.
Controls the use of a pointing device in Zim for Windows.
Syntax
SET MOUSE ON|OFF
Comments
The MOUSE option is set ON by default.
When MOUSE is ON, the use of a pointing device is enabled for the client area of Zim windows. The application can then respond to mouse-button accelerators that occur while the focus is in a window.
The SET MOUSE command has no effect on standard windows. In such windows, it is assumed that a pointing device is active at all times, when available.
See Also
Event
FORM INPUT
MENU INPUT
Indicates if the application user has pressed the “break” key.
Syntax
$breakflag
Return Value
Binary. Can be reset by an application program.
Description
At the start of an application session, $BreakFlag is set to “0” ($False). Set to “1” ($True) if the application user presses the “break” key. The application program must reset the variable to “0” ($False) to be able to detect subsequent user interrupts.
See Also
About Conditional Expressions
SET BREAKABLE
System Variables
Controls the use of the escape character in quoted character strings.
Syntax
SET ESCAPECHAR ON|OFF
Comments
The ESCAPECHAR option is ON by default.
When ESCAPECHAR is ON, the backslash is treated as the escape character inside quoted character strings. Setting ESCAPECHAR to OFF causes the backslash to be treated as data. The OFF setting is particularly useful in operating environments where the backslash character is used as the path separator character.
See Also
\ (Escape)