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:
[WebDNA] Triggers.db wiped completely blank (2011)
RequiredFields template (1997)
Bug Report, maybe (1997)
problems with 2 tags (1997)
multi-paragraph fields (1997)
Locking up with WebCatalog... (1997)
[WebDNA] TCP HTTP/1.1 questions (2011)
FORMS: Returning a specific page (1997)
WebCat cannot handle compatible search parameters? (1997)
WebCatalog2 Feature Feedback (1996)
oddball sorting problem -- almost okay now (2003)
Comments in db? (1997)
Migrating From One Server To Another (2003)
email problem (1998)
Closing Databases (1998)
Multiple prices (1997)
Modify several items at a time (2003)
OIT Firewall for Windows 2000 Server (2005)
Migrating to NT (1997)
Re:Variable Math (1998)