Re: Shipcost formula
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 59121
interpreted = N
texte = I don't see anything wrong with your formulas.db, it is straight forward enough.All I can suggest is to make sure that [destination] is populating as it should be. Add some debugging to the template where formulas.db is applied, something like this at the top of the page {You can also add the lookups below that to see that they are working properly}:[!]--FOR DEBUGGING ONLY, REMOVE AFTER USE--[/!]DESTINATION: [destination]
SUBTOTAL: [subtotal]
UNDER 200: [lookup db=shipcostings.db&lookInfield=destination&value=[destination]&returnfield=shipcostvalue]
OVER 199: [lookup db=shipcostings.db&lookInfield=destination&value=[destination]&returnfield=offership][!]--END DEBUGGING--[/!]Also, check your shipcostings.db to make sure that it doesn't have any gremlins in it and that it has a carriage-return at the EOF.GaryAt 12:14 PM 8/21/2004, you wrote:>Gary>>I returned the formula to the original one to keep things working.>>>Name Formula>price [lookup db=items.db&lookInField=sku&value=[sku]&returnField=price]>taxrate [lookup >db=taxrates.db&lookinfield=country&value=[destination]&returnfield=taxrate¬Found=0.00]>shipcost [showif [subtotal]<200][lookup >db=shipcostings.db&lookInfield=destination&value=[destination]&returnfield=shipcostvalue][/showif][showif >[subtotal]>199]0.00[/showif]>unitshipcost 0.00>>>The following was the formula I tried>>shipcost [showif [subtotal]<200][lookup >db=shipcostings.db&lookInfield=destination&value=[destination]&returnfield=shipcostvalue][/showif][showif >[subtotal]>199][lookup >db=shipcostings.db&lookInfield=destination&value=[destination]&returnfield=offership][/showif]>>I'm leaving work now (6.15pm) but I'll be back on line in half an hour.>>JAMES>>------------------------------------------------------------->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:
I don't see anything wrong with your formulas.db, it is straight forward enough.All I can suggest is to make sure that [destination] is populating as it should be. Add some debugging to the template where formulas.db is applied, something like this at the top of the page {You can also add the lookups below that to see that they are working properly}:[!]--FOR DEBUGGING ONLY, REMOVE AFTER USE--[/!]DESTINATION: [destination]
SUBTOTAL: [subtotal]
UNDER 200: [lookup db=shipcostings.db&lookInfield=destination&value=[destination]&returnfield=shipcostvalue]
OVER 199: [lookup db=shipcostings.db&lookInfield=destination&value=[destination]&returnfield=offership][!]--END DEBUGGING--[/!]Also, check your shipcostings.db to make sure that it doesn't have any gremlins in it and that it has a carriage-return at the EOF.GaryAt 12:14 PM 8/21/2004, you wrote:>Gary>>I returned the formula to the original one to keep things working.>>>Name Formula>price [lookup db=items.db&lookInField=sku&value=[sku]&returnField=price]>taxrate [lookup >db=taxrates.db&lookinfield=country&value=[destination]&returnfield=taxrate¬Found=0.00]>shipcost [showif [subtotal]<200][lookup >db=shipcostings.db&lookInfield=destination&value=[destination]&returnfield=shipcostvalue][/showif][showif >[subtotal]>199]0.00[/showif]>unitshipcost 0.00>>>The following was the formula I tried>>shipcost [showif [subtotal]<200][lookup >db=shipcostings.db&lookInfield=destination&value=[destination]&returnfield=shipcostvalue][/showif][showif >[subtotal]>199][lookup >db=shipcostings.db&lookInfield=destination&value=[destination]&returnfield=offership][/showif]>>I'm leaving work now (6.15pm) but I'll be back on line in half an hour.>>JAMES>>------------------------------------------------------------->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/
Gary Krockover
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:
[WebDNA] Sorry WebDNA server not running. (2015)
Webcat deletes last line from Excel-saved text db (2004)
WebCat2b15MacPlugin - [protect] (1997)
Progress (database system) (2003)
gateway application timeouts (1998)
Filemaker Pro and [convertchars] (2000)
Using Applescript to process WebCatalog functions (1998)
WebCat2b15MacPlugin - [protect] (1997)
Format question WC Mac f3 (1997)
RAM variables (1997)
Re2: frames & carts (1997)
RE: what characters are replaced for tab and CR? (1998)
[WebDNA] Commerce tags clarification (2015)
WebMerchant when CC network is down (1998)
Sort Order on a page search (1997)
Associative lookup style? + bit more (1997)
Hard Questions ? (1997)
Using Cookie for client specific info? (1997)
can you use [middle] in a search? (2001)
oops private message leaked into talk list (1997)