![]() Chapter Contents |
![]() Previous |
![]() Next |
| Data Form and Data Table: _findRow |
| Delegated to: | Data Set Data Model class |
| Syntax | |
| Details | |
| Example | |
| See Also |
Syntax |
| CALL SEND (object-id,'_findRow', find-request<,startrow>); |
| Argument | Type |
Description |
|---|---|---|
| find-request |
N | specifies the identifier of an SCL list that contains the find request |
| startrow |
N | specifies the row on which to start the search. The search begins with startrow. If the find is successful, startrow returns the row number of the match, otherwise it returns -1. By default, if no start-row is defined, the search begins with the current row plus 1. If there is no current row, the search begins with row 1. |
| Details |
The find request should contain one or more character list items. Each item can use standard WHERE clause syntax and is handled as an additional request. The _findRow method does not take advantage of an index that may exist on the SAS table.
When using a data form, the found row becomes the current row (i.e., the displayed row). When using a data table, the found row becomes the top row.
If a match is not found, the last row of the table is displayed along with the message:
Note: End of file reached without a match.
Note: The _findRow method cannot be called from the model SCL. ![[cautionend]](../common/images/cautend.gif)
| Example |
The following example uses the _findRow method and the _repeatFindRow method. This example assumes you have created a frame with a data table named TABLE and two push buttons named BUTTON1 and BUTTON2.
| | length charval $ 15; INIT: call send(_frame_,'_getWidget','table',tabid); call send(tabid,'_setDataset','sasuser.crime'); return; |
| | BUTTON2: row+1; call send(tabid,'_repeatFindRow',row); put row=; return; |
| See Also |
_repeatFindRow
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.