4D v14.3Named Selections |
||
|
4D v14.3
Named Selections
Named Selections
Named selections provide an easy way to manipulate several selections simultaneously. A named selection is an ordered list of records for a table in a process. This ordered list can be given a name and kept in memory. Named selections offer a simple means to preserve in memory the order of the selection and the current record of the selection. The following commands enable you to work with named selections:
Named selections are created with the COPY NAMED SELECTION, CUT NAMED SELECTION and CREATE SELECTION FROM ARRAY commands. Named selections are generally used to work on one or more selections and to save and later restore an ordered selection. There can be many named selections for each table in a process. To reuse a named selection as the current selection, call USE NAMED SELECTION. When you are done with a named selection, use CLEAR NAMED SELECTION. Note: Combining the statement SET QUERY DESTINATION(Into named selection;namedselection) with a search command (for example QUERY) can also be used to create a named selection. Refer to the description of the SET QUERY DESTINATION command. Named selections can be local, process or interprocess in scope. A named selection is local when its name is preceded by a dollar sign. When its name is not preceded by any symbol, it is a process named selection and it is an interprocess named selection if its name is preceded by the symbols (<>) — a “less than” sign followed by a “greater than” sign. Note: This syntax can be used on both Windows and Macintosh. In addition, on Macintosh only, you can use the diamond (Option-Shift-V on US keyboard). The scope of an interprocess named selection is identical to the scope of an interprocess variable. An interprocess named selection can be accessed from any process. A process named selection is available only within the process in which it was created and on the server. A local named selection is defined for the process that created it and is not visible on the server. Warning: Creating a named selection requires access to the selection of the table. Since selections are kept on the server and a local process does not have access to server data, do not use named selections within local processes. The following table indicates the principles concerning the visibility of named selections depending on their scope and where they were created: The differences between sets and named selections are:
The similarities between named selections and sets are:
|
PROPERTIES
Product: 4D SEE ALSO
Identifiers ARTICLE USAGE
4D Language Reference ( 4D v12.4) |