Trouble with formula.db

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 10905
interpreted = N
texte = In the invoice.tmpl we have the customer enter all the billing and shipping address information. In the final_invoice.tmpl we display the relevant information, costs, etc. and have a purchase button for them to hit.However, I cannot get the shipCost value to calculate from the formula.db.I have placed the exact same formula (below) in the final_invoice.tmpl page (to see that it does work) that I have in the formula.db for shipCost.[hideif [totalWeight]>0.5][lookup db=country_cost_list.db&lookInField=country&value=[hideif [ShipToCountry]=Specify_Country][ShipToCountry][/hideif][showif [ShipToCountry]=Specify_Country][Country][/showif]&returnField=half_lb][/hi deif] [showif [totalWeight]>0.5][hideif [totalWeight]>5][lookup db=country_cost_list.db&lookInField=country&value=[hideif [ShipToCountry]=Specify_Country][ShipToCountry][/hideif][showif [ShipToCountry]=Specify_Country][Country][/showif]&returnField=[math]ceil([ totalWeight])[/math]][/hideif][showif [totalWeight]>5][math][lookup db=country_cost_list.db&lookInField=country&value=[hideif [ShipToCountry]=Specify_Country][ShipToCountry][/hideif][showif [ShipToCountry]=Specify_Country][Country][/showif]&returnField=5]+(ceil([to talWeight])-5)*[lookup db=country_cost_list.db&lookInField=country&value=[hideif [ShipToCountry]=Specify_Country][ShipToCountry][/hideif][showif [ShipToCountry]=Specify_Country][Country][/showif]&returnField=addl_lb][/ma th][/showif][/showif]If I place [shipCost] in the final_invoice.tmpl all I see is always zero. The above formula displays the proper costs in final_invoice.tmpl, but doesn't work in the formula.db, so what am I hung on?Curt ---------------------------------------------------------------------- | William Curt Eggemeyer Curt@mail.bzzzzzz.com | | BeeHive Technologies, Inc. | | http://www.bzzzzzz.com with a WebCam in Pasadena, California | ---------------------------------------------------------------------- Associated Messages, from the most recent to the oldest:

    
  1. Re: Progress !! WAS: Trouble with formula.db (Sven U. Grenander 1997)
  2. Re: Progress !! WAS: Trouble with formula.db (Grant Hulbert 1997)
  3. Progress !! WAS: Trouble with formula.db (Sven U. Grenander 1997)
  4. Re: Trouble with formula.db + more explanation (Grant Hulbert 1997)
  5. Re: Trouble with formula.db (Grant Hulbert 1997)
  6. Re: Trouble with formula.db + more explanation (w curt eggemeyer 1997)
  7. Re: Trouble with formula.db (Sven U. Grenander 1997)
  8. Re: Trouble with formula.db (Grant Hulbert 1997)
  9. Re: Trouble with formula.db (Sven U. Grenander 1997)
  10. Trouble with formula.db (w curt eggemeyer 1997)
In the invoice.tmpl we have the customer enter all the billing and shipping address information. In the final_invoice.tmpl we display the relevant information, costs, etc. and have a purchase button for them to hit.However, I cannot get the shipCost value to calculate from the formula.db.I have placed the exact same formula (below) in the final_invoice.tmpl page (to see that it does work) that I have in the formula.db for shipCost.[hideif [totalWeight]>0.5][lookup db=country_cost_list.db&lookInField=country&value=[hideif [ShipToCountry]=Specify_Country][ShipToCountry][/hideif][showif [ShipToCountry]=Specify_Country][Country][/showif]&returnField=half_lb][/hi deif] [showif [totalWeight]>0.5][hideif [totalWeight]>5][lookup db=country_cost_list.db&lookInField=country&value=[hideif [ShipToCountry]=Specify_Country][ShipToCountry][/hideif][showif [ShipToCountry]=Specify_Country][Country][/showif]&returnField=[math]ceil([ totalWeight])[/math]][/hideif][showif [totalWeight]>5][math][lookup db=country_cost_list.db&lookInField=country&value=[hideif [ShipToCountry]=Specify_Country][ShipToCountry][/hideif][showif [ShipToCountry]=Specify_Country][Country][/showif]&returnField=5]+(ceil([to talWeight])-5)*[lookup db=country_cost_list.db&lookInField=country&value=[hideif [ShipToCountry]=Specify_Country][ShipToCountry][/hideif][showif [ShipToCountry]=Specify_Country][Country][/showif]&returnField=addl_lb][/ma th][/showif][/showif]If I place [shipCost] in the final_invoice.tmpl all I see is always zero. The above formula displays the proper costs in final_invoice.tmpl, but doesn't work in the formula.db, so what am I hung on?Curt ---------------------------------------------------------------------- | William Curt Eggemeyer Curt@mail.bzzzzzz.com | | BeeHive Technologies, Inc. | | http://www.bzzzzzz.com with a WebCam in Pasadena, California | ---------------------------------------------------------------------- w curt eggemeyer

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:

Directory Overload (1998) Upgrading old WebCat Database Files (1997) Price problem (1997) WebCat2b12 CGI Mac - [shownext] problem (1997) Format question WC Mac f3 (1997) Email notification to one of multiple vendors ? (1997) Adding Text (2000) [ShowNext] (1997) Buying sans cart (1997) Emailing html (1998) For those of you not on the WebCatalog Beta... (1997) Limit on amount of data browsers can parse? (2003) Databases inside [SHOWIF] (1998) [WebDNA] Friday's.. WIP thread (2009) Emailer S-L-O-W-N-E-S-S (2002) [WriteFile] problems (1997) Setting up shop (1997) Re:2nd WebCatalog2 Feature Request (1996) Can you do this??? and other stuff (1997) WebCat2b13MacPlugin - [math][date][/math] problem (1997)