Re: formula???
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 34805
interpreted = N
texte = Glenn - I want to make sure that you understand that the formulas.db is onlyused when adding line items to the cart. Look in the documentationunder File Formats/Formulas for the process by which a product isadded to the shopping cart and which field comes from where. Again, Imention that the formulas.db must be in the same directory as the template being used to add to the shopping cart.If you just refer to [price] on a page, it will be the value from thefield with that name in the active database. If you want to confirm toyourself that the formula is being used and not the field in your database, rename price to my_price or something in your database.NOTE TO SMSI/Pacific Coast: The 4.0 documentation under formulas.dbstates that the variables price, unitShipCost, etc. are case-sensitive. Don't you mean case-insensitive??? ^^John PeacockGlenn Busbin wrote:> > OK, but why does the following NOT work?> > Name Formula> price [math][showif [quantity]>2]0.9*[/showif][lookup> db=mydatabase.db&lookInField=sku&value=[sku]&returnField=price][/math]> > It returns only the [price] value just as I'd get with no formula.> > >I have always found formulas.db to be the least understood, yet the most> >powerful feature within WebCat. We use it constantly, because our> >primary database contains 1 record for both cloth and paper editions. I> >must look up the price in a secondary table based on the value of TextB:> >> >price [lookup db=../IMPRINT.db&lookinfield=ISBN&value=[textb]> >&returnfield=USPrice]> >> >That is a tab between price and the formula. This works like magic.> >> > -------------------------------------------------------------> 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/-------------------------------------------------------------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:
Glenn - I want to make sure that you understand that the formulas.db is onlyused when adding line items to the cart. Look in the documentationunder File Formats/Formulas for the process by which a product isadded to the shopping cart and which field comes from where. Again, Imention that the formulas.db must be in the same directory as the template being used to add to the shopping cart.If you just refer to [price] on a page, it will be the value from thefield with that name in the active database. If you want to confirm toyourself that the formula is being used and not the field in your database, rename price to my_price or something in your database.NOTE TO SMSI/Pacific Coast: The 4.0 documentation under formulas.dbstates that the variables price, unitShipCost, etc. are case-sensitive. Don't you mean case-insensitive??? ^^John PeacockGlenn Busbin wrote:> > OK, but why does the following NOT work?> > Name Formula> price [math][showif [quantity]>2]0.9*[/showif][lookup> db=mydatabase.db&lookInField=sku&value=[sku]&returnField=price][/math]> > It returns only the [price] value just as I'd get with no formula.> > >I have always found formulas.db to be the least understood, yet the most> >powerful feature within WebCat. We use it constantly, because our> >primary database contains 1 record for both cloth and paper editions. I> >must look up the price in a secondary table based on the value of TextB:> >> >price [lookup db=../IMPRINT.db&lookinfield=ISBN&value=[textb]> >&returnfield=USPrice]> >> >That is a tab between price and the formula. This works like magic.> >> > -------------------------------------------------------------> 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/-------------------------------------------------------------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/
John Peacock
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:
[WriteFile] problems (1997)
Text Variabels Not Passed To Include (2002)
faulure to encrypt (or maybe decrypt) (1999)
Beta 18 (1997)
Some Advise needed (1997)
FORMS: Returning a specific page (1997)
pop up building with summarize (1998)
Multiple fields on 1 input (1997)
RSS Feeds; basic info (2005)
Grep and <> (2005)
Almost a there but..bye bye NetCloak (1997)
[url] (1997)
WebDNA Examples - Call for submission... (1998)
[WebDNA] WebDNA v7 linux setup with Lighttpd (2011)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
Nesting format tags (1997)
Requiring that certain fields be completed (1997)
MacFinder -- a new WebDNA web site (1998)
Site Builder & IE Mac (2004)
2 databases problem (1997)