Question
- Set WEEK = 20
- Set LASTWEEK = 19
* Set LASTWEEK = %CALC{$EVAL(%WEEK% - 1)}%
Week 20
%INCLUDE{PlanForWeek%WEEK%}%
Warning: Can't find topic Support.PlanForWeek20
Last Week (Week $LASTWEEK)
%INCLUDE{PlanForWeek%LASTWEEK%}%
Warning: Can't find topic Support.PlanForWeekCALC{EVAL(20-1)}
Why does the above try to include a page called PlanForWeekEVAL 20 -1 instead of PlanForWeek19?
Environment
--
MartinCleaver - 12 May 2008
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
There seems to be an evaluation nesting limitation, apparently a
INCLUDE << SET_PREF << CALC << SET_PREF does not work
Last Week using INCLUDE << CALC << SET_PREF :
%INCLUDE{PlanForWeek%CALC{$EVAL(%WEEK% - 1)}%}%
Warning: Can't find topic Support.PlanForWeek19
This example shows that a
INCLUDE << CALC << SET_PREF does work, as expected.
As a workaround you can try to use
CALC{$SET()} and
$GET() instead of preferences variables.
--
PeterThoeny - 13 May 2008
Thanks Peter.
My goodness, this is unintuitive. I don't suppose there an engineering focus to simplify this?
--
MartinCleaver - 13 May 2008
File an enhancement request, ideally with a patch
--
PeterThoeny - 13 May 2008