Re: Nested vs conditional

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 10792
interpreted = N
texte = >Trying to do a [showif[var] does not contain A or B or C or X or Y]Sorry, there is no syntax for this in [ShowIf] -- multiple not-contains is a little beyond its scope at the moment. But you can use a little math trick to do the same thing:[math]totalFound=0[/math][showif [var]^A][math]totalFound=totalFound+1[/math][/showif] [showif [var]^B][math]totalFound=totalFound+1[/math][/showif] [showif [var]^C][math]totalFound=totalFound+1[/math][/showif] [showif [var]^X][math]totalFound=totalFound+1[/math][/showif] [showif [var]^Y][math]totalFound=totalFound+1[/math][/showif][showif [math]totalFound[/math]!0] [var] contains at leat one of A,B,C,X,Y [/showif]Basically this increments a variable every time something is found. You may have to change the logic for your needs, perhaps using [HideIf] instead.Grant Hulbert, V.P. Engineering | ===== Tools for WebWarriors ===== Pacific Coast Software | WebCatalog Pro, WebCommerce Solution 11770 Bernardo Plaza Court, #462 | SiteEdit Pro, SiteCheck, 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: Nested vs conditional (grichter@panavise.com (Gary Richter) 1997)
  2. Re: Nested vs conditional (Grant Hulbert 1997)
  3. Nested vs conditional (grichter@panavise.com (Gary Richter) 1997)
>Trying to do a [showif[var] does not contain A or B or C or X or Y]Sorry, there is no syntax for this in [showif] -- multiple not-contains is a little beyond its scope at the moment. But you can use a little math trick to do the same thing:[math]totalFound=0[/math][showif [var]^A][math]totalFound=totalFound+1[/math][/showif] [showif [var]^B][math]totalFound=totalFound+1[/math][/showif] [showif [var]^C][math]totalFound=totalFound+1[/math][/showif] [showif [var]^X][math]totalFound=totalFound+1[/math][/showif] [showif [var]^Y][math]totalFound=totalFound+1[/math][/showif][showif [math]totalFound[/math]!0] [var] contains at leat one of A,B,C,X,Y [/showif]Basically this increments a variable every time something is found. You may have to change the logic for your needs, perhaps using [hideif] instead.Grant Hulbert, V.P. Engineering | ===== Tools for WebWarriors ===== Pacific Coast Software | WebCatalog Pro, WebCommerce Solution 11770 Bernardo Plaza Court, #462 | SiteEdit Pro, SiteCheck, 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:

HomePage Caution (1997) TeaRoom Order fields email account remain empty even though thewy are filled. (1997) Where's Cart Created ? (1997) [ADDLINEITEM] hangs Web* (1998) WebCat2 - Getting to the browser's username/password data (1997) Need formum software... (2003) _ in front of field name (1998) Don't tick me off :) [elaspedtime] (1997) Price problem (1997) final on include (1997) More on the email templates (I like it) (1997) price formula (1999) Templates on Unix & CGI on Mac? (1997) Database flushing does not work any more... (2000) LineItem variable set (2007) Uh...can someone help me out with the b10? (1997) Cart questions (1997) Practice runs ? (1997) Nesting format tags (1997) Share cost of training videos! (1998)