IMetaAttributeSettings.FindById

Syntax

FindById(Id: String): IMetaAttributeSetting;

Parameters

Id. Attribute identifier.

Description

The FindById method searches attribute parameters by identifier.

Example

Executing the example requires a form, a button named Button1 on the form, the MetaAttributesBreadcrumb component named MetaAttributesBreadcrumb1, and the MetaAttributesTreeList component named MetaAttributesTreeList1. The repository must contain a time series database with the OBJ_FC identifier. This database should contain the custom time series attribute COUNTRY that refers to a dictionary.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    MB: IMetabase;
    RubDesc: IMetabaseObjectDescriptor;
    RubrIn: IRubricatorInstance;
    DictInst: IMetaDictionaryInstance;
    Dict: IMetaDictionary;
    AttrS: IMetaAttributeSettings;
    Attr: IMetaAttributeSetting;
Begin
    MB := MetabaseClass.Active;
    RubDesc := MB.ItemById("OBJ_FC");
    MetaAttributesTreeList1.Rubricator := RubDesc.Bind As IRubricator;
    MetaAttributesTreeList1.Breadcrumb := MetaAttributesBreadcrumb1;
    RubrIn := RubDesc.Open(NullAs IRubricatorInstance;
    MetaAttributesBreadcrumb1.Rubricator := RubrIn;
    DictInst := RubrIn.GetDictionary(RubricatorDictionary.Facts);
    Dict := (dictInst As IMetabaseObjectInstance).Object As IMetaDictionary;
    MetaAttributesTreeList1.Dictionary := Dict;
    MetaAttributesBreadcrumb1.Dictionary := DictInst;
    MetaAttributesBreadcrumb1.MetaAttributes := Dict.Attributes;
    AttrS := MetaAttributesBreadcrumb1.MetaAttributeSettings;
    Attr := AttrS.FindById("COUNTRY");
    Attr.NamingFormat := "KEY";
End Sub Button1OnClick;

After executing the example name format is changed for the COUNTRY attribute.

See also:

IMetaAttributeSettings