Re: Forumulas.db & Variables
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 45849
interpreted = N
texte = If this isn't working only one of two possibilities exist:1) Formulas.db is in the wrong path2) ShipVia isn't being filled in for some reason, or isn't being filled in with what you expect. Could be permissions if you're on OSXI'd put this on the page your looking to have the formula work:[orderfile cart=[cart]]Shipvia=[shipvia][/orderfile]What does [shipvia] return there?-WillOn Sunday, December 1, 2002, at 09:16 PM, Donovan Brooke wrote:> price [lookup> db=data/products.db&lookinfield=sku&value=[url][sku][/ > url]&returnfield=price]>> taxRate [showif [url][state][/url]=WA]8.25[/showif]0>> shipCost [showif [ShipVia]=1]5[/showif][showif > [ShipVia]=2]10[/showif][showif> [ShipVia]=3]15[/showif]100>> taxable T>> Jesse, I think you are going to find that your system here will give > your false> values.> for example:> if your shipvia is 1, I think you will end up with a ship cost of > $1100.00.>> Do this instead.> [if [shipvia]=1][then]5[/then][else][if> [ShipVia]=2][then]10[/then][else][if> [ShipVia]=3][then]15[/then][else]100[/else][/if][/else][/if][/ > else][/if]>> Donovan>> (your taxrate code will work since if it is WA the number will end up > 8.250)>>>>> Jesse Williams-Proudman wrote:>>> On 12/1/02 11:19 AM, WJ Starck
wrote:>>>>> Show us what your formula in formulas.db looks like...>>>> Well, this was just for testing:>>>> price [lookup>> db=data/products.db&lookinfield=sku&value=[url][sku][/ >> url]&returnfield=price>> ]>>>> taxRate [showif [url][state][/url]=WA]8.25[/showif]0>>>> shipCost [showif [ShipVia]=1]5[/showif][showif>> [ShipVia]=2]10[/showif][showif [ShipVia]=3]15[/showif]100>>>> taxable T>>>> I also tried wrapping taxrate and shipcost in [orderfile] and that >> didn't>> work.>>>> -->>>>> -------------------------------------------------------------> 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/>-------------------------------------------------------------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:
If this isn't working only one of two possibilities exist:1) formulas.db is in the wrong path2) ShipVia isn't being filled in for some reason, or isn't being filled in with what you expect. Could be permissions if you're on OSXI'd put this on the page your looking to have the formula work:[orderfile cart=[cart]]Shipvia=[shipvia][/orderfile]What does [shipvia] return there?-WillOn Sunday, December 1, 2002, at 09:16 PM, Donovan Brooke wrote:> price [lookup> db=data/products.db&lookinfield=sku&value=[url][sku][/ > url]&returnfield=price]>> taxRate [showif [url][state][/url]=WA]8.25[/showif]0>> shipCost [showif [ShipVia]=1]5[/showif][showif > [ShipVia]=2]10[/showif][showif> [ShipVia]=3]15[/showif]100>> taxable T>> Jesse, I think you are going to find that your system here will give > your false> values.> for example:> if your shipvia is 1, I think you will end up with a ship cost of > $1100.00.>> Do this instead.> [if [shipvia]=1][then]5[/then][else][if> [ShipVia]=2][then]10[/then][else][if> [ShipVia]=3][then]15[/then][else]100[/else][/if][/else][/if][/ > else][/if]>> Donovan>> (your taxrate code will work since if it is WA the number will end up > 8.250)>>>>> Jesse Williams-Proudman wrote:>>> On 12/1/02 11:19 AM, WJ Starck wrote:>>>>> Show us what your formula in formulas.db looks like...>>>> Well, this was just for testing:>>>> price [lookup>> db=data/products.db&lookinfield=sku&value=[url][sku][/ >> url]&returnfield=price>> ]>>>> taxRate [showif [url][state][/url]=WA]8.25[/showif]0>>>> shipCost [showif [ShipVia]=1]5[/showif][showif>> [ShipVia]=2]10[/showif][showif [ShipVia]=3]15[/showif]100>>>> taxable T>>>> I also tried wrapping taxrate and shipcost in [orderfile] and that >> didn't>> work.>>>> -->>>>> -------------------------------------------------------------> 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/>-------------------------------------------------------------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/
WJ Starck
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:
WebCat2.0 [format thousands .0f] no go (1997)
[WebDNA] Crashing again (2008)
RequiredFields template (1997)
Re:quit command on NT (1997)
[group] ? (1997)
RE: OK, here goes... (1997)
script.tpl from shell?! (2003)
One per customer (2000)
Target wit redirect (1998)
WebDNA CAPTCHA (2008)
Slow Server (2005)
Best way to download a db (2003)
MATH (1998)
Help! WebCat2 bug (1997)
Fileinfo... (2000)
Quit revisited (1997)
[WebDNA] Grep help - catch all URLs (2010)
ShoppingCart clearing code (2004)
WebCat2b13MacPlugIn - More limits on [include] (1997)
WebCat2b12--[searchstring] bug (1997)