Frustration with formulas.db
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 25455
interpreted = N
texte = I'd like the taxRate to lookup on [State] if [ShipToState] is blank (so people don't have to enter a ShipToState seperately). My first thought is that this is easiest to do in formulas.db, something like:taxRate [interpret][lookup db=TaxRates.db&lookInField=State&value=[showif [ShipToState]>][ShipToState][/showif][showif [ShipToState]=][State][/showif]&returnField=taxRate¬Found=0.00][/interpret]which seems to return the proper tax rate based on the value in [State], but the builtin [taxTotal] value always returns 0.00. Does this come from someplace else than [taxRate]*[taxableTotal]?A second, maybe related question, concerns ShipCosts.db. We want to charge $4 for the first item, and $2 for each item thereafter. Again, I thought it easiest to use this formula in ShipCosts.db:Shiptype [math]2.00+([lineitems](1*[quantity])[/lineitems])[/math]the logic here being $2.00 plus ($2 * the number of items), but this doesn't seem to work, either (even wrapped in [interpret])Can I not use formulas like [math] and [showif] in lookups like these?Thanks in advance,Kevin Lippert-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to
.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
Associated Messages, from the most recent to the oldest:
I'd like the taxRate to lookup on [State] if [ShipToState] is blank (so people don't have to enter a ShipToState seperately). My first thought is that this is easiest to do in formulas.db, something like:taxRate [interpret][lookup db=TaxRates.db&lookInField=State&value=[showif [ShipToState]>][ShipToState][/showif][showif [ShipToState]=][State][/showif]&returnField=taxRate¬Found=0.00][/interpret]which seems to return the proper tax rate based on the value in [State], but the builtin [taxTotal] value always returns 0.00. Does this come from someplace else than [taxRate]*[taxableTotal]?A second, maybe related question, concerns ShipCosts.db. We want to charge $4 for the first item, and $2 for each item thereafter. Again, I thought it easiest to use this formula in ShipCosts.db:Shiptype [math]2.00+([lineitems](1*[quantity])[/lineitems])[/math]the logic here being $2.00 plus ($2 * the number of items), but this doesn't seem to work, either (even wrapped in [interpret])Can I not use formulas like [math] and [showif] in lookups like these?Thanks in advance,Kevin Lippert-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .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
Kevin Lippert
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:
FW: About that math question ... (2003)
Re:quit command on NT (1997)
WebCat2b13MacPlugIn - syntax to convert date (1997)
PIXO support (1997)
SiteGaurd file Cache vs webcatalog cache (1997)
Forms Search Questions (1997)
Emailer (1997)
WebCatalog vs. Cold Fusion (1998)
[HIDEIF] inside [FOUNDITEM] (1997)
emailer setup (1997)
MacAuthorize Problem (1998)
SSL and WebCatalog (1997)
Email/Order to fax? (2003)
Selling WebDNA as a solution (2003)
TEXTA-D (2003)
Search Results (1998)
test (2004)
WebCat2b12 forgets serial # (1997)
Delete only one duplicate record? (2003)
sandboxes with 6.0 (2004)