Michael, There may be other ways but you could do it with a <@sort> tag.
<@sort yourArray cols="1 desc, 2 desc"> <@assign newArray @@yourArray[1,*]> <- this will give you red 4 <@sort yourArray cols="2 desc, 1 desc"> <@addrows array=newArray value="@@yourArray[1,*]"> <-- add blue 5 You could almost do it with a filter tag: <@filter yourArray expr="(#1=max(@@yourArray[*,1])) or (#2=max(@@yourArray[*,2]))"> but you would end up with 3 'red's Dave. > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of ServerSmiths Tango > Development > Sent: Wednesday, May 22, 2002 1:02 AM > To: Multiple recipients of list witango-talk > Subject: Witango-Talk: I need to mangle the <@DISTINCT> tag > > > > > I need to build an array and get the <@DISTINCT> rows but I only want the > rows with the highest number in one of the columns. > > so if I have > > blue 5 > red 1 > red 2 > blue 1 > blue 3 > red 4 > > > I only want > red 4 and blue 5. > > Is there a way to get the <@DISTINCT> tag to do this or do I have to sift > through it manually? > > Any tips/info are appreciated. > > Thanks, > > > Michael Heth > Web Information Architect > > > __________________S E R V E R S M I T H S__________________ > > http://www.serversmiths.com/ > > Technology Infrastructure Provider > > I N T E R N E T P R E S E N C E S O L U T I O N S > > | EWordSmith | LightningSite | Enigma.Engine | > > ________M A R I N C O U N T Y C A L I F O R N I A________ > > ________________________________________________________________________ > 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
