Update Forecast version with budget
Posted: Tue Jul 31, 2012 6:18 pm
I have created a rule to dynamically feed my actuals amount to my forecast. I used a rule because I want the actual amount in the forecast to be read only. I have created a turbo integrator script to copy my budget amount to my forecast periods. Forecast periods are any period >= current month. I used a turbo integrator process because future forecast period need to writable. Below is my TI script.
Issue: Only the last forecast period is getting updated when I run the TI script.
pnCurrent_Month = CellGetn('Assumption', 'Current Month','Numeric Value');
# How long are the dimensions?
I_DimSiz_Assumption_Period = DimSiz( 'Assumption Item');
# Initialise the counters.
I_Assumption_Periods_Idx = 1;
# Get the name of the Assumption Item element.
psAssumptions_Periods = DimNm ( 'Assumption Item', I_Assumption_Periods_Idx );
# Loop through the Assumption_Periods
pnForecast_Months = Cellgetn('Assumption', psAssumptions_Periods, 'Numeric Value');
While ( I_Assumption_Periods_Idx = I_DimSiz_Assumption_Period);
If (pnForecast_Months >= pnCurrent_Month);
CellPutN(NVALUE, 'Operating Expenses v2','FORECASTS',V2,V3,Location,Department,AssumptionPeriods,Account,'Amount');
Else;
Endif;
I_Assumption_Periods_Idx = I_Assumption_Periods_Idx + 1;
End;
My Text output file
pnCurrent_Month ="19281",
pnForecast_Months = "19281"
Budget Amount = "1"
Issue: Only the last forecast period is getting updated when I run the TI script.
pnCurrent_Month = CellGetn('Assumption', 'Current Month','Numeric Value');
# How long are the dimensions?
I_DimSiz_Assumption_Period = DimSiz( 'Assumption Item');
# Initialise the counters.
I_Assumption_Periods_Idx = 1;
# Get the name of the Assumption Item element.
psAssumptions_Periods = DimNm ( 'Assumption Item', I_Assumption_Periods_Idx );
# Loop through the Assumption_Periods
pnForecast_Months = Cellgetn('Assumption', psAssumptions_Periods, 'Numeric Value');
While ( I_Assumption_Periods_Idx = I_DimSiz_Assumption_Period);
If (pnForecast_Months >= pnCurrent_Month);
CellPutN(NVALUE, 'Operating Expenses v2','FORECASTS',V2,V3,Location,Department,AssumptionPeriods,Account,'Amount');
Else;
Endif;
I_Assumption_Periods_Idx = I_Assumption_Periods_Idx + 1;
End;
My Text output file
pnCurrent_Month ="19281",
pnForecast_Months = "19281"
Budget Amount = "1"