SBM ModScript Reference → Programming SBM ModScript → Object Types → AppRecord → AppRecord ReadByColumn() Method
Reads any record type by a column value.
Parameter | Type | Description |
---|---|---|
columnName |
string |
The database name of the column without the TS_ prefix. |
value |
Variant |
Behavior depends on the Variant internal type:
|
Type | Description |
---|---|
bool |
Returns true if the item is read successfully; false if the item is not found. |
SBM ModScript version: 11.3.
var tableId = Ext.TableId( "TS_USERS" ); var record = Ext.CreateAppRecord( tableId ); if( record.ReadByColumn( "LOGINID", "joe" )){ var name = record.GetName(); Ext.WriteStream( "User is " + name ); }
As the behavior depends on the Variant internal type, the functions CInt, CStr, and CDbl can be used to get a Variant with the desired internal type.
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.