Re: LOOP and IF statements

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 13575
interpreted = N
texte = >>and does indeed do the showif, but I have the duplicated options >>problem I described above. > >Use the summary parameter to show only one of each item ...I'm not sure how this would work...the summarize option only works on database searches, not lists of showifs or lineitems.Dan, to prevent your duplication problem, I suggest you use a little math trick to count the number of items in the cart that are electronically deliverable, and then depending on whether or not that is 0, display the WEB option.[math]numElectronic=0[/math][LineItems] [showif [CanEmail]=T][math]numElectronic=numElectronic+1[/math][/showif] [/LineItems]Now you can [showif [math]numElectronic[/math]>0] any time you want to know if there are electronic items in there.Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ==== Pacific Coast Software | WebCatalog, WebMerchant 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster San Diego, CA 92128 | SiteGuard 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com Associated Messages, from the most recent to the oldest:

    
  1. Re: LOOP and IF statements (Kenneth Grome 1997)
  2. Re: LOOP and IF statements (Grant Hulbert 1997)
  3. Re: LOOP and IF statements (Kenneth Grome 1997)
  4. LOOP and IF statements (Dan Keldsen 1997)
>>and does indeed do the showif, but I have the duplicated options >>problem I described above. > >Use the summary parameter to show only one of each item ...I'm not sure how this would work...the summarize option only works on database searches, not lists of showifs or lineitems.Dan, to prevent your duplication problem, I suggest you use a little math trick to count the number of items in the cart that are electronically deliverable, and then depending on whether or not that is 0, display the WEB option.[math]numElectronic=0[/math][lineitems] [showif [CanEmail]=T][math]numElectronic=numElectronic+1[/math][/showif] [/LineItems]Now you can [showif [math]numElectronic[/math]>0] any time you want to know if there are electronic items in there.Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ==== Pacific Coast Software | WebCatalog, WebMerchant 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster San Diego, CA 92128 | SiteGuard 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com Grant Hulbert

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:

_ in front of field name (1998) form data submission gets truncated (1997) syntax question, not in online refernce (1997) flushdatabases (2000) Denying access by IP address (2000) limitation found on group searching (1997) [WebDNA] Still having problems (2008) Looking for WebSTAR bomb at startup (2000) Follow-Up to: Removing [showif] makes a big difference in speed (1997) Bannerad Demo (1998) Frames and WebCat (1997) bug in [SendMail] (1997) Date Time Oddness (1999) Admin Edit prob. (1997) WebCatalog for Dummies part 2 (2000) url question (2002) A multi-processor savvy WebCatalog? (1997) SiteGuard Admin Feature ? (1997) [ShowNext] (1997) It's working (1997)