IMetaAttributesEdit.AddAttribute

Syntax

AddAttribute(Value: IMetaAttribute);

Parameters

Value. The attribute of time series database, which values must be added to the component substitutions.

NOTE. One can load only data on attributes associated with dictionaries and on the Revisions attribute to the list of component substitutions.

Description

The AddAttribute method adds attribute values passed by the Value parameter to component substitutions.

Example

Executing the example requires a form with the MetaAttributesEdit component named MetaAttributesEdit1. The repository contains a time series database with the TSDB identifier. The database contains the COUNTRY attribute connected to the countries dictionary. Determine the specified procedure as the OnCreate event handler of the form. Add links to the Cubes and Metabase system assemblies.

Sub SAMPLEFormOnCreate(Sender: Object; Args: IEventArgs);
Var
    MB: IMetabase;
    Rub: IRubricator;
Begin
    MB := MetabaseClass.Active;
    Rub := MB.ItemById("TSDB").Bind As IRubricator;
    MetaAttributesEdit1.AddAttribute(Rub.Facts.Attributes.FindById("COUNTRY"));
    MetaAttributesEdit1.AddAttribute(Rub.Facts.Attributes.FindById("DL"));
End Sub SAMPLEFormOnCreate;

On loading a form, the list of the MetaAttributesEdit1 component substitutions will include all the countries from the COUNTRY dictionary, as well as all calendar levels used in a time series database.

See also:

IMetaAttributesEdit