| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ViewManager > ViewManager Methods >====== Reset (reset the view position) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[primerecord prepare a record for adding viewmanager .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[restorebuffers restore view file buffers .htm|{{btn_next_n.gif|Next page}}]] | | || **Reset(**// //[// number //]// //**), VIRTUAL** {{blk2blue.jpg|blk2blue.jpg}} | **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 initiate sequential file processing .htm|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 open the file .htm|Open]]