L_NEXT

Set selected item by number

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall L_NEXT(list_id, itemno)

Return value

status

Always returns true. (i)

Arguments

list_id

The ID of the list. (n)

itemno

The row number of the list item you want selected. (n)

Discussion

L_NEXT enables you to specify which list item will be selected when a list is next processed. It queues a request to set the selected item for a list to the nth item where n is the value passed as itemno. As with L_QUEUE, the selection is queued so that actions queued before the call to L_NEXT occur before the selection, and actions queued after the call to L_NEXT occur after the selection. Note the following:

Examples

In the following example, the D_LCURITM subfunction of L_STATUS is used to save the current item number. The example then navigates to the end of the list to ensure that all items have been loaded, enabling D_LLASTITM to get the total number of items. Finally, L_NEXT returns the list to the previously selected item.

xcall l_status(listid, D_LCURITM, itmno)         ;Fetch current item.
xcall l_process(listid, request=D_LBOTTOM, data) ;Go to the end to load all items.
xcall l_status(listid, D_LLASTITM, numitems)     ;Get number of items.
xcall l_next(listid, itmno)                      ;Specify where to go.
xcall l_process(listid, request=D_LNOP, data)    ;This actually does it.