DefaultValue: Variant;
The DefaultValue property determines default value for the field.
Executing the example requires that the repository contains a table with the TABLE_DEFAULT_VALUE identifier.
Add links to the Db and Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Table: ITable;
Fields: ITableFields;
Field: ITableField;
DefVal: Variant;
Begin
MB := MetabaseClass.Active;
Table := MB.ItemById("TABLE_DEFAULT_VALUE").Bind As ITable;
Fields := Table.Fields;
Field := Fields.Item(0);
DefVal := Field.DefaultValue;
End Sub UserProc;
After executing the example the DefVal variable contains a default expression determined for the first field.
See also: