Set current list

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

Syntax

Set current list list-or-row-name

Deprecated Command

This command has been deprecated and is no longer visible in the Code Assistant in the Code Editor (it will not appear when you type the first few characters), although it is still present in Omnis Studio and will continue to function if used in legacy code. You can show this command by disabling the appropriate Command Filter in the Modify menu in the Code Editor.

Note that you can create an instance variable of List data type, and such lists do not need to be made “current” since they are instantiated automatically and made current in the context of the current method or instance.

Description

This command sets the current list, that is, the list to be processed in the subsequent list commands. You can make any type of list the current list, including local, class, and library variables of list data type. If you use this command as part of a reversible block, the current list reverts to its former value when the method containing the reversible block finishes.

See also Define list.

Example

Set current list iMyList
Define list {fCustomers}
Set main file {fCustomers}
Build list from file on fCustomers.CustomerID