IMetaDictionaryLookup.DeleteMarkAttribute

Syntax

DeleteMarkAttribute: String;

Description

The DeleteMarkAttribute property determines an attribute that contains an indicator of deleted record.

Example

Executing the example requires that the repository contains a time series database with the OBJ_FC identifier.

Sub Main;

Var

MB: IMetabase;

RubDesc: IMetabaseObjectDescriptor;

RubrIn: IRubricatorInstance;

DictInst: IMetaDictionaryInstance;

MetaDLookup: IMetaDictionaryLookup;

Atts: IMetaAttributes;

DeleteMark: String;

i: Integer;

Res: Array Of Integer;

Begin

MB := MetabaseClass.Active;

RubDesc := MB.ItemById("OBJ_FC");

RubrIn := RubDesc.Open(Null) As IRubricatorInstance;

DictInst := RubrIn.Facts;

MetaDLookup := DictInst.CreateLookup("");

Atts := DictInst.Dictionary.Attributes;

DeleteMark := Atts.FindByTag(MetaAttributeTag.DeleteMark).Id;

MetaDLookup.DeleteMarkAttribute := DeleteMark;

MetaDLookup.WhereIsDeleted := TriState.OnOption;

i := MetaDLookup.LookupKeys("FACTOR").Length;

Res := New Integer[i];

Res := MetaDLookup.LookupKeys("FACTOR");

For i := 0 To Res.Length - 1 Do

Debug.WriteLine(Res[i].ToString);

End For;

End Sub Main;

After executing the example an attribute that contains an indicator of deleted record is determined. Then all deleted time series are searched, their keys are displayed in the console window.

See also:

IMetaDictionaryLookup