AppRecord GetFieldValue() Method

Gets the value of any field, returning value as a Variant.

Function Signature

 Variant GetFieldValue( name )

Parameters

Parameter Type Description

name

string

The name of the field whose value will be retrieved from the variable field list or the AppRecord column. Field names for variable fields should be provided in uppercase characters for database names or in lowercase/mixed-case characters for display names (for Title, for example).

Return

Type Description

Variant

The value of the field, if the value was found successfully.

Technical Details

SBM ModScript version: 11.3.

Example

//Create and retrieve Project record
var tableId = Ext.TableId("TS_PROJECTS");
var myRecord = Ext.CreateAppRecord(tableId);
var ok = myRecord.Read("Image Builder");
if ( ok != 0 ) {
	 var value = myRecord.GetFieldValue( "parentid" ); 
	 Ext.LogInfoMsg ("Parent ID of Image Builder is " &&& value);
} 

Notes

See notes on AppRecord GetFieldValue(-type-) Method.

Important: Only use this version of GetFieldValue if you are sure that the field will be found. It is not recommended to use this method with dates; instead, use the AppRecord.GetFieldValue( name, TimeT& value ) signature.

Related Topics

AppRecord