Re: Using [showif] within [lineitems] [code fragment]

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 29384
interpreted = N
texte = Something similar, but more versatile:
[lineitems] [fileinfo [texta].incl] [showif [exists]=t] [include [texta].incl] [/showif] [/fileinfo] [/lineitems]
Now, assuming your include files were simply a list of input fields, like so:Begin Celebrix.incl: -- Do you have sleeping problems?
Are you pregnant?
--you would end up with a dynamic form that could be parsed simply by using a formvariables loop in the target page. Something like this:[appendfile file=questionnaires/[ordernumber]] [formvariables][name] = [value] [/formvariables] [/appendfile]This would leave you with a simple, but readable list of questions and answers in a file that can be retrieved in a multitude of ways. Of course, you may want to prettify it, but the idea should be obvious.Good luck, Derrick> >The application is an online pharmacy. Before a purchase can be completed, >we will require the customer to answer a few health questions (dependent on >the medication they're attempting to purchase) so our physician can >approve/deny the order. > >Database items include: >SKU NAME DESC STRENGTH PACKSIZE PRICE >1 Celebrex capsules 100mg 60 10.00 >2 Prevacid capsules 30mg 60 10.00 >3 Prilosec capsules 20mg 60 10.00 > >Now, to accomplish what I'm looking to do, I've created a new template that >gets called before the invoice to display the appropriate questions. >First, I use a conventional [lineitems] context to summarize the order and >display a subtotal. >In a second [lineitems], I try this: >[lineItems] >[Showif [textA]=Celebrex] >[include celebrex.inc] >[/Showif] >[/lineItems] > >In this case, textA is set by performing a [lookup] on each lineitem and >sucking in the NAME field. > >Close? No Cigar? or Not A Snowball's Chance? > ------------------------------------------------------------- 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 Associated Messages, from the most recent to the oldest:

    
  1. Re: Using [showif] within [lineitems] [code fragment] (Kenneth Grome 2000)
  2. Re: Using [showif] within [lineitems] [code fragment] (Andrew Vernon 2000)
  3. Re: Using [showif] within [lineitems] [code fragment] (Derrick Puckett 2000)
  4. Re: Using [showif] within [lineitems] [code fragment] (Derrick Puckett 2000)
  5. Re: Using [showif] within [lineitems] [code fragment] (Andrew Vernon 2000)
Something similar, but more versatile:
[cart]> [lineitems] [fileinfo [texta].incl] [showif [exists]=t] [include [texta].incl] [/showif] [/fileinfo] [/lineitems]
Now, assuming your include files were simply a list of input fields, like so:Begin Celebrix.incl: -- Do you have sleeping problems?
Are you pregnant?
--you would end up with a dynamic form that could be parsed simply by using a formvariables loop in the target page. Something like this:[appendfile file=questionnaires/[ordernumber]] [formvariables][name] = [value] [/formvariables] [/appendfile]This would leave you with a simple, but readable list of questions and answers in a file that can be retrieved in a multitude of ways. Of course, you may want to prettify it, but the idea should be obvious.Good luck, Derrick> >The application is an online pharmacy. Before a purchase can be completed, >we will require the customer to answer a few health questions (dependent on >the medication they're attempting to purchase) so our physician can >approve/deny the order. > >Database items include: >SKU NAME DESC STRENGTH PACKSIZE PRICE >1 Celebrex capsules 100mg 60 10.00 >2 Prevacid capsules 30mg 60 10.00 >3 Prilosec capsules 20mg 60 10.00 > >Now, to accomplish what I'm looking to do, I've created a new template that >gets called before the invoice to display the appropriate questions. >First, I use a conventional [lineitems] context to summarize the order and >display a subtotal. >In a second [lineitems], I try this: >[lineitems] >[Showif [textA]=Celebrex] >[include celebrex.inc] >[/Showif] >[/lineItems] > >In this case, textA is set by performing a [lookup] on each lineitem and >sucking in the NAME field. > >Close? No Cigar? or Not A Snowball's Chance? > ------------------------------------------------------------- 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 Derrick Puckett

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:

comparison to Lasso 6 or 7 (2004) f2 download problems (1997) WebCatalog on G3 Macs? (1997) tax rate off by 1 cent (1997) OSX 10.2.6/iTools 7.0/WebDNA 5.0 installation (2003) WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997) Security Issues and WebCommerce Solution (1997) Multiple Ad databases? (1997) Upgrade Problem.... (1998) searching multiple databases (1997) Announcing general availabilty of WebDNA 4.5 release (2002) RE: 2nd WebCatalog2 Feature Request (1996) MacOS9 plugin 4.0.2b5 template security error (2000) webCatalog and Stocks (1998) Changing to a windows mounted share from a Mac OS X machine (2002) Emailer choke (1997) Problem with encrypted cookies (2000) Online reference (1997) Online reference (1997) Remote stockroom ? (1998)