Load connected records

Command group Flag affected Reversible Execute on client Platform(s)
Finding data YES YES NO All

Syntax

Load connected records {file-name}

Description

This command loads the connected records for the specified file. The Load connected records command ensures that the identity of the current connected records for the current record is correct. As Omnis automatically loads connected records of the main file into the current record buffer, this command is not usually required. However, in multi-user systems, this command ensures that, if any other workstation makes changes to the way in which records are connected, these changes will be reflected at the current workstation.

The flag is cleared if there is no current record for the specified file class, and in the event that no file class is specified, Omnis uses the main file. This command does not clear the Prepare for update mode but does cause multi-user semaphores to be set and should be avoided when in Prepare for... mode.

If a parent record requires locking, another user is editing it, and the Wait for semaphores command is on, the lock cursor will be displayed. If the user cancels the lock, the flag is cleared and the parent record is not loaded. The Do not wait for semaphores command prevents the user from having to wait for the record and returns a flag false if the parent record is not available.

If placed in a reversible block, the parent record reverts to its former value when the method terminates. If you need to read in grandparent records, you can add this command to the usual Next command:

Example

# Use load connected records to load the grandparent record,

# as only the parent record of the main file is loaded after a find
Set main file {fChild}
Find first
Load connected records {fParent}

Do $cinst.$redraw()