OP Use named selection

4D - Documentation   Français   English   German   4D Open for 4D, Command Theme List   4D Open for 4D, Command Alphabetical List   Back   Previous   Next

version 1.5


OP Use named selection (connectionID; tableID; selectionName) Longint

ParameterTypeDescription
connectionIDLongintConnection ID with target server
tableIDLongintNumber of the table in the database
selectionNameStringName of the selection
Function resultLongintError code result for the function

Description

OP Use named selection makes selectionName the current selection. The table number is returned in tableID.

When you create a named selection, the current record is "remembered" by the named selection. OP Use named selection retrieves the position of the current record and makes it the new current record of the new current selection.

Like the current selection, a named selection does not contain actual records—rather, it contains a list of references to the records. For this reason, if you delete or modify any of the records after you have created the named selection, the following may occur when you reuse the named selection:

Deleted records will appear as blank records in the new current selection,

Records added to the same table that have reused the space freed by deleted records may appear in the new current selection,

Modified records will appear modified in the new current selection.

If the named selection was originally copied, you can call OP Clear named selection to clear the named selection when you are done with it. If the named selection was originally cut, OP Use named selection automatically clears it.

Error Codes

If OP Use named selection executes successfully, it returns 0. Otherwise, this function returns one of the following errors:

Error CodeDescription
-9977The named selection does not exist.
10128The 4D Open for 4th Dimension package has not been initialized.
10136The connection does not exist.
10154This command cannot be executed right now.

Example

See the examples for OP Copy named selection and OP Cut named selection.

See Also

OP Clear named selection, OP Copy named selection, OP Cut named selection.


4D - Documentation   Français   English   German   4D Open for 4D, Command Theme List   4D Open for 4D, Command Alphabetical List   Back   Previous   Next