Re: Formulas.db

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 40356
interpreted = N
texte = I haven't tried it, but couldn't you set a text variable within a formula? As I understand it, WebCat basically grabs the formula from the DB then does an [interpret] on it... so, theoretically, you could put any DNA code you want there - including [text]textVar=blah[/text] - as long as you are careful that the resulting value has no extra characters after it's been interpreted.Also, a clarification: the entry in the formulas.db must be on one line, and the results of the interpreted include file must not contain any characters besides the desired result (no spaces or returns...), but the code within the include file could be on multiple lines for readability, as long as you comment out all the return characters and other extraneous text.- BrianAt 8:55 PM 11/26/2001, John Peacock wrote: >Donovan Brooke wrote: > >>Hello again, >>Anyone ready to delve into the depths of Price Formulas? >> >>this might the first of perhaps a few questions regarding >>Formulas.db...(another item I think is >>under covered in the docs...no offence, grant, jay, john and Scott >>:-) I will have a few complex discounts going on. >>Here is my first question that I can't find the answer to. (btw, >>I'll try to keep the questions in this same thread) >> >>Can a variable be passed from the formulas.db to the page that will >>get the price? > > >No. Any line in the formulas.db is used strictly to return a single >value (it is like a [lookup] in that way) which is used to set a >specific field in the cart. > >> >>Here is the beginnings of one of my discounts (un verified). It is >>a discount that is given if the product is in a certain >>category And, if it is a certain time of the year. The year part I >>haven't implimented yet. >> >>[showif [url][lookup >>db=products.db&lookInField=sku&value=[sku]&returnField=CATEGORY][/url]=TFP >>Tax >>Forms][text]subprice=[math][lookup >>db=products.db&lookInField=sku&value=[sku]&returnField=PRICE][/text][text]disc=[math][subprice]*.1[/math][/text][math][subprice]-[dis][/math][/showif] > > >Always debug your formulas in a standard template; You will find out >more by breaking down the formula into bite size pieces on a page >you can see. Once you have the value you want, combine the lines on >the page into a single line which you can put into the formulas.db. > >NOTE: the use of quotes in [showif] is unnecessary. In [if] >statements, the quotes force the terms to be compared as strings. > >> >>This is more than one line in this email but it is only one line in >>my db of course. My problem is that I need to come >>up with a different strategy if I am going to incorporate all my >>discounts. (the one line would very long) How are people doing >>this? >> >>Can I use [include file=] within a .db value? > > >If you mean inside a formulas.db entry, yes, I think people have had >success (remember that it must still be on one line). >John > >-- >John Peacock >Director of Information Research and Technology >Rowman & Littlefield Publishing Group >4720 Boston Way >Lanham, MD 20706 >301-459-3366 x.5010 >fax 301-429-5747------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Formulas.db not working ( Donovan Brooke 2006)
  2. Re: Formulas.db not working ( Brian Fries 2006)
  3. Re: Formulas.db not working ( Charles Kline 2006)
  4. Re: Formulas.db not working ( Donovan Brooke 2006)
  5. Re: Formulas.db not working ( Donovan Brooke 2006)
  6. Re: Formulas.db not working ( Charles Kline 2006)
  7. Re: Formulas.db not working ( Donovan Brooke 2006)
  8. Re: Formulas.db not working ( Charles Kline 2006)
  9. Re: Formulas.db not working ( "Dan Strong" 2006)
  10. Re: Formulas.db not working ( Charles Kline 2006)
  11. Re: Formulas.db not working ( Donovan Brooke 2006)
  12. Re: Formulas.db not working ( Charles Kline 2006)
  13. Re: Formulas.db not working ( Donovan Brooke 2006)
  14. Re: Formulas.db not working ( Donovan Brooke 2006)
  15. Re: Formulas.db not working ( Donovan Brooke 2006)
  16. Re: Formulas.db not working ( Gary Krockover 2006)
  17. Formulas.db not working ( Charles Kline 2006)
  18. Re: formulas.db [feature request] ( Donovan 2003)
  19. Re: formulas.db ( Stuart Tremain 2003)
  20. Re: formulas.db ( Kenneth Grome 2003)
  21. formulas.db ( Tim Robinson 2003)
  22. Re: [shippingtotal] & Formulas.db prob (WJ Starck 2003)
  23. Re: [shippingtotal] & Formulas.db prob (Gary Krockover 2003)
  24. Re: [shippingtotal] & Formulas.db prob (dbrooke 2003)
  25. Re: [shippingtotal] & Formulas.db prob (WJ Starck 2003)
  26. Re: [shippingtotal] & Formulas.db prob (dbrooke 2003)
  27. Re: [shippingtotal] & Formulas.db prob (WJ Starck 2003)
  28. [shippingtotal] & Formulas.db prob (WJ Starck 2003)
  29. Re: Formulas.db (dbrooke 2003)
  30. Re: Formulas.db (John Peacock 2003)
  31. Formulas.db (dbrooke 2003)
  32. [Mac 3.0.8] Formulas.db Question (Jesse Williams-Proudman 2003)
  33. Re: UnitShipCost, Formulas.db and passwords (John Peacock 2003)
  34. Re: UnitShipCost, Formulas.db and passwords (Alphonse MacDonald 2003)
  35. Re: UnitShipCost, Formulas.db and passwords (Donovan 2003)
  36. Re: UnitShipCost, Formulas.db and passwords (Donovan 2003)
  37. Re: UnitShipCost, Formulas.db and passwords (Donovan 2003)
  38. UnitShipCost, Formulas.db and passwords (Alphonse MacDonald 2003)
  39. Re: [shippingtotal] in Formulas.db (WJ Starck 2002)
  40. Re: [shippingtotal] in Formulas.db (Donovan Brooke 2002)
  41. Re: [shippingtotal] in Formulas.db (WJ Starck 2002)
  42. Re: [shippingtotal] in Formulas.db (Donovan Brooke 2002)
  43. [shippingtotal] in Formulas.db (WJ Starck 2002)
  44. Re: Formulas.db question (Donovan 2002)
  45. Formulas.db question (charles kline 2002)
  46. Re: Formulas.db (Donovan Brooke 2001)
  47. Re: Formulas.db (Brian Fries 2001)
  48. Re: Formulas.db (John Peacock 2001)
  49. Formulas.db (Donovan Brooke 2001)
  50. Re: Formulas.db (John Peacock 2001)
  51. Re: Formulas.db (Donovan Brooke 2001)
  52. Re: Formulas.db (Glenn Busbin 2001)
  53. Re: Formulas.db (Donovan Brooke 2001)
  54. Re: Formulas.db (John Peacock 2001)
  55. Formulas.db (Donovan Brooke 2001)
  56. Re: where's Formulas.db? (Samuel Renkert 2001)
  57. Re: where's Formulas.db? (John Peacock 2001)
  58. Re: where's Formulas.db? (Charles Kline 2001)
  59. where's Formulas.db? (Brian Wachter 2001)
  60. Re: formvars available in formulas.db? (John Butler 2000)
  61. formvars available in formulas.db? (John Butler 2000)
  62. Re: shipcost and Formulas.db (John Butler 2000)
  63. Re: shipcost and Formulas.db (Chris Vargas 2000)
  64. Re: shipcost and Formulas.db (Chris Vargas 2000)
  65. Re: shipcost and Formulas.db (John Butler 2000)
  66. shipcost and Formulas.db (Chris Vargas 2000)
  67. Re: Formulas.db (Jesse Williams Proudman 2000)
  68. Re: Formulas.db (PCS Technical Support 2000)
  69. Formulas.db (Jesse Williams Proudman 2000)
  70. Re: Frustration with formulas.db (Brian Boegershausen 1999)
  71. Re: Frustration with formulas.db (Kevin Lippert 1999)
  72. Re: Frustration with formulas.db (Brian Boegershausen 1999)
  73. Re: Frustration with formulas.db (Brian Boegershausen 1999)
  74. Re: Frustration with formulas.db (Kenneth Grome 1999)
  75. Frustration with formulas.db (Kevin Lippert 1999)
  76. Re: Problem with Formulas.db (Brian Boegershausen 1999)
  77. Problem with Formulas.db (Karim Ardalan 1999)
  78. Re: Calculate UnitShipCost in Formulas.db (Smith Micro Support 1999)
  79. Re: Calculate UnitShipCost in Formulas.db (Rodolfo de la Garza 1999)
  80. Re: Calculate UnitShipCost in Formulas.db (Chris Vargas 1999)
  81. Calculate UnitShipCost in Formulas.db (Rodolfo de la Garza 1999)
  82. Re: formulas.db (Bob Minor 1999)
  83. Re: formulas.db (PCS Technical Support 1999)
  84. formulas.db (Mícheál O Sé 1999)
  85. formulas.db (Mícheál O Sé 1999)
  86. formulas.db and prices (Mike Jones 1999)
  87. Re: Custom formulas.db (PCS Technical Support 1998)
  88. Re: Custom formulas.db (Tim Taylor 1998)
  89. Re: Custom formulas.db (PCS Technical Support 1998)
  90. Re: Custom formulas.db (Kenneth Grome 1998)
  91. Re: Custom formulas.db (Tim Taylor 1998)
  92. Re: Custom formulas.db (Grant Hulbert 1998)
  93. Re: Custom formulas.db (Kenneth Grome 1998)
  94. Re: Custom formulas.db (PCS Technical Support 1998)
  95. Re: Custom formulas.db (Kenneth Grome 1998)
  96. Re: Custom formulas.db (PCS Technical Support 1998)
  97. Custom formulas.db (Tim Taylor 1998)
  98. Re: Problem with Formulas.db (Mike Heininger 1998)
  99. Re: Problem with Formulas.db (Mike Heininger 1998)
  100. Re: Problem with Formulas.db (Kenneth Grome 1998)
  101. Re: Problem with Formulas.db (PCS Technical Support 1998)
  102. Re: Problem with Formulas.db (Mícheál O Sé 1998)
  103. Problem with Formulas.db (Mike Heininger 1998)
  104. Re: formulas.db problem solved (Mark Mesenko 1998)
  105. Re: formulas.db ?? (Peter Ostry 1998)
  106. Re: formulas.db ?? (Kenneth Grome 1998)
  107. Re: formulas.db ?? (Mark Mesenko 1998)
  108. Re: formulas.db ?? (Kenneth Grome 1998)
  109. formulas.db ?? (Mark Mesenko 1998)
  110. Re: Allowed fields in formulas.db (Paul Willis 1998)
  111. Re: Formulas.db / Quantity Discount problem (PCS Technical Support 1998)
  112. Re:Formulas.db / Quantity Discount problem (PCS Technical Support 1998)
  113. Re: Allowed fields in formulas.db (PCS Technical Support 1998)
  114. Allowed fields in formulas.db (Paul Willis 1998)
  115. Re:Formulas.db / Quantity Discount problem (Paul Uttermohlen 1998)
  116. Re:Formulas.db / Quantity Discount problem (Jay Van Vark 1998)
  117. Formulas.db / Quantity Discount problem (Paul Uttermohlen 1998)
  118. Re: Formulas.db (Grant Hulbert 1997)
  119. Formulas.db (Ray Hatch 1997)
  120. Re: [search] in formulas.db (Grant Hulbert 1997)
  121. [search] in formulas.db (Mike Heininger 1997)
  122. Looking up two prices in Formulas.db ( 1997)
  123. Looking up two prices in Formulas.db ( 1997)
  124. RE: Formulas.db + Users.db (A. Waldeck 1997)
  125. RE: Formulas.db + Users.db (Grant Hulbert 1997)
  126. RE: Formulas.db + Users.db (Kenneth Grome 1997)
  127. RE: Formulas.db + Users.db (Kenneth Grome 1997)
  128. RE: Formulas.db + Users.db (grichter@panavise.com (Gary Richter) 1997)
  129. RE: Formulas.db + Users.db (Marc Eagle 1997)
  130. Re: Formulas.db + Users.db (Sven U. Grenander 1997)
  131. Re: Formulas.db + Users.db (Express Communications 1997)
  132. Re: Formulas.db + Users.db (Richard Wylie 1997)
  133. Formulas.db + Users.db (Paul Keen 1997)
  134. Re: Variable prices and Formulas.db (Grant Hulbert 1997)
  135. Variable prices and Formulas.db (Austin H. Spiegelman 1997)
  136. Re: WebCat2: Formulas.db question (Grant Hulbert 1997)
  137. WebCat2: Formulas.db question (Ed Trefzger 1997)
  138. Re: WC2b12: Yes, Formulas.db is for real (Kenneth Grome 1997)
  139. WC2b12: Yes, Formulas.db is for real (Grant Hulbert 1997)
  140. formulas.db (Terry Wilson The )
I haven't tried it, but couldn't you set a text variable within a formula? As I understand it, WebCat basically grabs the formula from the DB then does an [interpret] on it... so, theoretically, you could put any DNA code you want there - including [text]textVar=blah[/text] - as long as you are careful that the resulting value has no extra characters after it's been interpreted.Also, a clarification: the entry in the formulas.db must be on one line, and the results of the interpreted include file must not contain any characters besides the desired result (no spaces or returns...), but the code within the include file could be on multiple lines for readability, as long as you comment out all the return characters and other extraneous text.- BrianAt 8:55 PM 11/26/2001, John Peacock wrote: >Donovan Brooke wrote: > >>Hello again, >>Anyone ready to delve into the depths of Price Formulas? >> >>this might the first of perhaps a few questions regarding >>formulas.db...(another item I think is >>under covered in the docs...no offence, grant, jay, john and Scott >>:-) I will have a few complex discounts going on. >>Here is my first question that I can't find the answer to. (btw, >>I'll try to keep the questions in this same thread) >> >>Can a variable be passed from the formulas.db to the page that will >>get the price? > > >No. Any line in the formulas.db is used strictly to return a single >value (it is like a [lookup] in that way) which is used to set a >specific field in the cart. > >> >>Here is the beginnings of one of my discounts (un verified). It is >>a discount that is given if the product is in a certain >>category And, if it is a certain time of the year. The year part I >>haven't implimented yet. >> >>[showif [url][lookup >>db=products.db&lookInField=sku&value=[sku]&returnField=CATEGORY][/url]=TFP >>Tax >>Forms][text]subprice=[math][lookup >>db=products.db&lookInField=sku&value=[sku]&returnField=PRICE][/text][text]disc=[math][subprice]*.1[/math][/text][math][subprice]-[dis][/math][/showif] > > >Always debug your formulas in a standard template; You will find out >more by breaking down the formula into bite size pieces on a page >you can see. Once you have the value you want, combine the lines on >the page into a single line which you can put into the formulas.db. > >NOTE: the use of quotes in [showif] is unnecessary. In [if] >statements, the quotes force the terms to be compared as strings. > >> >>This is more than one line in this email but it is only one line in >>my db of course. My problem is that I need to come >>up with a different strategy if I am going to incorporate all my >>discounts. (the one line would very long) How are people doing >>this? >> >>Can I use [include file=] within a .db value? > > >If you mean inside a formulas.db entry, yes, I think people have had >success (remember that it must still be on one line). >John > >-- >John Peacock >Director of Information Research and Technology >Rowman & Littlefield Publishing Group >4720 Boston Way >Lanham, MD 20706 >301-459-3366 x.5010 >fax 301-429-5747------------------------------------------------------------- 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://search.smithmicro.com/ Brian Fries

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:

Writing [raw] to a file (2000) WebCatalog for Dummies part 2 (2000) Permission denied? (2004) AAgghh!! Help, please. SSL strikes again. (1997) [WebDNA] Timer (2009) Install Webcatalog under NT4.0 and Microsoft IIS 2.0 (1997) Parameter Problem (1998) Accentuated and non-English letters (2002) [random] only for 1-100??? (1997) Associative lookup style? + bit more (1997) The force has left me. (2002) [append] and SSL (1997) lineitem variables (1999) [recordrank]? (2000) Re:Emailer and encryption (1997) [showif]/[hideif] question (1997) Re:Emailer and encryption (1997) RAM variables (1997) Upload (1998) Error reading data -1 (1997)