IMetaDictionaryLookup.CustomWhere

Syntax

CustomWhere: IOrmConditions;

Description

The CustomWhere property returns additional condition of the search.

Example

Executing the example requires that the repository contains a time series database with the OBJ_FC identifier. The database must have a time series attribute with the COUNTRY identifier.

Add links to the Metabase, Cubes, Rds, Orm, Dimensions system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    RubDesc: IMetabaseObjectDescriptor;
    RubrIn: IRubricatorInstance;
    DictInst: IMetaDictionaryInstance;
    MetaDLookup: IMetaDictionaryLookup;
    Conditions: IOrmConditions;
    Cond: IOrmCondition;
    i: Integer;
    Res: Array Of Integer;
Begin
    MB := MetabaseClass.Active;
    RubDesc := MB.ItemById("OBJ_FC");
    RubrIn := RubDesc.Open(NullAs IRubricatorInstance;
    DictInst := RubrIn.Facts;
    MetaDLookup := DictInst.CreateLookup("");
    Conditions := MetaDLookup.CustomWhere;
    Cond := Conditions.Add;
    Cond.AttributeName := "COUNTRY";
    Cond.Value := 512;
    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 UserProc;

After executing the example the console window displays indicator keys that satisfy the following condition: value of the COUNTRIES attribute equals to 512 in an indicator.

See also:

IMetaDictionaryLookup