List defined from SQL class

The following properties and methods apply to list variables that are defined from a schema, query, or table class.

Properties

Warning: SQL properties are not available in client methods.

Object specific
$allrowsfetched Set to kTrue when all rows in the current result set have been fetched
$colcount Returns the number of columns in the list
$colsinset Returns the number of columns in the select table
$extraquerytext The text to append to queries generated by $delete, $update and $select
$fromclause If not empty, the table instance uses its value instead of the table list,in the FROM clause generated by $select
$isfixed If true, the list has fixed length columns
$line The current line in the list. This changes when the user clicks on a list line, or when using a method such as $search().
$linecount The number of lines in the list. You can change this property or use Set final line number to truncate the list.
$linemax The maximum number of lines in the list. This is set to 10,000,000 by default but you can change it to restrict the list size.
$rowsaffected The number of rows affected by the last insert/delete/update operation
$rowsfetched The number of rows fetched so far from the result set
$servertablenames The names of the tables or views on the server, to which the table instance corresponds
$smartlist If true, the list is a smart list
Setting $smartlist to kTrue creates and initializes the history list. If it is already kTrue, then setting it again has no effect.
Setting $smartlist to kFalse discards the history list completely. The current normal list remains unchanged, so the current contents of the normal list are preserved, but all history and filtering information is lost.
If you define or redefine a list using any mechanism, or add columns to a list, its $smartlist property is set to kFalse automatically.
$sqlclassname The name of the query or schema which the table uses
$statementobject The statement object in use by the schema or table instance
$statementobjref The statement object reference in use by the schema or table instance
$useprimarykeys If true, the table instance only uses schema columns marked as primary keys in where clauses
Standard $desc $ident $name $sessionobject $sessionobjref $sublen $subtype $type

Methods

Warning: SQL methods, $filter, $refilter, $unfilter, $search, $sort and $totc are not available in client methods.

