<SELECT NAME="PROGRAM" SIZE=1>
<OPTION VALUE="" SELECTED>- All Programs -
<@ROWS START=1 STEP=1 ARRAY="<@FILTER ARRAY='Domain$ProgramArray'
EXPR='"#STATUS" = "0"'>">
<OPTION VALUE="<@COL 1>" ><@COL 2>
</@ROWS>
</SELECT>

Note: you can't use column names with this method.  If this is a problem,
you could loop through the columns and assign variables based on the column
names and use the variables.

Example:
<@ROWS ARRAY="Domain$ProgramArray"><@COLS>
<@ASSIGN "col_<@COL 1>" SCOPE="local" VALUE="<@CURCOL>">
</@COLS>/@ROWS

You could also put an @IF statement in there if you only needed the names of
particular columns.  Then your SELECT would look like this:

<SELECT NAME="PROGRAM" SIZE=1>
<OPTION VALUE="" SELECTED>- All Programs -
<@ROWS START=1 STEP=1 ARRAY="<@FILTER ARRAY='Domain$ProgramArray'
EXPR='"#STATUS" = "0"'>">
<OPTION VALUE="<@COL @@local$col_VALUE>" >
<@COL @@local$col_SELECT_NAME>
</@ROWS>
</SELECT>

Joanna Ruth Wirtz
Internet Applications Programmer
Christianity Today International

www.ChristianityToday.com

----- Original Message -----
From: "Kent Swisher" <[EMAIL PROTECTED]>
To: "Multiple recipients of list witango-talk" <[EMAIL PROTECTED]>
Sent: Friday, July 12, 2002 6:01 PM
Subject: Witango-Talk: Filter and rows loop


> I store frequently used lists in domain variable arrays and use them in
> select lists like:
>
> <SELECT NAME="PROGRAM" SIZE=1>
> <OPTION VALUE="" SELECTED>- All Programs -
> <@ROWS START=1 STEP=1 ARRAY="Domain$ProgramArray">
> <OPTION VALUE="<@VAR Domain$ProgramArray[<@CURROW>,VALUE]>" >
> <@VAR Domain$ProgramArray[<@CURROW>,SELECT_NAME]>
> </@ROWS>
> </SELECT>
>
> I would like to create the select list using a filtered array.  I know I
> could use filter and save to another array which is used for the select.
>
> <@ASSIGN Domain@FilteredProgramArray VALUE="<@FILTER
> ARRAY='Domain$ProgramArray' EXPR='#STATUS = 0'>">
>
> I could also use and If statement within the rows loop.
>
> <@ROWS START=1 STEP=1 ARRAY="Domain$ProgramArray">
> <@IF EXPR='<@VAR Domain$ProgramArray[<@CURROW>,STATUS]> = 0'
> TRUE='<OPTION VALUE="<@VAR Domain$ProgramArray[<@CURROW>,VALUE]>" >
> <@VAR Domain$ProgramArray[<@CURROW>,SELECT_NAME]>'
> FALSE=''>
> </@ROWS>
>
> Is there some way to do a rows loop on a filtered array without
> assigning the filter results to a new var?
>
> -> Kent Swisher                   Application Support Engineer
> -> Alcatel USA                    Eng Services Supervisor
> -> Wireline Access Products       Eng Srvcs Content Mgr/Webmaster
> -> Petaluma, CA                   [EMAIL PROTECTED]
> ________________________________________________________________________
> TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
>                 with unsubscribe witango-talk in the message body
>

________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to