IDatasetModelField.Expression

Syntax

Expression: IExpression;

Description

The Expression property returns expression of calculated field.If the field is not calculated, the empty value is returned.

Example

Sub Main;

Var

MB: IMetabase;

DSInst: IDatasetInstance;

DSModel: IDatasetModel;

Fields: IDatasetModelFields;

Field: IDatasetModelField;

s: String;

Begin

MB:=MetabaseClass.Active;

DSInst:=MB.ItemById("Table_1").Open(Null) As IDatasetInstance;

DSModel:=DSInst.Dataset;

Fields:=DSModel.Fields;

Field:=Fields.Item(0);

s:=Field.Expression.AsString;

End Sub Main;

After executing the example, the "s" variable contains an expression of the first field of data source, transformed to string type. The identifier of data source is Table_1.

See also:

IDatasetModelField