Re: Alpha Sort - ignore certain characters

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 52698
interpreted = N
texte = James Ziegler wrote: > Greetings! > > I want to do a nice simple sort of a bunch of song titles. No problem, > except that certain songs begin with an apostrophe or a quotation mark or > some other non-alpha character, i.e.: > > 'Round About Autumn > > So is there a way to make this product come up with the other "R" products > where it belongs, instead of at the beginning of the list? Any way to tell > the sort to ignore certain characters? > > Thanks. I suppose a good way to do this is originally have a "sorting" field. This field would take the title (when entered into the .db) and strip any wierd character/s from the start (and do any other mod needed) before populating that field. If this is not an option then, After adding the "sortfield" field into the .db, you could write a utility... something like: [search db=db.db&neTITLE_datarq=find_all] [founditems] [if ("[title]" ~ "'") | ("[title]" ~ "")] [then] [replacefounditems]sortfield=[url][newtitle][/url][/replacefounditems] [/then] [/if] [/founditems] [/search] Add as many comparisons as you would like to the if statement. Run the utility, Then you have a "sortfield" to where you can sort from. Cheers, Donovan > > -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design Developer / Consultant <-Web Development (specializing in eCommerce), -> <-Graphic Design, and Pre-Press Consultation -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design P.O. Box 260153 Madison, WI 53726-0153 PH:> 1.608.592.3567 email:> dbrooke@euca.us Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- 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:

    
  1. Re: Alpha Sort - ignore certain characters ( James Ziegler 2003)
  2. Re: Alpha Sort - ignore certain characters ( Donovan 2003)
  3. Re: Alpha Sort - ignore certain characters ( Charles Kline 2003)
  4. Alpha Sort - ignore certain characters ( James Ziegler 2003)
James Ziegler wrote: > Greetings! > > I want to do a nice simple sort of a bunch of song titles. No problem, > except that certain songs begin with an apostrophe or a quotation mark or > some other non-alpha character, i.e.: > > 'Round About Autumn > > So is there a way to make this product come up with the other "R" products > where it belongs, instead of at the beginning of the list? Any way to tell > the sort to ignore certain characters? > > Thanks. I suppose a good way to do this is originally have a "sorting" field. This field would take the title (when entered into the .db) and strip any wierd character/s from the start (and do any other mod needed) before populating that field. If this is not an option then, After adding the "sortfield" field into the .db, you could write a utility... something like: [search db=db.db&neTITLE_datarq=find_all] [founditems] [if ("[title]" ~ "'") | ("[title]" ~ "")] [then] [replacefounditems]sortfield=[url][newtitle][/url][/replacefounditems] [/then] [/if] [/founditems] [/search] Add as many comparisons as you would like to the if statement. Run the utility, Then you have a "sortfield" to where you can sort from. Cheers, Donovan > > -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design Developer / Consultant <-Web Development (specializing in eCommerce), -> <-Graphic Design, and Pre-Press Consultation -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design P.O. Box 260153 Madison, WI 53726-0153 PH:> 1.608.592.3567 email:> dbrooke@euca.us Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- 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/ Donovan

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:

raw=T is broken in [include] (1997) Variables for chat (1997) Shopping carts and reloading pages (1997) Merging databases (1997) Slightly OT: [sendmail] help (2003) syntax question, not in online refernce (1997) Still ignoring the 3.x bugs? (2000) IE, Layers, and Select (2002) OT: Jobseekers beware... (2003) Error .. (2003) [WebDNA] WebDNA 7 (2011) Speed Optimization - Mac (1997) web delivery (1997) did I miss anything (1997) WebCatalog can't find database (1997) [listfiles] nested in a [loop] (1998) RAM variables (1997) FlushDatabase Suggestion (1998) I can help! (1996) [quantity] within formulas (1997)