[ic] little loop question

Götz Verdieck interchange-users@interchange.redhat.com
Thu Feb 14 06:04:01 2002


> I've got a little problem:
> ex.
> I've this products
> 
> SKU       COLOR
> 01    blu
> 02    yellow
> 03    red
> 04    blu
> 
> I want a select box with the color, so I've done
> 
> <select name=search1>
> <option value="">All colors</option>
>             
>                      [loop option=color search="
>                       ra=yes
>                       fi=products
>                       ml=50
>                       tf=color
>                 "]
>            
>                 <option value="[loop-data products color]"> [loop-data
> products color]</option>
>                 [/loop]
> </select>     
> 
> But so I have something like this parameters in my select box
> blu
> yellow
> red
> blu
> 
> It write 2 times blu....
> How can I have
> blu
> yellow
> red
> 
> without repeat blu?
> Thanks to everyone (sorry for my english)
> Rolando
> 
> 
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users
> 

Hi,

Set in your loop:
un= yes


>From the docs:
mv_unique

     If set to a true value, causes the sort to return only unique
     results. This operates on whatever the search return is, as
     defined by mv_return_fields.

I hope that helps.





Goetz Verdieck

E-Mail    Goetz.Verdieck@com4office.de