Re: Unique Sort
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 48457
interpreted = N
texte = stephen 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/
Associated Messages, from the most recent to the oldest:
stephen 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/
John Peacock
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:
WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997)
Re[2]: 2nd WebCatalog2 Feature Request (1996)
Date field search needs ... (1998)
Multiple prices (1997)
[WebDNA] Help with STMP Setup using Authentication with Google (2016)
grep question - how to strip spaces from the beginning of astring? (2002)
WebCatalog can't find database (1997)
[format] (1998)
YACBQ.....(Yet another checkbox question) (2000)
Trying to loop for letters (1999)
return missing item (was:WebCat Sales) (1997)
Problem with shownext (2003)
NetSplat and WebCat2 (1997)
Menu to select product variations (1997)
Add to Cart & List of Products (1997)
[WebDNA] WebDNA slow processing (2011)
Encyption mail was Suggestions for Topics ... (1998)
Fedora Core 6 (2007)
Applescript, WebDNA, and PDF (1997)
Running _every_ page through WebCat ? (1997)