Hi, I'm still not using ZPT here in my company, but I need to do a For Loop. How could I do it? I need something like the algorithm below: for i = 1 to N do execute ZSQL Method(var[1], var2[i]) end
From: "Fernando Lujan" <fernando.lujan@nube.com.br>
Hi, I'm still not using ZPT here in my company, but I need to do a For Loop. How could I do it? I need something like the algorithm below:
for i = 1 to N do execute ZSQL Method(var[1], var2[i]) end
Try (untested) something like: <dtml-in "_.range(1, N, 1)"> <dtml-call "method( var[_['sequence-number']], var2[_['sequence-number']] )"> </dtml-in> HTH Jonathan
From: "Fernando Lujan" <fernando.lujan@nube.com.br>
Hi, I'm still not using ZPT here in my company, but I need to do a For Loop. How could I do it? I need something like the algorithm below:
for i = 1 to N do execute ZSQL Method(var[1], var2[i]) end
P.S. a warning regarding the _.range function: zope limits the number of times the range function will loop (a few hundred times I think, I can't remember the limit). If you need to do a lot of looping, you are much better off using python scripts. Jonathan
participants (2)
-
Fernando Lujan -
Small Business Services