I am running the following code to set an alias based on possible repartition found within the original hierarchy stored stored as text attribute. (The repartition within dimension source is taken care of in the dimbuild process.)
Code: Select all
[b]Prolog[/b]
vAliasName='Product_Alias_Attribute';
ATTRDELETE('mpl_Product_WCP',vAliasName);
savedataall();
ATTRINSERT('mpl_Product_WCP','',vAliasName,'A');
[b]MetaData[/b]
#****Begin: Generated Statements***
Text_Attribute=ATTRS('mpl_Product_WCP',mpl_Product_WCP,'Product_Text_Attribute');
#****End: Generated Statements****
vAliasBase=Text_Attribute;
vAliasOne=vAliasBase|'-';
vAliasTwo=vAliasBase|'--';
vAliasThree=vAliasBase|'---';
vAliasFour=vAliasBase|'-----';
vElement=mpl_Product_WCP;
IF(DIMIX('mpl_Product_WCP',vAliasBase)=0);
AttrPutS(vAliasBase,'mpl_Product_WCP',vElement, vAliasName);
ElseIF(DIMIX('mpl_Product_WCP',vAliasOne)=0);
AttrPutS(vAliasOne,'mpl_Product_WCP',vElement, vAliasName);
ElseIF(DIMIX('mpl_Product_WCP',vAliasTwo)=0);
AttrPutS(vAliasTwo,'mpl_Product_WCP',vElement, vAliasName);
ElseIF(DIMIX('mpl_Product_WCP',vAliasThree)=0);
AttrPutS(vAliasThree,'mpl_Product_WCP',vElement, vAliasName);
ElseIF(DIMIX('mpl_Product_WCP',vAliasFour)=0);
AttrPutS(vAliasFour,'mpl_Product_WCP',vElement, vAliasName);
EndIF;
Jim.
PS. I tried adding a save data all to force a commit.