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:

killer-format in cart (1998) Calculating multiple shipping... (1997) delete after x (1998) UPS Quick Cost Calculator (1997) [WebDNA] 6.2 Monitor (2012) Encryption of E-mail (1998) Sorting Numbers (1997) Requiring that certain fields be completed (1997) WebCat & WebTen (1997) multiple search commands (1997) [WebDNA] Passing a text variable via copyfile (2019) [OT] Mozilla | Was: R.I.P. Netscape (2003) Problems deleting when a search field is blank... (1998) Error: Too many nested [xxx] contexts (1997) Tmp Database Files?!? (2003) Items in cart (2000) [WebDNA] [append] does not add the newline char at the end of the new record?! (which causes subsequent [search] to fail.) (2009) Adding up weights (1998) Search/sort in URL Was: GuestBook example (1997) WebCat2b15MacPlugin - [protect] (1997)