A few months ago I wrote a set of rules which temporarily achieved what I needed but they were long winded and inefficient. I'm looking for some help in tidying them up.
Scenario is balance sheet set up, pulling in opening balances from one account to another. Below is an example of the code pulling the period 13 forecast (Q3) balances of eg account "900_ITE" into the period 1 budget (BU) account "900_ITE Opening Balance". In order to get this to work I have had to include a line for every account code.
Is there a smarter way to code this so that all the accounts can fall into the same rule?
Code: Select all
['BU' , '900_ITE Opening Balance'] = N: IF ( SUBST (!Period, 5,2) @='01',
DB('X_AX Cost Reporting',!Currency,'Q3', 'YTD' | SUBST (!Period , 1, 3) | '013' , !X_F8 Cost Centres ,'900_ITE',!X_F8 Value Measure)
,0);
['BU' , '900_MVC Opening Balance'] = N: IF ( SUBST (!Period, 5,2) @='01',
DB('X_AX Cost Reporting',!Currency,'Q3', 'YTD' | SUBST (!Period , 1, 3) | '013' , !X_F8 Cost Centres ,'900_MVC',!X_F8 Value Measure)
,0);
Andrea