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:

Problems with [Applescript] (1997) mac hack (1997) Country & Ship-to address & other fields ? (1997) Is there a max number of fields? (1998) [ModDate] & [ModTime] ? (1997) multi-paragraph fields (1997) Can WC remember people? (1998) 2nd try: possible to weight results of grouped fieldssearch? (1998) WCS Newbie question (1997) tcpconnect - username/password (2005) Multiple fields on 1 input (1997) Possible Bug in 2.0b15.acgi (1997) WebCommerce: Folder organization ? (1997) WriteFile and returns... (2000) Bugs in IE 6.0 ? (2003) select multiple (1997) I have troubles to send message out (1998) [WebDNA] Grep out square brackets? (2010) I can help! (1996) Checkboxes (1998)