ParentBlockBinding(IndexAttribute: IStandardDimIndexAttribute): IExpression;
IndexAttribute - attribute relating to the unique index of the owner.
The ParentBlockBinding property returns an object that contains a formula determining the link between data source field and an attribute included into unique index of parent block.
Sub Main;
Var
MB: IMetabase;
Dimens: IStandardDimension;
DimBlocks: IStandardDimBlocks;
DimBlock: IStandardDimBlock;
BlockIndex: IStandardDimIndex;
s: String;
Begin
MB:=MetabaseClass.Active;
Dimens:=MB.ItemById("TAB_DIM").Bind As IStandardDimension;
DimBlocks:=Dimens.Blocks;
DimBlock:=DimBlocks.Item(1);
BlockIndex:=DimBlock.ParentBlockIndex;
If BlockIndex<>Null Then
s:=DimBlock.ParentBlockBinding(BlockIndex.Attributes.Item(0)).AsString;
Else
s:="No";
End If;
End Sub Main;
After executing the example the "s" variable contains the formula determining the connection of data source field with the first attribute, relevant to the unique owner's index, converted to line mode. Table dictionary identifier: TAB_DIM.
See also: