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:
customizing the color of user's pages (1997)
Sku numbers (1997)
send mail problem? (1997)
Server slowing down. (1997)
Searching Relational Databases (2004)
Include a big block of text (1997)
Server capacity (2003)
I'm new be kind (1997)
RE: Re:Signal Raised (1997)
WebCommerce: Folder organization ? (1997)
Upgrading to 4.0 (2000)
[random] only for 1-100??? (1997)
Adding insurance to an order, round 2 (2003)
Date Formats (1997)
SFTP (2004)
format crash! (1997)
The List is Changing (1997)
[SearchString] problem with [search] context (1997)
Trouble with formula.db (1997)
[OT] 'Email this story to a friend' (2003)