Hi there,
i have a piece of script which post a closing flow figure into the next months opening flow (below). I have the script as past of my default formula as i want it to run every time data is loaded. The next months opening flow is updated if data is loaded to a month however, other months are not updated if no data is loaded to the prior month. The below table shows what is happening - I need March to get updated even though no data was loaded for February i.e. i need it to loop through a range of months i.e. Jan 2012 to December 2014
FLOW | JAN | FEB | MARCH | ||||
---|---|---|---|---|---|---|---|
OPENING | 10 | 13 | 0 | ||||
ADDITIONS | 5 | ||||||
DISPOSALS | -2 | ||||||
CLOSING FLOW | 13 | 13 | 0 |
*XDIM_MEMBERSET ACCOUNT = BAS(GLN10048)
*XDIM_MEMBERSET ACCTDETAIL = BAS(FLOW001)
*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
*XDIM_MEMBERSET LAYER = %LAYER_SET%
*XDIM_MEMBERSET PROFITCENTRE = %PROFITCENTRE_SET%
*XDIM_MEMBERSET RPTCURRENCY = LC,GBP
*XDIM_MEMBERSET TIME = %TIME_SET%
*FOR %X% = %TIME_SET%
*WHEN ACCTDETAIL.PARENTH1
*IS FLOW001 // (CLOSING FLOW PARENT)
*WHEN TIME
*IS %X%
*REC(ACCTDETAIL=FLOW002,TIME=TIME.NEXTMONTH) // (THIS IS RUNNING OFF A PROPERTY "NEXTMONTH" WHICH HAS THE NEXT MONTHS ID IN IT)
*ENDWHEN
*ENDWHEN
*NEXT
*COMMIT