Page 1 of 1

Attributes in rules

Posted: Tue Sep 29, 2009 11:49 am
by Simon Bradshaw
I have just had to change a rule that has worked up to the current month and forecast.
I can't see any difference from last month, in fact it still works going back, it's the current month that has stopped calculating.
The original rule was based on the previous month / forecast attribute.
I changed this for the DIMNM(DIMIX functions and, hey presto, it's working.
#To calculate the Registered Only Invoice [Material] accrual movement
#['Material Reg Only Accrual Movement']=N:
#DB('Project Checker',!Forecast-Scenario,!Forecast-Type,!Projects,!Month,'Registered Only Invoice Accrual') -
#DB('Project Checker',attrs('Forecast-Scenario',!Forecast-Scenario,'Previous Forecast'),!Forecast-Type,
#!Projects,attrs('Month',!Month,'PriorMonth'),'Registered Only Invoice Accrual');

#simon.bradshaw 2009-09-29 attributes to calc accruals stopped working changed to DIMNM(DIMIX functions
['Material Reg Only Accrual Movement']=N:
DB('Project Checker',!Forecast-Scenario,!Forecast-Type,!Projects,!Month,'Registered Only Invoice Accrual') -
DB('Project Checker',DIMNM('Forecast-Scenario',(DIMIX('Forecast-Scenario',!Forecast-Scenario)-1)),!Forecast-Type,
!Projects,DIMNM('Month',(DIMIX('MONTH',!Month)-1)),'Registered Only Invoice Accrual');


FEEDERS
#Feeders for the Registered Only Invoice [Material] accrual
#['Registered Only Invoice Accrual']=>
#DB('Project Checker',attrs('Forecast-Scenario',!Forecast-Scenario,'Next Forecast'),!Forecast-Type,
#!Projects,attrs('Month',!Month,'NextMonth'),'Material Reg Only Accrual Movement');

#simon.bradshaw 2009-09-29 changed to DIMNM(DIMIX functions from attributes above
['Registered Only Invoice Accrual']=>
DB('Project Checker',DIMNM('Forecast-Scenario',(DIMIX('Forecast-Scenario',!Forecast-Scenario)+1)),!Forecast-Type,
!Projects,DIMNM('Month',(DIMIX('MONTH',!Month)+1)),'Material Reg Only Accrual Movement');

['Registered Only Invoice Accrual']=>
DB('Project Checker',!Forecast-Scenario,!Forecast-Type,!Projects,!Month,'Material Reg Only Accrual Movement');
The calculated datapoint came up with the Not Fed message which was traced back to the month.
Why would it only occur on a single month, the attributes seem fine
Forecast-Scenario Next Forecast Previous Forecast
Forecast 07-09 Forecast 08-09 Forecast 06-09
Forecast 08-09 Forecast 09-09 Forecast 07-09
Forecast 09-09 Forecast 10-09 Forecast 08-09

Month NextMonth PriorMonth
Jul-2009 Aug-2009 Jun-2009
Aug-2009 Sept-2009 Jul-2009
Sep-2009 Oct-2009 Aug-2009
It became desperate, I wa saving the rules, re-writing the attributes, re-started the service all to no avail.
This has worked for years, suddenly Forecast 09-09, Sep-2009 stops working.
Has anyone come across this before or should I not be using attributes in the rules at all

Re: Attributes in rules

Posted: Tue Sep 29, 2009 12:04 pm
by glaurens
Your nextmonth attribute on August 2009 is currently Sept 2009 and should be Sep 2009.

G

Re: Attributes in rules

Posted: Tue Sep 29, 2009 12:29 pm
by Steve Rowe
I can hear the sound of hand slapping forehead from here! Been there done that!

Re: Attributes in rules

Posted: Wed Sep 30, 2009 11:45 am
by Simon Bradshaw
More like tupping the flamin' wall.
Can't believe I missed that, and everyone else that had a look to prove I wasn't going mad.
Ah well, you live and learn.
Thanks anyway.