SBM ModScript Reference → Programming SBM ModScript → Object Types → AppRecord → AppRecord ReadByColumnAndColumn() Method
Reads any record type by two column values.
Parameter | Type | Description |
---|---|---|
columnName |
string |
The name of the column without the "TS_" prefix. |
value |
Variant |
Value must be an int, int64_t, short, byte, bool, or string that can be converted to an int. |
column2Name |
string |
The name of the second column without the "TS_" prefix. |
value2 |
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( "USR_APP_NAME" ); var record = Ext.CreateAppRecord( tableId ); var read = record.ReadByColumnAndColumn( "SUBMITTER", 27, "TITLE", "myTitle" ); if(read){ var name = record.GetName(); var itemId = record.GetId(); Ext.WriteStream( "The item is " + name + " " + itemId ); }
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–2018 Serena Software, Inc., a Micro Focus company. All rights reserved.