Description

The Save_Select subroutine saves an active select list of keys from cursor 0.

Syntax

Save_Select (target, targetName, reserved, comment)

Parameters

The Save_Select subroutine has the following parameters:

TParameterTDescription
targetReserved. Pass null.
targetNameThe name to save the select as.

The targetName may be in the following formats: 1. <targetName> 2. <tableName><space><targetName> The algorithm executes in the following manner: If targetName contains a space then the assumption is that the first word is <tablename> and a check is performed to determine if the <tablename> is valid. If the <tablename> is valid then any wording after the initial space is the targetName .If the tablename is not valid then the whole string is used as the targetName and the list of keys is saved to SYSLISTS.

reservedReserved for internal use.
commentA reference string can be stored with the saved list; null is permitted. The comment must not contain system delimiters.

Note

The list of keys is stored in the SYSLISTS table, with targetName as the record ID. An Activate_Save_Select should be used to process the list once the Save_Select is executed.

See also

Activate_Save_SelectDelete_Save_SelectReduceRListSelect...By

Example

Function Save_Select_Example(param1)
 
Declare Subroutine Save_Select, Activate_Save_Select, Msg
$Insert Logical
 
ClearSelect 0
done = False$
ctr  = 0
 
Select "SYSREPOS" by "@ID" using 0 Then
   Save_Select("","SYSREPOS_LIST","","")
   Activate_Save_Select("SYSREPOS_LIST")
   Loop
      Readnext id Else done = True$
   Until done
      ctr += 1
   repeat
   Msg(@window,"Number of Records Selected = ": ctr)
end
 
return ctr
  • No labels