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[2]: WebCatalog keeps quiting on Solaris, and support isn' (2000)
Help! WebCat2 bug (1997)
payment processors (2005)
users.db (1999)
WebCatalog for Postcards ? (1997)
Email check problems (1999)
SIMS Email Question (2003)
[WebDNA] [OT] developer support needed (2014)
WebDNA vs PHP (2003)
WebCatalog 2.0 & WebDNA docs in HTML ... (1997)
default value from Lookup (was Grant, please help me) (1997)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
[WebDNA] [BULK] which of these tags exist in 7.0 (2011)
StoreBuilder Q's (2003)
Protect (1997)
WebStar quitting since upgrading to WC4 (2000)
Tech question about web dna actions (1998)
Um. silly question perhaps...but I don't know, so I'm askin'.. (2001)
[getchars] questions (1997)
Price question (1998)