Re: case sensitivity in lookups

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 15763
interpreted = N
texte = >Using the GeneralStore method of determining Sales Tax charges, the >abbreviation of the Ship-To state is requested value=[ShipToState] size=2> in the ShoppingCart.tmpl and the Invoice.tmpl >calls the taxRate formula [lookup >db=TaxRates.db&lookInField=State&value=[ShipToState]&returnField=taxRate¬Fou >n >d=0.00] > >I've discovered in testing that if the TaxRates.db has the State field >entries as VA then a person who is lazy and enters as va, or a person >who is old-school and enters as Va is treated as notFound. It appears >that the lookup is case sensitive.Yes, that's right, lookups are case sensitive.>Is there a way around this case >sensitivity?Yes there is. Make SURE all your state abbreviations in the database are UPPERCASE, then put the [shiptostate] tag inside a [uppercase] context, like this:[lookup db=TaxRates.db&lookInField=State&value=[uppercase][ShipToState][/uppercase]&retu rnField=taxRate¬Found=0.00]Sincerely, Ken Grome ken@iav.com 808-737-6499 WebDNA Solutions http://webdna.net/ Associated Messages, from the most recent to the oldest:

    
  1. Re: case sensitivity in lookups (Grant Hulbert 1997)
  2. Re: case sensitivity in lookups (John Hill 1997)
  3. case sensitivity in lookups (Jim Turney 1997)
  4. Re: case sensitivity in lookups (Kenneth Grome 1997)
>Using the GeneralStore method of determining Sales Tax charges, the >abbreviation of the Ship-To state is requested value=[ShipToState] size=2> in the ShoppingCart.tmpl and the Invoice.tmpl >calls the taxRate formula [lookup >db=TaxRates.db&lookInField=State&value=[ShipToState]&returnField=taxRate¬Fou >n >d=0.00] > >I've discovered in testing that if the TaxRates.db has the State field >entries as VA then a person who is lazy and enters as va, or a person >who is old-school and enters as Va is treated as notFound. It appears >that the lookup is case sensitive.Yes, that's right, lookups are case sensitive.>Is there a way around this case >sensitivity?Yes there is. Make SURE all your state abbreviations in the database are UPPERCASE, then put the [shiptostate] tag inside a [uppercase] context, like this:[lookup db=TaxRates.db&lookInField=State&value=[uppercase][ShipToState][/uppercase]&retu rnField=taxRate¬Found=0.00]Sincerely, Ken Grome ken@iav.com 808-737-6499 WebDNA Solutions http://webdna.net/ Kenneth Grome

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:

Clickable Maps (1996) Text Areas, Sendmail and returns.... (2002) HTML Editors (1997) 2.0.1 new commands and contexts (1997) New Command prefs ... (1997) Document Contains No Data! (1997) Q on the best way to set up a security function so users can edit records (1999) counting characters and/or words (1997) could someone please try this - it's very quick and easy (2000) RE: Need Help (1998) Running subtotal? (1998) Help! WebMerchant store suddenly won't process orders... (2001) PCS Frames (1997) form data submission gets truncated (1997) headers in webcat 4.0. (2000) RE: Formulas.db + Users.db (1997) Merchant account (1998) Re:Running 2 two WebCatalog.acgi's (1996) Number searching/formats (1998) Problems getting parameters passed into email. (1997)