IRdsDictionaryElementsSearch.FindAll

Syntax

FindAll: IRdsDictionaryElementArray;

Description

The FindAll method searches all element that meet search conditions and returns an array, which contains keys of found elements.

Example

Executing the example requires a form with the Button1 button, the RdsDictionaryBox component named RdsDictionaryBox1, and the UiRdsDictionary component that is a data source for RdsDictionaryBox1. The MDM dictionary that is connected to the UiRdsDictionary component has the attributes Name and UserAttr.

    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Var
        RdsInst: IRdsDictionaryInstance;
        Search: IRdsDictionaryElementsSearch;
        Crit: IDimTextCriteria;
        Keys: IRdsDictionaryElementArray;
    Begin
        RdsInst := RdsDictionaryBox1.Source.Instance;
        Search := RdsInst.CreateSearch;
        Search.Attributes.Attributes := "Name;UserAttr";
        Crit := New DimTextCriteria.Create;
        Crit.CriteriaOptions := TextCriteriaOptions.SearchStringAttributes
            Or TextCriteriaOptions.FreeText;
        Crit.Text := Income of citizens;
        Search.SetTextCriteria(Crit);
        Keys := Search.FindAll;
    End Sub Button1OnClick;

After executing the example while pressing the button elements of the MDM dictionary are searched with specified parameters of search criterion. Search is executed on values of specified attributes. The Keys variable contains the array of keys of found elements.

See also:

IRdsDictionaryElementsSearch