IRdsAttribute.TimeDependent

Syntax

TimeDependent: Boolean;

Description

The TimeDependent property determines whether time component for attributes with the DateTime type is considered.

Comment

Available values:

For system attributes INDATE and OUTDATE this property is set to False by default, if the property for these attributes is set to True, time is considered in valid periods of elements.

The attribute data type is determined with the IRdsAttribute.DataType property.

Example

Executing the example requires that the repository contains an MDM repository with the MDM identifier containing an MDM dictionary with the DICT identifier.

Add links to the Dal, Metabase and Rds system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Dict: IRdsDictionary;
    Attrs: IRdsAttributes;
    Attr: IRdsAttribute;
Begin
    MB := MetabaseClass.Active;
    // Get MDM dictionary
    MObj := MB.ItemByIdNamespace("DICT", MB.ItemById("MDM").Key).Edit;
    Dict := MObj As IRdsDictionary;
    // Get dictionary attributes
    Attrs := Dict.Attributes;
    // Add new attribute
    Attr := Attrs.Add;
    // Set attribute data type: date and time
    Attr.DataType := DbDataType.DateTime;
    Attr.TimeDependent := True;
    // Set attribute identifier and name
    Attr.Id := "RELEASE_DATE";
    Attr.Name := Release date and time;
    // Attribute can have empty values
    Attr.Nullable := True;
    // Save changes
    MObj.Save;
End Sub UserProc;

After executing the example an additional attribute with the DateTime type, that considers time component, is created in the MDM dictionary.

See also:

IRdsAttribute