[ic] loop select drop down menu from delimited field

Jamie Neil interchange-users@icdevgroup.org
Tue Jun 3 09:34:00 2003


> -----Original Message-----
> From: interchange-users-admin@icdevgroup.org
> [mailto:interchange-users-admin@icdevgroup.org]On Behalf Of Tom Luong
> Sent: 03 June 2003 14:13
> To: interchange-users@icdevgroup.org
> Subject: [ic] loop select drop down menu from delimited field
>
>
> I would like to loop a drop down menu. However, the column I want to loop
> has several values delimited by a comma.
> 1,5,6,7
> 2,3
> 4,8,9
>
> I would like the dropdown menu to show
> 1
> 2
> 3
> 4
> 5
> ... etc
> instead of
> 1,5,6,7
> 2,3
> 4,8,9
>
> this is the code I have so far,
> <select name=mv_searchspec>
> <option value=""> --Select One--
>       [loop search="
>          fi=products
>          st=db
>          rf=year
>          tf=year
>          un=yes
>       "]
>  <OPTION VALUE="[loop-code]"> [loop-code]
>  [/loop]
> </select>
>
> any suggestion?

I would use perl. Join your search results together using the same comma
delimiter, write it to a scratch variable and then use:

[loop list="[scratch chosenvariable]"]
[/loop]

Jamie

> I guessing it may have something to do with index_delim or
> return_delim, but
> I haven't been able to get it to work.
>
> TIA,
>
> tom
>
>
> _______________________________________________
> interchange-users mailing list
> interchange-users@icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
>