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:

    
  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. 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:

Line items in table cells (1997) UPDATE PROBLEM (1997) Running 2 two WebCatalog.acgi's (1996) Problems with [Applescript] (1997) WebCat and image maps (1997) Netscape v. IE (1997) Ampersand (1997) Random question (1998) Math Function (1997) Pls Remove me from all Lists (1998) Re:Emailer problem....still (1997) getting images' width/height (1998) Greater then less then (2001) syntax question, not in online refernce (1997) [OT] UK webcat job vacancy (2003) [WebDNA] SQL Search (2010) Exists? (1997) RE: Webcatalog and CyberSTUD (1998) Sensations (1997) WC2.0 Memory Requirements (1997)