Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
6262 มุมมอง

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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>
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
[QWeb] get variable value­ from loop แก้ไขแล้ว
2
ก.ย. 24
11096
1
ก.ค. 23
3013
0
ก.ค. 22
1642
1
ธ.ค. 15
3496
0
พ.ค. 15
3629