Version: Available or changed with runtime version 1.0.
Sets the current sort order, key, and filters on a table.
The string format is the same as the SourceTableView property on pages.
The value of the String parameter can be returned by the GetView Method (RecordRef).
If the SetView method is executed with an empty string, all the filters are removed and the primary key is used.
If no table is selected, the SetView method fails.
This method works the same as the SetView Method (Record).
The following example opens the Customer (18) table as a RecordRef variable that is named CustomerRecRef. The SetView method sets the sort key to the Name field, sort order to Ascending and sets a filter that selects records between 1000 and 2000. The GetView Method (RecordRef) retrieves the sort order, key and filters that have been set and stores the value in the ViewString variable. The value in the ViewString variable is displayed in a message box.
var CustomerRecRef: RecordRef; ViewString: Text; Text000: Label 'The following is the current sort order, key, and filters that are set: %1'; begin CustomerRecRef.Open(18); CustomerRecRef.SetView('Sorting(Name) Order(Ascending) Where(No.=Const(10000..20000))'); ViewString := CustomerRecRef.GetView; Message(Text000, ViewString); end;