AppRecord SetFieldValue() Method

(SBM On-Premise/PaaS only) Sets the value of any column.

Function Signature

 bool SetFieldValue( name, string& value )

bool SetFieldValue( name, int& value )

bool SetFieldValue( name, int64_t& value )

bool SetFieldValue( name, double& value )

bool SetFieldValue( name, TimeT& value )

bool SetFieldValue( name, Variant& value )

Parameters

Parameter Type Description

name

string

The name of the column whose value will be set in the AppRecord schema.

value

string&

int&

int64_t&

double&

TimeT&

Variant&

(Input/Output) The new value for the column. The value must be specified as it is stored in the database. For example, for integer columns that are a foreign key to the TS_USERS table, the value must be the database ID for the user. TimeT values should only be used with columns that represent dates, either as a native database date or as a integer that represents dates in Unix Epoch time format.

Return

Type Description

bool

Returns true if the column value was successfully set; false otherwise.

Technical Details

SBM ModScript Variant version added in 11.3. TimeT version added in 11.4. Others added in 11.6.

Example

Notes

This SetFieldValue() method specifically relates to AppRecords that are used for system table records. For auxiliary and primary table records, see VarRecord SetFieldValue() Method.

CAUTION:
It is strongly recommended that you consult the SBM schema document before using the SetFieldValue method.

Related Topics

AppRecord