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:

Emailer... DOA but still twitching (2007) No luck with taxes (1997) (OFF TOPIC) System 8.5.1 FINDER ERROR (1999) Out of the woodwork (2007) mailto: tag (2001) Tab Charactor (1997) [ADDLINEITEM] hangs Web* (1998) [WebDNA] SQL with Webdna - good ideas? (2018) subscribe (2002) Searchable WebCat (etc.) Docs ? (1997) Databases (2000) Draft Manual, Tutorial, and more (1997) [ReturnRaw] and hiding FORM data (2003) Help needed! (1998) Searching multiple Databases (1997) FoundItems Question (1998) Carrying Forward (1998) I give up!! (1997) WC2.0 Memory Requirements (1997) Just Testing (1997)