AppRecordList ReadByColumnAndColumn() Method

Reads any record list type by two column values.

Function Signature

 bool ReadByColumnAndColumn( columnName, value, column2Name, value2 )

Parameters

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:

  • string – ReadByColumn() will succeed if the column is a text column.
  • int, int64_t, short, byte, or bool – ReadByColumn() will succeed if the column is an integer column.
  • float or double – Not supported.

Return

Type Description

bool

Returns true if successful; false otherwise. A successful read may return zero results if no items match the query. Check for results by calling the AppRecordList.empty() method.

Technical Details

SBM ModScript version: 11.3.

Notes

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.

Related Topics

AppRecordList