WhereIsDeleted: TriState;
The WhereIsDeleted property determines whether deleted records are used in search:
TriState.OnOption - search is executed only in deleted records.
TriState.OffOption - search is executed only in non-deleted records.
TriState.Undefined - search is executed in all records.
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 keys of deleted factors are displayed in the console window.
See also: