I'm having an issue where I am trying to toggle a variable value each time
it is accessed in a subproduct loop. For some reason, the variable value
resets to its initial value whenever the loop reiterates.
Here is an example of the code within the SUBPRODUCTS definition:
-------------------------------------------------------------------------
[-- VAR.SubProductIsEvenOdd odd --]
[-- LOOP SUBPRODUCTS --]
[-- IF VAR.SubProductIsEvenOdd odd --]
odd [-- VAR.SubProductIsEvenOdd even --] [--
VAR.SubProductIsEvenOdd --]
[-- ELSE --]
even [-- VAR.SubProductIsEvenOdd odd --] [--
VAR.SubProductIsEvenOdd --]
[-- END_IF --]
[-- SUBPRODUCTS --]
[-- END_LOOP SUBPRODUCTS --]
-------------------------------------------------------------------------
Here is an example of the output:
-------------------------------------------------------------------------
odd even [the subproduct is displayed]
odd even [the subproduct is displayed]
odd even [the subproduct is displayed]
-------------------------------------------------------------------------
I can see that within each iteration, the value is reset correctly, however
the reset value does not pass through to the next iteration.
What this should do (in theory) is toggle between odd and even so that it
results in:
-------------------------------------------------------------------------
odd even [the subproduct is displayed]
even odd [the subproduct is displayed]
odd even [the subproduct is displayed]
-------------------------------------------------------------------------
Any ideas why this is not working or how I can toggle a variable value
through each iteration of a subproduct?
Thank you,
Matthew