Navigation: ABC Library Reference > ViewManager > ViewManager Methods >====== Reset (reset the view position) ====== | ![]() ![]() |
Reset(// [ number ] //), VIRTUAL
| Reset | Resets the VIEW position. |
| number | An integer constant, variable, EQUATE, or expression that specifies the start position based on the contents of the first //number //components of the applicable ORDER attribute. If omitted, Reset positions the VIEW to the first element in theVIEW's result set. |
The **Reset **method resets the VIEW position to the beginning of the result set specified by the VIEW's applied sort order, range limit and filter. The //number //parameter further refines the position by considering the //contents //of the first //number //expressions in the active sort order.
For example, consider a VIEW sorted by Customer where Customer's value is ten(10). If //number //is omitted, Reset positions to the element with the lowest Customer value, regardless of Customer's value. However, if //number //is one (1), Reset positions to the first element with a Customer value of ten (10).
Implementation:
The Reset method calls the Open method and SET s the managed VIEW. See the Language Reference for more information.
Example:
** View:Customer.Init(Customer:View,Relate:CUSTOMER) !initialize View:Customer object**
** View:Customer.AddSortOrder( CUS:BYNUMBER ) !add sort BYNUMBER**
** View:Customer.AddRange(CUS:CUSTNO,Low,High) !add a range limit**
** View:Customer.SetFilter( 'CUS:ZIP=33064','1') !add filter #1**
** Relate:CUSTOMER.Open !open customer & related files**
** View:Customer.Reset !open view, apply range & filter**
** IF View:Customer.Next() !get first view record**
** HALT !if no records, stop**
** END**
See Also: Open





