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:

YACBQ.....(Yet another checkbox question) (2000) Not really WebCat- (1997) [SQL] on MacOs to SQL Server ... HOW TO? (2000) all records returned. (1997) [WebDNA] Successful, working WebDNA7/CentOS install? (2013) [searchString] (1997) Snake Bites (1997) request for string functions (1998) two questions (1997) carriage returns in data (1997) PCS Frames (1997) FileMaker and WebCat - .hdr OK Merge not OK (1999) [Listfiles] vs Netfinder (1997) [subtotal] (2000) Silence before the storm? (2004) WebCatalog [FoundItems] Problem - LONG - (1997) WebCat2 as a chat server? (1997) 9 digit zip (2002) Running _every_ page through WebCat ? (1997) WC2b15 File Corruption (1997)