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 databaseare UPPERCASE, then put the [shiptostate] tag inside a [uppercase]context, like this:[lookupdb=TaxRates.db&lookInField=State&value=[uppercase][ShipToState][/uppercase]&returnField=taxRate¬Found=0.00]Sincerely,Ken Gromeken@iav.com808-737-6499WebDNA Solutionshttp://webdna.net/
Associated Messages, from the most recent to the oldest:
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 databaseare UPPERCASE, then put the [shiptostate] tag inside a [uppercase]context, like this:[lookupdb=TaxRates.db&lookInField=State&value=[uppercase][ShipToState][/uppercase]&returnField=taxRate¬Found=0.00]Sincerely,Ken Gromeken@iav.com808-737-6499WebDNA Solutionshttp://webdna.net/
Kenneth Grome
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...