Object specific
$add $add(columnValue,columnValue,...) inserts a new list line and returns an item reference to it
$addcols $addcols(cName,type,subtype,maxlen,...) adds 1 or more columns to a list or row. Specify each column with 4 parameters: cName, data type constant e.g. kCharacter (not kObject), subtype and maxlen
$clear $clear() clears the data for a list or row, or a column in a list or row; executing list.$clear() for a smart list sets $smartlist to kFalse, meaning that it is no longer a smart list
$copydefinition $copydefinition(listOrRow[,param...]) copies the definition of listOrRow to the calling list or row variable. If listOrRow contains a table instance the method passes param... to $construct of the new instance
$createnames $createnames() returns text suitable for using with a CREATE TABLE statement
$define $define([var1,var2,...]) defines a list or row; the columns have the names and types of the parameters. Each parameter can also be a file class name (a string) from which all columns are used; append /S to the file class name to skip empty columns
$definefromsqlclass $definefromsqlclass(sqlclass[,wRow,param,...]) clears and defines the list or row using the class, and creates a table instance passing param... to table $construct. wRow is a row of schema column names to use (no names means use all)
You can pass query/schema/table class as either an item reference to the class, or as the name of the class, in the form [library.]class, where the library defaults to the current library if omitted.
If you pass a schema class, or a table class that references a schema class, then the list is defined to have all columns in the schema, unless you pass an explicit list of columns to use from the schema (via the cCol1,... parameters). Note that there is an empty parameter to separate the explicit column list from the cons-params that are passed to $construct for the table instance. Note also that this empty parameter is still required when using a query class or table class that references a query class.
$dodelete $dodelete(wRow) deletes a row from the server database; called by $dodeletes()
$dodeletes $dodeletes([bDisableWhere=kFalse]) deletes smart list rows with status kRowDeleted from a server database
$doinsert $doinsert(wRow) inserts a row into the server database; called by $doinserts()
$doinserts $doinserts() inserts smart list rows with status kRowInserted into a server database
$doupdate $doupdate(wRow,wOldrow) updates a row in the server database; called by $doupdates()
$doupdates $doupdates([bDisableWhere=kFalse]) updates smart list rows with status kRowUpdated in a server database
$dowork $dowork([bDisableWhere=kFalse]) executes $dodeletes(),$doupdates(),$doinserts() in that order
$fetch $fetch(iFetchcap[,bAppend=kFalse]) fetches the next iFetchcap rows from the server; for lists, appends data to the list if bAppend is kTrue
$filter $filter(searchCalculation) applies a filter to a smart list and returns the number of rows rejected from the list by the filter
See $unfilter below for more details on filtering
$first $first([bSelectedOnly=kFalse, bBackwards=kFalse]) sets $line to first line defined by the parameters; returns an item reference to it. If bSelectedOnly is kTrue, only selected lines are processed; if bBackwards is kTrue, lines are processed in reverse
$includelines $includelines(kRowXxxx) specifies which lines are present in the normal list of a smart list
$insertnames $insertnames([cRowName]) returns text suitable for using with an INSERT statement
$merge $merge(lList,bByName,bSelectedOnly[,bClearDestList=kFalse]) merge two lists
$next $next(rRow|iRowNumber [,bSelectedOnly=kFalse, bBackwards=kFalse]) sets $line to the next line after the line identified by the first argument. If iRowNumber is zero, processing starts at $line. See $first for definitions of the other parameters
$redefine $redefine([var1,var2,...]) redefines a list or row variable with the names of the parameters. Each parameter can also be a file class name(a string) from which all columns are used; append /S to the file class name to skip empty columns
$refilter $refilter() reapplies all the current filters to a smart list
$remove $remove(rLine | iLineNumber | kListDeleteSelected | kListKeepSelected) deletes the specified lines from the list
$revertlistdeletes $revertlistdeletes() causes deletes made to the smart list to be reversed
$revertlistinserts $revertlistinserts() causes inserts made to the smart list to be removed
$revertlistupdates $revertlistupdates() causes updates made to the smart list to be reversed
$revertlistwork $revertlistwork() causes all deletes, inserts and updates made to the smart list to be reversed
$savelistdeletes $savelistdeletes() causes deletes made to the smart list to be made permanent
$savelistinserts $savelistinserts() causes inserts made to the smart list to be made permanent
$savelistupdates $savelistupdates() causes updates made to the smart list to be made permanent
$savelistwork $savelistwork() causes all deletes, inserts and updates made to the smart list to be made permanent
$search $search(calculation [,bFromStart=kTrue, bOnlySelected=kFalse, bSelectMatches=kTrue, bDeselectNonMatches=kTrue]) searches the list
$search searches a list using the specified calculation; this method has the same function as the Search list command. The search calculation can use $ref.colname or list_name.colname to refer to a list column. With bSelectMatches or bDeselectNonMatches the first line number whose selection state is changed is returned (or 0 if no selection states are changed), otherwise the first line number which matches the selection is returned (or 0 if no line is found). This method does not change any CRB values, the current line is changed if neither bSelectMatches or bDeselectNonMatches is used.
bOnlySelected restricts the search to selected lines. If bFromStart is kTrue, Omnis searches all of the lines in the list, starting at line 1; otherwise, Omnis starts the search at line ($line + 1).
$select $select([cText,...]) issues a SELECT statement to the server. If passed, select concatenates 'cText' and any following arguments to the select statement
$selectdistinct $selectdistinct([cText,...]) issues a SELECT DISTINCT statement to the server. If passed, select concatenates 'cText' and any following arguments to the select statement
$selectnames $selectnames() returns text suitable for using with a SELECT statement
$sort $sort(calculation,bDescending=kFalse,...) sorts the list
You can specify up to 9 sort fields, including the sort order flag. The sort fields or calculations can use $ref.colname or list_name.colname to refer to a list column. The sort order flag defaults to kFalse (that is, the sort is normally ascending). For calculated sorts, the calculation is evaluated for line 1 of the list to determine the comparison type (Character, Number or Date).
$sqlerror $sqlerror(iErrortype, iErrorcode, cErrortext) called when an error occurs during $select(),$fetch(),$update(),$delete() and $insert()
$totc $totc(expression[,bSelectedOnly=kFalse]) returns the total of the expression evaluated for either all lines in the list,or if bSelectedOnly is kTrue, all selected lines in the list
$undodeletes $undodeletes() restores any deleted rows to a smart list defined from a table
$undoinserts $undoinserts() removes any inserted rows from a smart list defined from a table
$undoupdates $undoupdates() restores any updated rows in a smart list defined from a table, to their original values
$undowork $undowork() executes $undoinserts(), $undoupdates(), $undodeletes() in that order
$unfilter $unfilter([iLevel]) removes a filter or filters from a smart list
Filtering uses the row present indicator of the history list to filter out rows. In other words, after applying a filter, Omnis has updated $rowpresent to kTrue for each row matching the search criterion and kFalse for the others. Filtering applies only to the rows in the normal list, that is, rows where $rowpresent is kTrue, with the result that repeated filtering can be used to further restrict the lines in the list.
Each history row contains a filter level, initially zero. When you apply the first filter, Omnis sets the filter level of all rows excluded by the filter to one; that is, for each row in the normal list, for which $rowpresent becomes kFalse, $filterlevel becomes one. Similarly, for the nth filter applied, Omnis sets $filterlevel for the newly excluded rows to n. You can apply up to 15 filter levels.
Whenever a row is made present, for whatever reason, the filter level is set back to zero, and whenever the row is made not present, for any reason other than applying a filter, the filter level is also set back to zero.
When called with no parameters, $unfilter() removes the latest filter applied. Otherwise, $unfilter removes filters back to the level indicated by the parameter. Thus $unfilter(0) removes all filters, $unfilter(1) removes all but the first, and so on.
$updatenames $updatenames([cOldrowName][,cRowName]) returns text suitable for using with an UPDATE statement
$wherenames $wherenames([cOperator][,cRowName]) returns text suitable for using as a WHERE clause
Standard $addafter $addbefore $appendlist $insertlist $makelist $sendall

Children

$cols $filters $history $ivars