Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
6239 Tampilan

Hi everybody,

I use aeroo to report on .odt, within a loop for I want ti initializze a variable i=0, then it increments in the loop, and in the end I will show the i

It's my idea to catch the value of i in every loop

<i=0>
<for each="oneaddress in o.address">
<i = i + 1>
</for>
<i>

the error :

__filter() got an unexpected keyword argument 'i'

Any idea, thanks

Avatar
Buang
Jawaban Terbai

If you want to use an autoincrement variable, you can change your for tag with this for tag:

<for each="inc in range(count(objects))">

end call the object in the loop with this one

<objects[inc].name or ''>

when you want show the variable you must only use this tag:

<inc>
Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
2
Sep 24
11074
1
Jul 23
3004
0
Jul 22
1625
1
Des 15
3488
0
Mei 15
3624