IRdsDictionaryElementsSearch.SelectSearchValue

Syntax

SelectSearchValue: RdsSelectSearchValue;

Description

The SelectSearchValue property determines condition of the search by value.

Comments

To get array of keys of all elements, which satisfy search conditions, use the IRdsDictionaryElementsSearch.FindAll method.

Example

Executing the example requires that the repository contains an MDM table dictionary with the DIM identifier.

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

Sub UserProc;
Var
    DictInst: IRdsDictionaryInstance;
    Search: IRdsDictionaryElementsSearch;
    Cond: IOrmCondition;
Begin
    DictInst := MetabaseClass.Active.ItemById("DIM").Open(NullAs IRdsDictionaryInstance;
    DictInst.FetchAll := True;
    Search := DictInst.CreateSearch;
    // Set up search by value in the dictionary table
    Search.SelectSearchValue := RdsSelectSearchValue.Value;
    Cond := Search.Condition.Conditions.Add;
    // Choose attribute for search and set up search conditions
    Cond.AttributeName := DictInst.Attributes.Item(4).Id;
    Cond.Operator_ := OrmComparisonOperator.Equal;
    Cond.Value := 3
    // Display number of found elements
    Debug.WriteLine("Number of elements which are satisfactory to search conditions: " + 
        Search.FindAll.Count.ToString);
End Sub UserProc;

After executing the example search is executed by value in dictionary table. The console displays the number of found elements.

See also:

IRdsDictionaryElementsSearch