Re: detecting if var is blank?

This WebDNA talk-list message is from

2007


It keeps the original formatting.
numero = 68364
interpreted = N
texte = You could use a function like [function name=isSet] [showif [interpret][[v]][/interpret]^[[v]]] [return]F[/return] [/showif] [hideif [interpret][[v]][/interpret]^[[v]]] [return]T[/return] [/hideif] [/function] Then call it by [showif [isSet v=VariableNameOfWhatYouAreChecking]=T] put your stuff in here [/showif] -----Original Message----- From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On Behalf Of Alex McCombie Sent: Thursday, January 25, 2007 10:24 AM To: WebDNA Talk Subject: Re: detecting if var is blank? [hideif [myvar]=[raw][myvar][/raw]] [hideif [myvar]=] Only shows if the variable is not blank or undefined [/hideif][/hideif] You can do this cleaner with an IF statement but figured you might want to stay with hideifs/showifs HTH Alex On 1/25/07 3:11 PM, "Scott Szretter" wrote: > I am hoping someone can tell me why this is not working: > > I am trying to show text and a variable only if it is actually preset > and contains something. > Both lines of code below produce this: > > abc:[myvar] > > Here are the two ways I have tried: > > 1. > [showif [myvar]!]abc:[myvar] > [/showif] > > 2. > [showif [myvar]![blank]]abc:[myvar][/showif] > > > Any ideas? > Thanks! -- Alex McCombie .. . . . . . . . . . . . . . . . . . . . . . . . . . . . Adventure Skies Interactive Box 124 Martville, NY 131111 p. 315 .233 .9403 e. Alex@AdventureSkies.com http://AdventureSkies.com ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: detecting if var is blank? ( Stuart Tremain 2007)
  2. Re: detecting if var is blank? ( Scott Szretter 2007)
  3. Re: detecting if var is blank? ( Donovan Brooke 2007)
  4. Re: detecting if var is blank? ( Donovan Brooke 2007)
  5. Re: detecting if var is blank? ( "Olin Lagon" 2007)
  6. Re: detecting if var is blank? ( John Hill 2007)
  7. Re: detecting if var is blank? ( Alex McCombie 2007)
  8. Re: detecting if var is blank? ( Gary Krockover 2007)
  9. detecting if var is blank? ( Scott Szretter 2007)
You could use a function like [function name=isSet] [showif [interpret][[v]][/interpret]^[[v]]] [return]F[/return] [/showif] [hideif [interpret][[v]][/interpret]^[[v]]] [return]T[/return] [/hideif] [/function] Then call it by [showif [isSet v=VariableNameOfWhatYouAreChecking]=T] put your stuff in here [/showif] -----Original Message----- From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On Behalf Of Alex McCombie Sent: Thursday, January 25, 2007 10:24 AM To: WebDNA Talk Subject: Re: detecting if var is blank? [hideif [myvar]=[raw][myvar][/raw]] [hideif [myvar]=] Only shows if the variable is not blank or undefined [/hideif][/hideif] You can do this cleaner with an IF statement but figured you might want to stay with hideifs/showifs HTH Alex On 1/25/07 3:11 PM, "Scott Szretter" wrote: > I am hoping someone can tell me why this is not working: > > I am trying to show text and a variable only if it is actually preset > and contains something. > Both lines of code below produce this: > > abc:[myvar] > > Here are the two ways I have tried: > > 1. > [showif [myvar]!]abc:[myvar] > [/showif] > > 2. > [showif [myvar]![blank]]abc:[myvar][/showif] > > > Any ideas? > Thanks! -- Alex McCombie .. . . . . . . . . . . . . . . . . . . . . . . . . . . . Adventure Skies Interactive Box 124 Martville, NY 131111 p. 315 .233 .9403 e. Alex@AdventureSkies.com http://AdventureSkies.com ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ "Olin Lagon"

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:

Nested tags count question (1997) Am I going senile? (Price recalc based on quantity) (1997) weird convertchars behavior (2000) [WebDNA] Was: wiki Now: Object-oriented programmng (2009) RE: incrementing a counter remotely? (1999) [ShowNext] (1997) Giving out error pages (1997) Weird error/limit - something amiss? (1997) Access Denied! But why? (1997) Truncated value after space - refresh my memory.... (1997) Numbers from Sentence (2003) required fields??? (2000) Moving Files (2000) New Site Announcement (1998) default value from Lookup (was Grant, please help me) (1997) Emailer again & again (1997) Don't tick me off :) [elaspedtime] (1997) problem with [Format Days_To_Date] (2000) Items XX to XX shown (1997) won't serve .tpl (2000)