I am having some trouble with accessing variables, here in this case Setvariable. When I go inside loop, variable doesn\'t exists. Anyone have any insight on this. Appreciat
This might help: http://www.tridiondeveloper.com/get-and-set-variables-in-dwts
Problems with variables in loops are well known and even documented.
Basically the first loop is already evaluated by the time you set your variable, so you will always be off by one.