[ic] [loop-next] question

Marty Tennison interchange-users@icdevgroup.org
Mon May 19 11:19:00 2003


On Mon, 2003-05-19 at 07:09, Xavier GILLET wrote:
> Hi list,
> 
> I have a problem with this code.
> The loop return 4 results without the [loop-next] tag. But one is not 'En
> ligne ' (on line) so I want to remove it.
> When I use this code, I have no more results returned.
> I really do not understand why....
> 
> [loop search="
>  fi=ma_selection
>  se=[data session username]
>  sf=user
>  se=1
>  sf=actif
>  co=yes
>  tf=heure
>  to=r"]
>     [seti table][loop-data ma_selection dbase][/seti]
>     [seti annonce_ref][loop-data ma_selection annonce_ref][/seti]
>     [tmp tt][data table="[scratch table]" column=actual_status key="[scratch
> annonce_ref]"][/tmp]
>     [if scratch tt ne 'En ligne']
>     [loop-next]1[/loop-next]
>     [/if]
> 
> ************html code here to display results ************
> 
> [/loop]

You might try something similar to this... (not checked for typos)

[loop-next]
  [calc]
    return 1 if ( $Scratch->{tt} ne "En ligne" );
    return 0;
  [/calc]
[/loop-next]
-- 
Marty Tennison <marty@sediva.com>