Re: Nested vs conditional
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 10793
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.Perfect, should do the trick exactly the way I wanted it to.Thanks===============================================Gary Richter PanaVise Products, Inc. 7540 Colbert Dr. Reno, Nevada 89511 Ph: 702.850.2900 Fx: 702.850.2929 Email: grichter@panavise.com http://www.panavise.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.Perfect, should do the trick exactly the way I wanted it to.Thanks===============================================Gary Richter PanaVise Products, Inc. 7540 Colbert Dr. Reno, Nevada 89511 Ph: 702.850.2900 Fx: 702.850.2929 Email: grichter@panavise.com http://www.panavise.com===============================================
grichter@panavise.com (Gary Richter)
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:
RE: Web*SSL and WebCatalog (1997)
Webcat XML/XSLT Performance vs. static Html (2006)
Interpret Around Contexts? (2000)
webCatalog and Stocks (1998)
Admin Edit prob. (1997)
PIXO support (1997)
WebCat2b12plugin - [search] is broken ... not! (1997)
Emailer problems addition (1999)
Configuration for WebDNA (2006)
Version 4? (2000)
[WebDNA] Internal [ipaddress] ? (2009)
Snake Bites (1997)
[WebDNA] exclusivelock (2011)
WebCat2: Items xx to xx shown, etc. (1997)
Shopping Cart Problem (1998)
Hiding HTML and breaking the page (1997)
[SearchString] problem with [search] context (1997)
Posting form data to a popup (2004)
WebCat2 several catalogs? (1997)
Need relative path explanation (1997)