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 Solution11770 Bernardo Plaza Court, #462 | SiteEdit Pro, SiteCheck, PhotoMasterSan Diego, CA 92128 | SiteGuard619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com
Associated Messages, from the most recent to the oldest:
>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 Solution11770 Bernardo Plaza Court, #462 | SiteEdit Pro, SiteCheck, PhotoMasterSan Diego, CA 92128 | SiteGuard619/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:
Running 2 two WebCatalog.acgi's (1996)
Shipping charges based on dollar level (1997)
Running a store on BOTH http and https (1998)
Product Comparison (2000)
Cannot calculate prices (1997)
Emailer [cart] file names (1997)
Email Format (1998)
Tab Charactor (1997)
showcart is slow (1998)
RE: Dates! (1998)
Examples Link? (2000)
Exclamation point (1997)
Setting up shop (1997)
[OT] My own Hot Mail like e-mail services (2003)
WebCat2b12 - New features for 1.6 users ... (1997)
Webcat/Webmerchant part II (1998)
[Applescript] (2000)
A better WebCat whois (was [OT] Domain Name Scam) (2000)
How can I Add several Items into the cart at once? (1997)
sendmail what is SIMS? (1999)