DefaultValue: Variant;
The DefaultValue property returns the default value for the field of data source.
Sub Main;
Var
MB: IMetabase;
DSInst: IDatasetInstance;
DSModel: IDatasetModel;
Fields: IDatasetModelFields;
Field: IDatasetModelField;
v: Variant;
Begin
MB:=MetabaseClass.Active;
DSInst:=MB.ItemById("Table_1").Open(Null) As IDatasetInstance;
DSModel:=DSInst.Dataset;
Fields:=DSModel.Fields;
Field:=Fields.Item(0);
v:=Field.DefaultValue;
End Sub Main;
After executing the example, the "v" variable contains default value of the first field of data source. The identifier of data source is Table_1.
See also: