Chapter Contents |
Previous |
Next |
Data Set Model: _findRow |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
CALL SEND (object-id, '_findRow', find-request<, start-row>); |
Argument | Type | Description |
---|---|---|
find-request |
N | specifies the identifier of an SCL list that contains the find request |
start-row |
N | specifies the row to start the search on. The search begins with start-row. If the find is successful, start-row 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 |
If you modify the current row in the table, you must use the _updateRow method before calling the _findRow method.
The find request should contain one or more character list items. Each item should use standard WHERE clause syntax and is handled as an additional request.
If the end of the table is reached without a match, the last row of the table becomes the current row. If the last _findRow or _repeatFindRow reached the end without a match, the search begins at the beginning of the table.
Example |
In the following example, the Data Set Model class is being used as a stand-alone model, that is, the model class is not being used with a data form or data table object.
This example uses the _findRow method and the _repeatFindRow method. The example assumes you have created a FRAME entry with two push buttons named BUTTON1 and BUTTON2.
length charval $ 15;
INIT: datcl=loadclass('sashelp.fsp.datast_m.class'); datid=instance(datcl); |
call send(datid, '_setDataset', 'sasuser.crime'); return; |
BUTTON2: row+1; call send(datid, '_repeatFindRow', row); put row=; return; |
TERM: call send(datid,'_term'); return; |
See Also |
_repeatFindRow.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.