Re: Unique Sort
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 48459
interpreted = N
texte = It kind of works, but it is repeating, I get this:3 3M - OFFICE & STATIONARY DIVISION 3M - OFFICE & STATIONARY DIVISION 3 3M VISUAL SYSTEMS DIVISION 3M VISUAL SYSTEMS DIVISION A APRICORN MASS STORAGE APRICORN MASS STORAGE B BELKIN COMPONENTS BELKIN COMPONENTS B BROTHER INT L (SUPPLIES) BROTHER INT L (SUPPLIES) -----Original Message-----From: John Peacock [mailto:jpeacock@rowman.com]Sent: Thursday, March 06, 2003 11:15 AMTo: WebDNA TalkSubject: Re: Unique Sortstephen wrote:> How can sort my results in the following format:> > 3> 3M > 3M Visual Systems Division > > A> Acer Latin America > Apricorn Mass Storage > > B> Belkin Components > Brother Int'l (printers) > No tested code, just ideas...First, do a summary sort on whatever field you are talking about. Next, create a text variable for the header and set it to blank. Then, in the [founditems] loop, grab the first character of the next record and see if it is the same as the existing header value; if not, set the header value to be that new character and do whatever formatting you want to seperate the sections.Sort of like this:[search db=blah&so-on] [text]heading=[/text] [founditems] [if [heading]![getchars start=1&end=1][yourfield][/getchars]] [text]heading=[getchars start=1&end=1][yourfield][/getchars][/text]
[heading] [/if] [yourfield] [/founditems][/search]HTHJohn-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4501 Forbes BoulevardSuite HLanham, MD 20706301-459-3366 x.5010fax 301-429-5748-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
It kind of works, but it is repeating, I get this:3 3M - OFFICE & STATIONARY DIVISION 3M - OFFICE & STATIONARY DIVISION 3 3M VISUAL SYSTEMS DIVISION 3M VISUAL SYSTEMS DIVISION A APRICORN MASS STORAGE APRICORN MASS STORAGE B BELKIN COMPONENTS BELKIN COMPONENTS B BROTHER INT L (SUPPLIES) BROTHER INT L (SUPPLIES) -----Original Message-----From: John Peacock [mailto:jpeacock@rowman.com]Sent: Thursday, March 06, 2003 11:15 AMTo: WebDNA TalkSubject: Re: Unique Sortstephen wrote:> How can sort my results in the following format:> > 3> 3M > 3M Visual Systems Division > > A> Acer Latin America > Apricorn Mass Storage > > B> Belkin Components > Brother Int'l (printers) > No tested code, just ideas...First, do a summary sort on whatever field you are talking about. Next, create a text variable for the header and set it to blank. Then, in the [founditems] loop, grab the first character of the next record and see if it is the same as the existing header value; if not, set the header value to be that new character and do whatever formatting you want to seperate the sections.Sort of like this:[search db=blah&so-on] [text]heading=[/text] [founditems] [if [heading]![getchars start=1&end=1][yourfield][/getchars]] [text]heading=[getchars start=1&end=1][yourfield][/getchars][/text]
[heading] [/if] [yourfield] [/founditems][/search]HTHJohn-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4501 Forbes BoulevardSuite HLanham, MD 20706301-459-3366 x.5010fax 301-429-5748-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
stephen
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Problems with [Applescript] (1997)
RE: Web*SSL and WebCatalog (1997)
WebCat2 - Getting to the browser's username/password data (1997)
$Quit, $CloseDatabase corrections (1997)
# fields limited? (1997)
Base64 encryption limitations? (1999)
Windows nt service pack 3 upgrade (1997)
Frames and WebCat (1997)
Serial Number Question (1997)
Faxing orders in place of email (1997)
Help! WebCat2 bug (1997)
5.0 Pricing (2003)
I'm tired of all this! (2000)
Listing parameters passed into a [function] (2003)
Searching for more than one catagory (2000)
WebDNA 4.5 on CentOS (2006)
Multiple catalog databases and showcart (1997)
Searching for the end (1998)
RE: New WebCatalog Version !!! (1997)
Flash 4 Examples (2000)