Knowing the Row number is vital here, so you need to know the row number
of "C".

<@ASSIGN local$Objects <@SORT ARRAY="Objects" COLS="2 NUM ASC"
SCOPE="Local">>
<@FOR START=1 STOP=<@NUMROWS ARRAY="local$Objects">>
<@IF EXPR="local$Objects[<@CURROW>,1] = 'C'">
        <@ASSIGN local$origpriority @@local#Object[<@CURROW>,2]>
        <@ASSIGN local$currow <@currow>">>
        <@ASSIGN local$nextrow <@calc expr="<@currow>+1>">>
        <@BREAK>
</@IF>
</@FOR>
<@ASSIGN local$Objects[@@local$currow,2] <@calc
expr="<@@local$origpriority+1>">>
<@ASSIGN local$Objects[@@local$nextrow,2] @@local$origpriority>>
<@ASSIGN local$Objects <@SORT ARRAY="Objects" COLS="2 NUM ASC"

Something like this ;-b

Ben Johansen - http://www.pcforge.com
Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm 
Latest downloads & List Archives @ http://www.witango.ws


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Peter Fogg
Sent: Thursday, May 30, 2002 9:48 AM
To: Multiple recipients of list witango-talk
Subject: Witango-Talk: Sort and Renumber question

I am sure I am just being retarded but I am having problems with
something
that I thought would be relatively simple.

I have a list of objects

Identifier Original Order Priority
a 1
b 2
c 3
d 4
e 5
changed the priority of c to 4 Identifier New Order Priority
a 1
b 2
c 4 <- changed to 4
d 4
e 5
I want to then renumber the priority Identifier Final Order Priority
a 1
b 2
d 3 <- modified the priority
c 4 <- now in proper order
e 5

This is what I want to do. I hope this is clear enough, if not yell at
me. I
want the item with a new priority to bump the item with its matching
criteria up.

________________________________________________________________________
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