IMetabaseObjectParamControl.Expression

Syntax

Expression: IExpression;

Description

The Expression property returns an expression that determines binding of a current parameter of embedded object to parameters of current object.

Example

Executing the example requires a cube with the STD_CUBE identifier in repository. This cube has the dimension in the structure which is built basing the COUNTRY parametric dictionary. The number of parameters created in cube structure corresponds to the number of dictionary parameters.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Params: IMetabaseObjectParams;
    ControlInfo: IMetabaseObjectControlInfo;
    Control: IMetabaseObjectControl;
    Param: IMetabaseObjectParamControl;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    MObj := Mb.ItemById("STD_CUBE").Edit;
    //Parameters of the cube
    Params := MObj.Params;
    ControlInfo := Params.ControlInfo;
    Control := ControlInfo.FindByKey(MB.GetObjectKeyById("COUNTRY"));
    //Binding of nested object parameters
    For i := 0 To Control.Count - 1 Do
        Param := Control.Item(i);
        Param.Expression.AsString := ':' + Params.Item(i).Id;
    End For;
    MObj.Save;
End Sub UserProc;

After executing the example parameter management is set up for the determined dictionary. On cube opening, after parameter values are inputted, those values will be also sent to open the dictionary.

See also:

IMetabaseObjectParamControl