Re: [ShowIf] if the varieable exists

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 20317
interpreted = N
texte = >I understand that normally you would put the [ShowIf] context followed >by the equation. >ex: [ShowIf [wogroup1datarq]=Mustang]Car[/ShowIf] >However, there will not always be an existing variable called >[wogroup1datarq]. Instead, I would like to [ShowIf] if the variable >[wogroup1datarq] exists. How can I do this? [showif [wogroup1datarq]![raw][wogroup1datarq][/raw]]This will showif the variable exists. If you reference a variable in WebCatalog that does not exist, then you just get it right backatcha. i.e. If you say [bob] but there is no variable bob, then it will just return [bob]. Surrounding a variable declaration (i.e. [bob] ) in [raw] tags returns it untouched, so then you are checking on the right side of the equation to see if the left side returned an actual value, or wasn't found to be a variable and just returned the name of the variable back in brackets. Likewise, if you want to do somethign when the variable doesn't exist: [showif [wogroup1datarq]=[raw][wogroup1datarq][/raw]]Howard Wolosky ============Lead Programmer / Webmaster www.willitwork.com Will It Work presented by Lab 2k -The World's Largest Year 2000 Compliance Seach Engine Associated Messages, from the most recent to the oldest:

    
  1. Re: [ShowIf] if the varieable exists (Grant Hulbert 1998)
  2. Re: [ShowIf] if the varieable exists (Scott Szretter 1998)
  3. Re: [ShowIf] if the varieable exists (Howard Wolosky 1998)
  4. Re: [ShowIf] if the varieable exists (Howard Wolosky 1998)
  5. Re: [ShowIf] if the varieable exists (Howard Wolosky 1998)
  6. Re: [ShowIf] if the varieable exists (bob 1998)
  7. Re: [ShowIf] if the varieable exists (Howard Wolosky 1998)
  8. Re: [ShowIf] if the varieable exists (Christer Olsson 1998)
  9. Re: [ShowIf] if the varieable exists (PCS Technical Support 1998)
  10. [ShowIf] if the varieable exists (Mike Eberly 1998)
>I understand that normally you would put the [showif] context followed >by the equation. >ex: [ShowIf [wogroup1datarq]=Mustang]Car[/ShowIf] >However, there will not always be an existing variable called >[wogroup1datarq]. Instead, I would like to [showif] if the variable >[wogroup1datarq] exists. How can I do this? [showif [wogroup1datarq]![raw][wogroup1datarq][/raw]]This will showif the variable exists. If you reference a variable in WebCatalog that does not exist, then you just get it right backatcha. i.e. If you say [bob] but there is no variable bob, then it will just return [bob]. Surrounding a variable declaration (i.e. [bob] ) in [raw] tags returns it untouched, so then you are checking on the right side of the equation to see if the left side returned an actual value, or wasn't found to be a variable and just returned the name of the variable back in brackets. Likewise, if you want to do somethign when the variable doesn't exist: [showif [wogroup1datarq]=[raw][wogroup1datarq][/raw]]Howard Wolosky ============Lead Programmer / Webmaster www.willitwork.com Will It Work presented by Lab 2k -The World's Largest Year 2000 Compliance Seach Engine Howard Wolosky

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:

Frames and [cart] (1998) Ok, I'm stumped (1998) Temp DB (Was freeze) (2003) Another bug to squash (WebCat2b13 Mac .acgi) (1997) [taxrate] question (1997) OS X, Communigate Pro & Line Breaks (2003) Bug Report, maybe (1997) WebCat2b12 CGI Mac - [shownext] problem (1997) searchable list archive (1997) RE: WebDNA-Talk searchable? (1997) NT Version on IIS 4.0 (1997) WCf2 and nested tags (1997) [WebDNA] WebDNA on LiveCD ... (2008) is sku a REQUIRED field on NT (1997) PIXO support (1997) Adding Message to Order (1997) webcat2b12 CGI -- Date comparisons (1997) searching numbers (1998) Scoping rules in WebDNA 4.0 (2000) [SHOWIF]s and empty arguments (1997)