NamingFormat: String;
The NamingFormat property determines format of attribute name.
Executing the example requires a form with a button with the Button1 identifier, the MetaAttributesBreadcrumb component with the MetaAttributesBreadcrumb1 identifier and the MetaAttributesTreeList component with the MetaAttributesTreeList1 identifier. Time series database with the OBJ_FC identifier must be located in repository. 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(Null) As 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: