IDimOrmCondition.EvaluateAll

Fore Syntax

EvaluateAll(Dimension: IDimInstance): IDimIterator;

Fore.NET Syntax

EvaluateAll(Dimension: Prognoz.Platform.Interop.Dimensions.IDimInstance): Prognoz.Platform.Interop.Dimensions.IDimIterator;

Parameters

Dimension. Dictionary data to be tested for meeting search conditions.

Description

The EvaluateAll method checks all dictionary elements and returns iterator that contains elements meeting the search conditions.

Fore Example

Executing the example requires that the repository contains a dictionary with the Dim_1 identifier.

Sub UserProc;
Var
    MB: IMetabase;
    DimInst: IDimInstance;
    Elem: IDimElements;
    Man: IDimOrmManager;
    Cond: IDimOrmCondition;
    AttrsList: IDimAttributesList;
    Crit: IDimTextCriteria;
    Iter: IDimIterator;
Begin
    MB := MetabaseClass.Active;
    DimInst := MB.ItemById("Dim_1").Open(NullAs IDimInstance;
    Elem := DimInst.Elements;
    AttrsList := New DimAttributesList.Create(DimInst.Dimension, "NAME;ID");
    Crit := New DimTextCriteria.Create;
    //Define attributes using Probe method
    Crit.CriteriaOptions := TextCriteriaOptions.SearchProbeAttributes
        Or TextCriteriaOptions.FreeText;
    //Indicate object that determines searched attributes
    //For attributes Name and Id the method returns True as they are included into the collection
    Crit.Probe := AttrsList.Probe;
    Crit.Text := "100";
    Man := New DimOrmManager.Create;
    Cond := Man.CreateCondition(DimInst.Dimension, Crit);
    Iter := Cond.EvaluateAll(DimInst);
    Iter.First;
    While Iter.Next Do
        Debug.WriteLine(Elem.Name(Iter.Element));
    End While;
End Sub UserProc;

Executing the example an object is created used to search for dictionary elements. Search condition is selected. Next, all elements are checked for meeting the search conditions. Names of the elements that meet the search conditions are displayed in the development environment console.

See also:

IDimOrmCondition