TI SunsetElementInsert help!
Posted: Wed Feb 08, 2012 6:45 pm
Hi,
I have a TI to create a Cost Centre Dim. In the prologue I have # IF SUBSET EXISTS, DELETE ALL ELEMENTS, OTHERWISE CREATE EMPTY SUBSET type logic.
In the Metadata tab I have:
DIMENSIONELEMENTINSERT('Cost Centre','',Totals,'c');
DimensionElementComponentAdd('Cost Centre',Totals,'Contingency',1.000000);
DimensionElementComponentAdd('Cost Centre',Totals,'Insurance',1.000000);
DimensionElementComponentAdd('Cost Centre',Totals,'Other Costs',1.000000);
SubsetElementInsert('Cost Centre','Daily Cost Report','Totals',1.000000);
After the TI has run and I open the subset "Daily Cost Report" the "Totals" element has been added circa 15k times. There are roughly 15,000 records in the source file so I am assuming it is running the SubsetElementInsert for every record. In the data Tab all I have are ATTRPUTS statements, nothing re the subset etc.
Any advice would be much appreciated.
Cheers
{Admin note: Moved to the correct forum. This does NOT belong in Useful Code, Tips and Tricks}
I have a TI to create a Cost Centre Dim. In the prologue I have # IF SUBSET EXISTS, DELETE ALL ELEMENTS, OTHERWISE CREATE EMPTY SUBSET type logic.
In the Metadata tab I have:
DIMENSIONELEMENTINSERT('Cost Centre','',Totals,'c');
DimensionElementComponentAdd('Cost Centre',Totals,'Contingency',1.000000);
DimensionElementComponentAdd('Cost Centre',Totals,'Insurance',1.000000);
DimensionElementComponentAdd('Cost Centre',Totals,'Other Costs',1.000000);
SubsetElementInsert('Cost Centre','Daily Cost Report','Totals',1.000000);
After the TI has run and I open the subset "Daily Cost Report" the "Totals" element has been added circa 15k times. There are roughly 15,000 records in the source file so I am assuming it is running the SubsetElementInsert for every record. In the data Tab all I have are ATTRPUTS statements, nothing re the subset etc.
Any advice would be much appreciated.
Cheers
{Admin note: Moved to the correct forum. This does NOT belong in Useful Code, Tips and Tricks}