Re: Determine if a variable has a value

2001-03-06 Thread Bud

On 3/5/01, Michael S. Kimmett penned:
Hello,

I am new to ColdFusion, so this will be an easy answer to most of 
you.  I am having difficulty trying to determine if a variable in 
one of my pages has a value.  What I mean by a value is did I assign 
it a value or is it still empty.  I have tried using IsDefined, 
Evaluate, and other CF Functions, but they all are failing the test. 
Any ideas on how to quickly and easly determine if variable has a 
value.

Thanks in advance.

If you know the variable is set:

cfif myvariable is not ""

if you're not sure if you even set an empty default variable:

cfif isdefined('myvariable') and myvariable is not ""
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Determine if a variable has a value

2001-03-06 Thread Michael S. Kimmett

Bud,

Thank you !

Michael
- Original Message -
From: "Bud" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Tuesday, March 06, 2001 10:41 AM
Subject: Re: Determine if a variable has a value


 On 3/5/01, Michael S. Kimmett penned:
 Hello,
 
 I am new to ColdFusion, so this will be an easy answer to most of
 you.  I am having difficulty trying to determine if a variable in
 one of my pages has a value.  What I mean by a value is did I assign
 it a value or is it still empty.  I have tried using IsDefined,
 Evaluate, and other CF Functions, but they all are failing the test.
 Any ideas on how to quickly and easly determine if variable has a
 value.
 
 Thanks in advance.

 If you know the variable is set:

 cfif myvariable is not ""

 if you're not sure if you even set an empty default variable:

 cfif isdefined('myvariable') and myvariable is not ""
 --

 Bud Schneehagen - Tropical Web Creations

 _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
 ColdFusion Solutions / eCommerce Development
 [EMAIL PROTECTED]
 http://www.twcreations.com/
 954.721.3452


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Determine if a variable has a value

2001-03-05 Thread Michael S. Kimmett

Hello,

I am new to ColdFusion, so this will be an easy answer to most of you.  I am having 
difficulty trying to determine if a variable in one of my pages has a value.  What I 
mean by a value is did I assign it a value or is it still empty.  I have tried using 
IsDefined, Evaluate, and other CF Functions, but they all are failing the test. Any 
ideas on how to quickly and easly determine if variable has a value.

Thanks in advance.

Michael


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Determine if a variable has a value

2001-03-05 Thread Dustin M. Snell [Unisyn Software, LLC]

I usually use CFPARAM NAME="varname'" DEFAULT=""

Then just check the value with CFIF varname IS ""

There are other ways but this will work.

Dustin M. Snell
Unisyn Software, LLC
Developers of AutoMate - The Leading Automation Software for Windows
http://www.unisyn.com

- Original Message -
From: "Michael S. Kimmett" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Monday, March 05, 2001 8:27 PM
Subject: Determine if a variable has a value


 Hello,

 I am new to ColdFusion, so this will be an easy answer to most of you.  I
am having difficulty trying to determine if a variable in one of my pages
has a value.  What I mean by a value is did I assign it a value or is it
still empty.  I have tried using IsDefined, Evaluate, and other CF
Functions, but they all are failing the test. Any ideas on how to quickly
and easly determine if variable has a value.

 Thanks in advance.

 Michael



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Determine if a variable has a value

2001-03-05 Thread BORKMAN Lee

Hi Michael,
I know you have tried it, but isDefined("variablename") is the basic method.
The quotes are a common trap.  COuld that be your problem?

Good luck,
Lee (Bjork) Borkman
http://bjork.net ColdFusion Tags by Bjork


-Original Message-
From: Michael S. Kimmett [mailto:[EMAIL PROTECTED]]

Hello,

I am new to ColdFusion, so this will be an easy answer to most of you.  I am
having difficulty trying to determine if a variable in one of my pages has a
value.  What I mean by a value is did I assign it a value or is it still
empty.  I have tried using IsDefined, Evaluate, and other CF Functions, but
they all are failing the test. Any ideas on how to quickly and easly
determine if variable has a value.



IMPORTANT NOTICE:
This e-mail and any attachment to it is intended only to be read or used by
the named addressee.  It is confidential and may contain legally privileged
information.  No confidentiality or privilege is waived or lost by any
mistaken transmission to you.  If you receive this e-mail in error, please
immediately delete it from your system and notify the sender.  You must not
disclose, copy or use any part of this e-mail if you are not the intended
recipient.  The RTA is not responsible for any unauthorised alterations to
this e-mail or attachment to it.  

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Determine if a variable has a value

2001-03-05 Thread Matthew Walker

IsDefined("MyVariableName") is what you want.
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists