Re: Price and Formula.db

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 45543
interpreted = N
texte = I think I have it solved. I was passing the Options variable from the Products page to the lineitems loop on the ShoppingCart page as [TextD] to get around the restrictions on variable names in a lineitems loop, but used [Woods] for the same value in Formulas.db. Therefore, when the lineitems loop called up Formulas.db, the lookup didn't have a value for [Woods]. If I used the same lookup outside a lineitems loop, even on ShoppingCarts.tpl, it worked correctly. This is what threw me.This is wrong in lineitems, but right outside lineitems: [lookup db=Woods.db&lookinfield=Woods&value=[URL][Woods][/URL]&returnfield=ExtraCost]This is right in lineitems: [lookup db=Woods.db&lookinfield=Woods&value=[URL][TextD][/URL]&returnfield=ExtraCost]This works: Name Formula Price [Math][lookup db=Products.db&lookinfield=SKU&value=[URL][SKU][/URL]&returnfield=Price]+([lookup db=Products.db&lookinfield=SKU&value=[URL][SKU][/URL]&returnfield=Price]*[lookup db=Woods.db&lookinfield=Woods&value=[URL][TextD][/URL]&returnfield=ExtraCost])[/Math]It's not at all intuitive and the docs are damn little help. It would be just as secure to allow Price to be changed by a formula within the lineitems loop.I hope this helps someone else. I doubt this is unique to my experience.Glenn------------------------------------------------------------- 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: [SMSI]Re: Price and Formula.db (Donovan 2002)
  2. Re: [SMSI]Re: Price and Formula.db (Scott Anderson 2002)
  3. [SMSI]Re: Price and Formula.db (Donovan 2002)
  4. Re: Price and Formula.db (John Peacock 2002)
  5. Re: Price and Formula.db (Donovan 2002)
  6. Re: Price and Formula.db (Glenn Busbin 2002)
  7. Re: Price and Formula.db (Donovan Brooke 2002)
  8. Re: Price and Formula.db (Gary Krockover 2002)
  9. Re: Price and Formula.db (Gary Krockover 2002)
  10. Re: Price and Formula.db (Gary Krockover 2002)
  11. Re: Price and Formula.db (Glenn Busbin 2002)
  12. Re: Price and Formula.db (Donovan Brooke 2002)
  13. Re: Price and Formula.db (Stuart Tremain 2002)
  14. Re: Price and Formula.db (Arturo Vargas 2002)
  15. Re: Price and Formula.db (Andrew Simpson 2002)
  16. Re: Price and Formula.db (Glenn Busbin 2002)
  17. Re: Price and Formula.db (Gary Krockover 2002)
  18. Re: Price and Formula.db (Donovan 2002)
  19. Re: Price and Formula.db (Glenn Busbin 2002)
  20. Re: Price and Formula.db (Donovan 2002)
  21. Re: Price and Formula.db (Andrew Simpson 2002)
  22. Re: Price and Formula.db (Glenn Busbin 2002)
  23. Re: Price and Formula.db (Donovan 2002)
  24. Re: Price and Formula.db (Andrew Simpson 2002)
  25. Re: Price and Formula.db (Andrew Simpson 2002)
  26. Re: Price and Formula.db (Glenn Busbin 2002)
  27. Re: Price and Formula.db (Andrew Simpson 2002)
  28. Price and Formula.db (Glenn Busbin 2002)
I think I have it solved. I was passing the Options variable from the Products page to the lineitems loop on the ShoppingCart page as [TextD] to get around the restrictions on variable names in a lineitems loop, but used [Woods] for the same value in formulas.db. Therefore, when the lineitems loop called up formulas.db, the lookup didn't have a value for [Woods]. If I used the same lookup outside a lineitems loop, even on ShoppingCarts.tpl, it worked correctly. This is what threw me.This is wrong in lineitems, but right outside lineitems: [lookup db=Woods.db&lookinfield=Woods&value=[url][Woods][/URL]&returnfield=ExtraCost]This is right in lineitems: [lookup db=Woods.db&lookinfield=Woods&value=[url][TextD][/URL]&returnfield=ExtraCost]This works: Name Formula Price [math][lookup db=Products.db&lookinfield=SKU&value=[url][SKU][/URL]&returnfield=Price]+([lookup db=Products.db&lookinfield=SKU&value=[url][SKU][/URL]&returnfield=Price]*[lookup db=Woods.db&lookinfield=Woods&value=[url][TextD][/URL]&returnfield=ExtraCost])[/Math]It's not at all intuitive and the docs are damn little help. It would be just as secure to allow Price to be changed by a formula within the lineitems loop.I hope this helps someone else. I doubt this is unique to my experience.Glenn------------------------------------------------------------- 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/ Glenn Busbin

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:

filtering [founditems] (2004) Bizarre behavior texta behavior (2004) [WebDNA] [OT] - One Man. One Road. (2010) [WebDNA] WebDNA and MAMP/Apache (Mac) (2018) No data - More Info (1997) Help! WebCat2 bug (Ben's input) (1997) ShowNext Context (2004) [dos] command question (1997) WebCat2: Items xx to xx shown, etc. (1997) Webcatalog server support (1997) NT 4.0/IIS WebCat Installation (1998) Size Limitation through a POST via SSL? (2005) BR (1997) same products but different (1998) Robots fill event log (1997) [WebDNA] Upper ASCII and charset [OT] (2016) A few questions. . . (1997) Trouble with formula.db (1997) [WebDNA] Fedex web services (2015) MOOOOOO (2000)