ICubeMetaUpdateAttributeRemapping.Value

Syntax

Value: Variant;

Description

The Value determines a value of factors attribute of the database copy.

NOTE. This property is taken into account if the value of the ICubeMetaUpdateAttributeRemapping.Type property is CubeMetaUpdateAttributeRemappingType.Const_.

Example

Executing the example requires that the repository contains a time series database with the FC identifier. Also, the time series database with the FC_COPY identifier that contains the A_COUNTRY custom factors attribute must be available.

Sub Main;

Var

mb: IMetabase;

CrInfo: IMetabaseObjectCreateInfo;

Obj: IMetabaseObject;

ObjDesc: IMetabaseObjectDescriptor;

RubUpdateEx: ICubeMetaUpdateEx;

Rub: IRubricator;

AttrRemapping: ICubeMetaUpdateAttributeRemappings;

AttrR: ICubeMetaUpdateAttributeRemapping;

Begin

mb := MetabaseClass.Active;

CrInfo := Mb.CreateCreateInfo;

CrInfo.ClassId := MetabaseObjectClass.KE_CLASS_CUBEMETAUPDATE;

CrInfo.Id := Mb.GenerateId("Cube_Meta_Upd");

CrInfo.Permanent := True;

CrInfo.Parent := Mb.Root;

ObjDesc := Mb.CreateObject(CrInfo);

Obj := ObjDesc.Edit;

RubUpdateEx := Obj As ICubeMetaUpdateEx;

Rub := mb.ItemById("FC").Bind As IRubricator;

RubUpdateEx.Rubricator := Rub;

RubUpdateEx.Metabase := Mb;

RubUpdateEx.RdsDatabase := Rub.Database;

RubUpdateEx.TargetRubricator := mb.ItemById("FC_COPY").Bind As IRubricator;

AttrRemapping := RubUpdateEx.MetafactsAttributeRemappings;

AttrR := AttrRemapping.FindById("A_COUNTRY");

AttrR.Value := 512;

AttrR.Type := CubeMetaUpdateAttributeRemappingType.Const_;

Obj.Save;

End Sub Main;

After executing the example the constant value is set for the A_COUNTRY attribute: when data is copied from the FC database to the FC_COPY database, the A_COUNTRY attribute is always set to 512. The object that contains copy settings is saved with the Cube_Meta_Upd identifier.

See also:

ICubeMetaUpdateAttributeRemapping