CatalogManager.<Catalog name>.FindByAttribute
Syntax:
Parameters:
<AttributeName> (required)
The name of the attribute by value of which the search is to be formed, as specified in the Designer. The type of value is any, except for ValueStorage and lines of any length.
<AttributeValue> (required)
The attribute value by which the search is to be performed.
<Parent> (optional)
Parent to be searched. If it isn't specified the search is performed in the whole catalog.
<Owner> (optional)
Owner, within which you should perform searching. If it isn't specified the search is performed in the whole catalog.
Returned value:
Reference to a found catalog item. If there are no elements with the required attribute value, an empty reference will be returned.
Description:
Availability:
Note:
For attributes of the String type the search is executed by exact mapping.
Example:
StringOfDescription = "US Dollars"; Currencies = Catalogs.Currencies; FoundReference = Currencies.FindByAttribute("FullDescription", StringOfDescription); If FoundReference = Currencies.EmptyRef() Then Message("There is no """ + StringOfDescription + """ currency."); Else Message("Currency found."); EndIf; |