Attributes: String;
The Attributes property determines a list of attributes by which search is executed.
Attribute identifiers are separated by the sign ;. This property is used to change a list of attributes, by which search is executed. Target value is set by the Value property for each attribute.
Executing the example requires the MDM repository with the NSI_1 identifier that contains an MDM dictionary with the Dict_1 identifier. The dictionary has an additional attribute with the ATTRIBUTE1 identifier.
Add links to the Metabase, Rds system assemblies.
Sub UserProc;
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");
Look.Options := RdsElementsLookupOptions.Partial;
Look.Data.Value(0) := "First";
// The first search
For Each Element In Look.LookupList Do
Debug.WriteLine(Element.Name + " " + Element.Key.ToString);
End For;
//The second search
Debug.WriteLine("---The second search---");
Look.Attributes := "ATTRIBUTE1";
Look.Options := RdsElementsLookupOptions.Default_;
Look.Data.Value(0) := "33";
For Each Element In Look.LookupList Do
Debug.WriteLine(Element.Name + " " + Element.Key.ToString);
End For;
End Sub UserProc;
After executing the example MDM dictionary elements are searched for two times. Elements that have the word First in their name are searched for the first time. Elements that have value 33 in additional attribute values are searched for the second time. Names and keys of found elements are displayed in the development environment console.
See also: