IRdsDictionaryElementsLookup.AttributeOptions

Syntax

AttributeOptions(Index: Integer): RdsElementsLookupOptions;

Parameters

Index - attribute index, by which additional search parameters should be determined.

Description

The AttributeOptions property determines search settings by an attribute, which index is passed by the Index parameter.

Example

Executing the example requires the MDM repository NSI_1 that contains an MDM dictionary with the Dict_1 identifier. The dictionary has an additional attribute with the ATTRIBUTE1 identifier.

Sub Main;

Var

MB: IMetabase;

Dict: IRdsDictionary;

DictInst: IRdsDictionaryInstance;

Look: IRdsDictionaryElementsLookup;

Element: IRdsDictionaryElement;

Begin

MB := MetabaseClass.Active;

Dict := MB.ItemByIdNamespace("DICT_1", MB.ItemById("NSI_1").Key).Bind As IRdsDictionary;

DictInst := Dict.Open(Null);

Look := DictInst.CreateLookup("NAME;ATTRIBUTE1");

Look.AttributeOptions(0) := RdsElementsLookupOptions.CaseInsensitive Or RdsElementsLookupOptions.Partial;

Look.AttributeOptions(1) := RdsElementsLookupOptions.Partial;

Look.Data.Value(0) := First;

Look.Data.Value(1) := "33";

For Each Element In Look.LookupList Do

Debug.WriteLine(Element.Name + " " + Element.Key.ToString);

End For;

End Sub Main;

After executing the example MDM dictionary elements are searched by values of two attributes. Elements, that have the word First case-insensitive in their name and numbers combination 33 in additional attribute values, are searched. Names and keys of found elements are displayed in the development environment console.

See also:

IRdsDictionaryElementsLookup