@For can't work

Who know why this code can’t not work in browser? Appreciate in advance for help. Thanks

temp := @DbColumn (“”;“”:“”;“vGMLevel”;5);

recno := @Count (temp);

“

” +

“

”+

"<td class='dyn_theader'>No</td>"+

 "<td class='dyn_theader'>Level</td>"+

“

”+

@Implode (

@for(i := 1;i<=recno;i:=i+1;

“

”+

"<td>"+@Text(i) +"</td>"+

"<td>"+temp+"</td>"+

“

”))+

“

”

Subject: @For can’t work

The return value of the @For function is “1” (if the formula is valid). - You therefore cannot “include” @For within a formula (see Designer Help database for more details). You will have to put @For at the beginning of the formula and then include the result in the HTML code. Try the following (not tested, I am afraid). Hope it works.

====================

@for(i := 1;i<=recno;i:=i+1; _RESULT := “”+

“”+@Text(i) +“”+

“”+temp+“”+

“”));

temp := @DbColumn (“”;“”:“”;“vGMLevel”;5); recno := @Count (temp); “

” +

“

”+

“

”+

“

”+

“

”+

@Implode (_RESULT)+

“

No Level
”

====================

Good luck,

Pascal

Subject: RE: @For can’t work

temp := @DbColumn (“”;“”:“”;“vGMLevel”;5);_i := 0;

lineNos := @Transform(temp; “x”; @Do(_i := _i + 1; @text(_i)));

“

” +

“

NoLevel
”+

@Implode(lineNos + “

” + temp; “
”) +

“

”

Subject: RE: @For can’t work

Can’t work. No data been show.