Select Record
There are two possible ways to select a record: by condition or by index. The
following procedures use SIDemo.model as
an example.
To select a specific record by condition in a recordset:
- Open SIDemoMaster.model in the Host
Emulator and open SIDemo.model in the Design Tool.
- On the Connection menu, click Connect to localhost via Telnet.
- In the Entity box, select CustomerPurchases and click the
Recordset tab.
- Click the Test button to
open the Test Recordset dialog box.
- From the Action box, select Select Record.
- Click the Edit button to open the Filter
String Edit dialog box.
- In the Filter String Edit dialog box, select Customer from the Recordset
fields box, click the = button, and type the following in the Filter
string box: "Q. ARMSTRONG"
The filter string should appear as follows:
CustomerList.Customer = "Q. ARMSTRONG"
- Click OK.
- Click Execute in the Test Recordset dialog box.
If the select is successful, the record contents for Q. ARMSTRONG will
appear on the terminal screen and the following message should appear:
The selection operation reached an expected destination.
Notes:
- This action is the analog of the
SelectRecordByFilter
method.
- If the record exists on an entity that does not contain any defined recordsets,
the Test Recordset dialog box will close.
To select a specific record by index in a recordset:
- Follow the procedures described in Step 1 through Step 4 above.
- From the Action box, select Set Current Record Index .
- In the Set the current record index to box, type 3, and click Execute.
To check that your current record
index is set to the line number you want, view the indicator (for example,
Current record index: <line number>) at the bottom of this dialog box.
- Select Select Record from the Action box and click Execute.
If the select is successful, the record contents for Q. ARMSTRONG will
appear on the terminal screen and the following message should appear:
The selection operation reached an expected destination.
Notes:
- This action is the analog of the
SelectRecordByIndex
method.
- If the record exists on an entity that does not contain any defined recordsets,
the Test Recordset dialog box will close.