I was wondering if someone could review this code before I test it. I want
to insert a "All Listing Classes" row as the category (first field in the
array) changes in the array.

<@ASSIGN NAME="Cat2" VALUE="@@resultSet" SCOPE="User">
<@ROWS START=1 STEP=1 ARRAY="Cat2">
<@IF EXPR="@@User$Cat2[<@CURROW>,1] =! <@VAR NAME=CatTest SCOPE='Local'>">
        <@ASSIGN NAME="temp" ROWS="1" COLUMNS="4" VALUE="<@ARRAY
VALUE='<@VAR NAME=CatTest SCOPE="Local">,99999,All Listing Classes,99999;'
CDELIM=',' RDELIM=';'>" SCOPE="Local"> 
        <@ADDROWS ARRAY="Cat2" VALUE="@@Local$temp" POSITION="<@CURROW>-1"
SCOPE="User">
</@IF>
<@ASSIGN NAME="CatTest" VALUE="@@User$Cat2[<@CURROW>,1]" SCOPE="Local">
</@ROWS>

Should I start it at 0 instead of 1 as it is an array?

I want to insert a row before the 1st row in the array. If it trys to insert
into <@CURRROW>-1 when the index is 0 or 1, will it do something else?

I'm concerned this code may put my server in an endless loop. When it
inserts a row into <@CURRROW>-1, and the next iteration executes, will it
read the same row it just read because that row was moved up one position?

Thanks

Steve Fogelson
Internet Commerce Solutions

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

Reply via email to