Output Templates syntax (how to add 1 to a variable)

Hello,

I am having trouble figuring out the syntax used in the Output Template editor wM 6.5.
Specifically I need to add +1 to the $index variable inside the following loop:

%loop List%
%value $index%) %value ListElement%
%end%

I have tried two methods, neither seemed to do the trick:

1)
%loop List%
%$index++%
%value $index%) %value ListElement%
%end%

2)
%loop List%
%var i = $index + 1%
%value i%
%value $index%) %value ListElement%
%end%

I’m afraid this might be a DSP limitation which will not allow me to perform the addition.

Thank you in advance.

$index is a webMethods specific variable and we should avoid doing any mathematical operation on it.

i dont know if you can it on template files alone. But you can invoke a service that will increment the $index by 1 and returns $index.

%loop List%
%invoke incrementServiceName%
%value $index%) %value ListElement%

Cheers
Guna
http://www.nibodo.com