Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Using GETLIST_SUB (Functions/Subroutines/Programs) ====== ====== ====== ==== Created at 14 NOV 1996 02:43PM ==== **GETLIST_SUB** **GETLIST_SUB( sourceTableName, sourceRecName, options )** ** Using GETLIST_SUB** Retrieves a list of keys saved earlier with the **TCL SAVELIST **command or with the system subroutine **SAVELIST_SUB**, and makes it into the currently active list (in cursor zero). If **@BROWSE.MODE **is true, the list is put directly into **@BROWSE.LIST **(up to 32K). ** sourceTableName** The name of the table in which to save the list. The default is **LISTS**. The table must be attached. ** sourceRecName** The name of the list to get. ** options** |**Option**|**Meaning** | |**O** |(Overwrite) If a select list is already active, overwrite (clear) it.\\ \\ ** **| **Values returned** The return status of **GETLIST_SUB** is indicated by the system variable //@file.error//. Multiple errors are delimited with record marks (**@RM**). The error number appears in field 1 of each //@file.error// "record", and additional information about the error appears in field 2. Possible errors are: |**Error**|**Meaning** |**Add'l**** Info.** | |S144 |Select list has been activated. |<2> reccount | |S140 |This process is not allowed on a Runtime version| | |S143 |A select list is already active (no O option). | | |401 |Invalid table name in //sourceTableName//. |<2> table | |B558 |No such list. |<2,1> key\\ \\ <2,2> table| Under some circumstances, **GETLIST_SUB **sets these values for //status(// //)//: |**status( )**|**Meaning** | |-2 |Select list has been activated.| |1 |An error occurred.\\ \\ ** ** | **Correct use of GETLIST_SUB** tablename = "" ; * table name defaults to LISTS listname = "SORTED_CUSTOMERS" call getlist_sub( tablename, listname ) if @list.active then reccount = @file.error<2> call msg( "%1% rows were selected!", "", "", reccount ) perform "LIST SAMPLE_CUSTOMERS" end else if @file.error<1> = "B558" then text = "Please run the Customer sort option" text<-1> = "before choosing this report!" call msg( text ) end else call fsmsg() end ; * if @file.error end ; * if @list.active call deletelist_sub( tablename, listname ) stop kb/kb_articles/kb0063.txt Last modified: 2024/01/30 13:36by 127.0.0.1