SBM ModScript Reference → Programming SBM ModScript → Object Types → AppRecord → AppRecord Read() Method
Looks up a row in the AppRecord's table.
| Parameter | Type | Description |
|---|---|---|
|
recordIdOrName |
string int |
If this is an int or string that SBM ModScript can convert to an int, it is taken as the value to search for in the TS_ID column. All other parameter types are converted to a string and searched for in the Name system field. |
| Type | Description |
|---|---|
|
bool |
Returns true if the TS_ID or name was found, in which case the calling AppRecord object becomes a copy of that row in the table. |
SBM ModScript version: 11.3.
//Create a Contact record
var tableId = Ext.TableId ("TS_CONTACTS");
var myRecord = Ext.CreateAppRecord(tableId);
if(! myRecord.Read("Smith")) {
Ext.LogErrorMsg("Error looking for Contact with " +
"TS_CONTACTLASTNAME of 'Smith'");
}
If the table is cached by Application Engine, the record may be read from the cache instead of the database.
Copyright © 2007–2019 Micro Focus or one of its affiliates. All rights reserved.