Switch to: V9V8V7V6V5

VTable Class: Selection Methods

VTable.SelectAllRecords()

Declaration:

SelectAllRecords as VSet

Description:

Returns a selection of all records of the table as a VSet.

Example:

allRecs = Table.SelectAllRecords()

VTable.SelectNoneRecords()

SelectNoneRecords() as VSet

Description:

Returns a VSet, which contains no records of a table. The size of the VSet is equal to the number of physical records in the table.

Example:

NoneRecs = Table.SelectNoneRecords()

VTable.Sort()

Declaration:

Sort(	
	inSet as VSet, 
	inField as VField, 
	inAscending as boolean = true ) as VSet

Parameters:

  • inSet - The set of records to be sorted.
  • inField - The field on which to do sorting.
  • inAscending - The direction of sorting.

Description:

Executes sorting of the selection inSet by the field inField. The parameter inAscending specifies the order of sorting.

Returns a new sorted selection as an ArraySet.

Example:

SortedSet = table.Sort( allRecs, fldName )

VTable.Sort()

Declaration:

Sort(	
	inSet as VSet, 
	s1 as VSortItem, ... ) as VSet

Parameters:

  • inSet - The set to be sorted.
  • s1 - Description of the SortItem.

Description:

Executes sorting of a table selection inSet on several fields. This method uses special small class VSortItem, which packages together field to be sorted and sort order.

Example:

SortedSet = table.Sort( 
               allRecs, new VSortItem(fldName), new VSortItem(fldLastName) )