Re: [lookup] is case-sensitive, [lookup] is case sensitive...

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 50891
interpreted = N
texte = >I spoke too soon....Anybody see any syntax errors with the following >code? My brain hurts. > >------------------------------------------------------------------------------------------------- >[format .2f][math][payment_gross]-([lookup >db=IPN.db&lookinfield=INVOICE&value=[invoice]&returnfield=CPG_subtotal]+[tax]+[payment_fee])[/math][/format] >------------------------------------------------------------------------------------------------- From what I recall, the only parameter in a lookup that's case sensitive is the value parameter.In your code above, a problem may arise if the value in the CPG_subtotal field is not a number, or if the [payment_gross] or [tax] or [payment_fee] values are not all numbers, because then the math won't work, and that will cause the format to fail as well.You may want to use the notfound=0 parameter in the lookup to insure that if the lookup fails, the resulting value will be a number instead of null. Of course this will not help if any other variable value mentioned above is not numeric.Check all the variable values to make sure they are all numbers before giving up. Oh, and you really do not need the parentheses in the expression in the math context ... :) -- Sincerely, Kenneth Grome ------------------------------------------------------------- My programmers write WebDNA code at $18 an hour or less! -------------------------------------------------------------------------------------------------------------------------- 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: [lookup] is case-sensitive, [lookup] is case sensitive... (Dan Strong 2003)
  2. Re: [lookup] is case-sensitive, [lookup] is case sensitive... (Kenneth Grome 2003)
  3. Re: [lookup] is case-sensitive, [lookup] is case sensitive... (Dan Strong 2003)
  4. Re: [lookup] is case-sensitive, [lookup] is case sensitive... (WebCat @ Inkblot Media 2003)
  5. Re: [lookup] is case-sensitive, [lookup] is case sensitive... (WJ Starck 2003)
  6. Re: [lookup] is case-sensitive, [lookup] is case sensitive... (Dan Strong 2003)
  7. [lookup] is case-sensitive, [lookup] is case sensitive... (Dan Strong 2003)
>I spoke too soon....Anybody see any syntax errors with the following >code? My brain hurts. > >------------------------------------------------------------------------------------------------- >[format .2f][math][payment_gross]-([lookup >db=IPN.db&lookinfield=INVOICE&value=[invoice]&returnfield=CPG_subtotal]+[tax]+[payment_fee])[/math][/format] >------------------------------------------------------------------------------------------------- From what I recall, the only parameter in a lookup that's case sensitive is the value parameter.In your code above, a problem may arise if the value in the CPG_subtotal field is not a number, or if the [payment_gross] or [tax] or [payment_fee] values are not all numbers, because then the math won't work, and that will cause the format to fail as well.You may want to use the notfound=0 parameter in the lookup to insure that if the lookup fails, the resulting value will be a number instead of null. Of course this will not help if any other variable value mentioned above is not numeric.Check all the variable values to make sure they are all numbers before giving up. Oh, and you really do not need the parentheses in the expression in the math context ... :) -- Sincerely, Kenneth Grome ------------------------------------------------------------- My programmers write WebDNA code at $18 an hour or less! -------------------------------------------------------------------------------------------------------------------------- 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/ 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:

WebMerchant 1.6 and SHTML (1997) Dummy Form Variables Needed (2000) WC Database Format (1997) Making Thumbnail Graphics (1997) lineitems are gone (1998) Many $WebCat.exe processes (1998) Database Advice (1996) Web Catalog vs. ICAT (1997) Requiring that certain fields be completed (1997) Robert Minor duplicate mail (1997) shopping cart bug? or link? (1999) denied access (1997) WebCatb15 Mac CGI -- [purchase] (1997) Upload and WebCat (1998) SQL statements (2002) [WebDNA] DigitalOcean Snapshots (2019) OK, here goes... (1997) ListFiles and .DS_Store (2004) Improperly coded search fails ... (2003) Setting up shop (1997)