Skip to Content
0
Former Member
Aug 01, 2008 at 07:09 PM

Script Logic Question

19 Views

I'm trying to get a script to calculate an account value based on a driver. The driver script is in my default logic, so it runs when the user sends an auto_calc parameter, driver method and driver amount. The script needs to evaluate the period the user wants the account value to be written to (2008.06) and compare it to a flag period property of the forecast category. If the date is less than the flag period it should use the actual category otherwise it should use the forecast category.

My script does not properly evaluate the dates, so it always uses the acutal category. I have similar scripts that work, but code for this driver does not work properly. I'm sending the data 2008.06 and my flag period is 2008.05. Any help would be greatly appreciated. Below is my script:

// <Driver 7. Increase % over Prior Period>

*FLAG_PERIOD = CATEGORY.FCPLUSONE

*XDIM_MEMBERSET CATEGORY=Forecast

*XDIM_ADDMEMBERSET CATEGORY=Actuals

*XDIM_MEMBERSET ACCOUNT = %DriverAccounts%

*XDIM_MEMBERSET DATASRC=INPUT,AUTO_CALC,DRIVER_METHOD,DRIVER_AMOUNT,PS,FLASHSRC

*XDIM_MEMBERSET RPTCURRENCY=LC_FOREIGN,USD_US

*XDIM_MEMBERSET TIME=%TIME_SET%

*XDIM_ADDMEMBERSET TIME=PRIOR

*LOOKUP FINANCE

*DIM ENTITY=ENTITY

*DIM ACCOUNT=ACCOUNT

*DIM RECALC_SETTING: DATASRC="AUTO_CALC"

*DIM DRIVER_CHOSEN: DATASRC="DRIVER_METHOD"

*DIM DRIVER_AMOUNT: DATASRC="DRIVER_AMT"

*ENDLOOKUP

*CALC_DUMMY_ORG

*ORG DATASRC=PARENTH1

*ENDCALC

*WHEN TIME

*IS %TIME_SET%

*WHEN POS(TIME)

*IS < (%FLAG_PERIOD%)

*WHEN DATASRC

*IS AUTO_CALC

*WHEN LOOKUP(RECALC_SETTING) // Turned on?

*IS = 2

*WHEN LOOKUP(DRIVER_CHOSEN) // check the method

*IS = 7

REC(Expression=(1+LOOKUP(DRIVER_AMOUNT))GET(Time=Prior,CATEGORY="Actuals",DATASRC="#ALLSOURCES"), DATASRC ="INPUT")

*ENDWHEN

*ENDWHEN

*ENDWHEN

*ELSE

*WHEN DATASRC

*IS AUTO_CALC

*WHEN LOOKUP(RECALC_SETTING) // Turned on?

*IS = 2

*WHEN LOOKUP(DRIVER_CHOSEN) // check the method

*IS = 7

REC(Expression=(1+LOOKUP(DRIVER_AMOUNT))GET(Time=Prior,CATEGORY="Forecast",DATASRC="#ALLSOURCES"), DATASRC ="INPUT")

*ENDWHEN

*ENDWHEN

*ENDWHEN

*ENDWHEN

*ENDWHEN

*COMMIT