[EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Sunday, September 08, 2002 10:24 PM
Subject: iif usage
Hi, I'm having a problem with iif.
If I do
#iif(qryCustomer.allareas,DE(All
Areas),DE(#ValueList(qryAreas.name,', ')#))#
and qryCustomer.allareas is true, therefore qryAreas
On Sunday, September 8, 2002, at 09:33 , Joe Eugene wrote:
I dont agree with Sean or Dave...
That doesn't surprise me Joe :)
i dont think IIF is necessary but its
a very useful function ... IF USED PROPERLY
I didn't say it wasn't *useful* - I just said it was bad practice and
could always
: Monday, September 09, 2002 11:00 AM
To: CF-Talk
Subject: Re: iif usage
On Sunday, September 8, 2002, at 09:33 , Joe Eugene wrote:
I dont agree with Sean or Dave...
That doesn't surprise me Joe :)
i dont think IIF is necessary but its
a very useful function ... IF USED PROPERLY
I didn't say
: Monday, September 09, 2002 1:59 PM
Subject: Re: iif usage
On Sunday, September 8, 2002, at 09:33 , Joe Eugene wrote:
I dont agree with Sean or Dave...
That doesn't surprise me Joe :)
i dont think IIF is necessary but its
a very useful function ... IF USED PROPERLY
I didn't say it wasn't
On Monday, September 9, 2002, at 11:16 , Joe Eugene wrote:
Good (humor) Sean...~!
No humor at all.
I agree there are bad practices...
(evaluate,cflocation, variable prefixes, spaghetti code and some others)
but i dont think you should include IIF in them...
Well, I've been dealing with
like it and and the
performance from your method is the best it can be, use it. So.
My 2 cents.
Mike
-Original Message-
From: Joe Eugene [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 09, 2002 2:17 PM
To: CF-Talk
Subject: Re: iif usage
Good (humor) Sean...~! I agree
IIF has its place. Someone correct me if I am wrong, but I
thought I read on this list weeks ago that with MX, IIF was
just as fast as CFIF.
I don't think that's possible, although I could be wrong.
When you use IIf or Evaluate, you're evaluating a string as if it were an
expression. I
Dave,
I think Michael Dinowitz stated it if I recall correctly. I am not 100% sure.
Mike
-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 09, 2002 2:43 PM
To: CF-Talk
Subject: RE: iif usage
IIF has its place. Someone correct me if I am wrong
Hi, I'm having a problem with iif.
If I do
#iif(qryCustomer.allareas,DE(All
Areas),DE(#ValueList(qryAreas.name,', ')#))#
and qryCustomer.allareas is true, therefore qryAreas is undefined (I
check for it with an cfif somewhere else), then I get an error
Parameter 1 of function ValueList which
list..
Joe
- Original Message -
From: Ruslan Sivak [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Sunday, September 08, 2002 5:24 PM
Subject: iif usage
Hi, I'm having a problem with iif.
If I do
#iif(qryCustomer.allareas,DE(All
Areas),DE(#ValueList(qryAreas.name
, September 08, 2002 5:49 PM
To: CF-Talk
Subject: Re: iif usage
qryCustomer.allareas should be a 0 or any number other than 0 which
is
True
your statment should look like below.. u dont need DE
#IIF(qryCustomer.allareas, 'All Areas' ,
'#ValueList(qryAreas.name,',')#'
)#
Which means if qryCustomer.allareas
is not looked at...
HTH
-Original Message-
From: Ruslan Sivak [mailto:[EMAIL PROTECTED]]
Sent: Sunday, September 8, 2002 22:25
To: CF-Talk
Subject: iif usage
Hi, I'm having a problem with iif.
If I do
#iif(qryCustomer.allareas,DE(All
Areas),DE(#ValueList(qryAreas.name
PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Sunday, September 08, 2002 6:03 PM
Subject: RE: iif usage
#iif(qryCustomer.allareas,All Areas, '#ValueList(qryAreas.name,',
')#' )#
Doesn't work either.
Parameter 1 of function ValueList which is now qryAreas.name must be
pointing to a valid query
is not defined and qryCustomer.allareas is true:
#iif(qryCustomer.allareas, 'All Areas' , '#ValueList(qryAreas.name,',
')#' )#
-Original Message-
From: Joe Eugene [mailto:[EMAIL PROTECTED]]
Sent: Sunday, September 08, 2002 6:32 PM
To: CF-Talk
Subject: Re: iif usage
Carefully note
On Sunday, September 8, 2002, at 02:24 , Ruslan Sivak wrote:
Hi, I'm having a problem with iif.
Don't use it. If you used cfif, you wouldn't be having these problems. You'
ve got a boolean test and you set a string value which you then test later
(why not just use the same test or at least use
[EMAIL PROTECTED]
Sent: Sunday, September 08, 2002 7:45 PM
Subject: RE: iif usage
That's the whole point, Joe... I have the following code above it
cfif not qryCustomer.allareas
cfquery name=qryAreas datasource=#request.dsn#
somequery
/cfquery
/cfif
So therefore, qryAreas.name will only
Iif is necessary in certain cases. Last time I checked, you can't use
cfif inside other cf tags... (Maybe in mx you can).
Russ
-Original Message-
From: Sean A Corfield [mailto:[EMAIL PROTECTED]]
Sent: Sunday, September 08, 2002 8:48 PM
To: CF-Talk
Subject: Re: iif usage
On Sunday
Iif is necessary in certain cases.
I can't think of a single case in which it's necessary. It's just another
way to perform conditional logic. If you have one way to perform conditional
logic, you can do anything you need, although it might be clumsier in some
situations than an alternative
IIF is never necessary.
-Original Message-
From: Ruslan Sivak [mailto:[EMAIL PROTECTED]]
Sent: Sunday, September 08, 2002 9:45 PM
To: CF-Talk
Subject: RE: iif usage
Iif is necessary in certain cases. Last time I checked, you can't use
cfif inside other cf tags... (Maybe
On Sunday, September 8, 2002, at 08:45 , Ruslan Sivak wrote:
Iif is necessary in certain cases.
No it isn't.
Last time I checked, you can't use
cfif inside other cf tags... (Maybe in mx you can).
You can always restructure such code to not need 'iif()'.
Sean A Corfield --
: Monday, September 09, 2002 12:17 AM
Subject: Re: iif usage
On Sunday, September 8, 2002, at 08:45 , Ruslan Sivak wrote:
Iif is necessary in certain cases.
No it isn't.
Last time I checked, you can't use
cfif inside other cf tags... (Maybe in mx you can).
You can always restructure
At 1/25/2001 06:13 PM +, Stephen Moretti wrote:
snip
Cfoutput#iif(isDefined("Attributes.display"),Trim(attributes.name"_query.
"attributes.display),DE(''))#/cfoutput
This is good advice, and it will also not throw any errors if attributes.display is
not defined. For example:
IIf(
I'm using iif, and running into some weird things. Well first of all I'm
generating CF on the fly, so I need to escape # so that the variables don't
get evaluated until they are in the generated file. For example I'm using
something like this. Is this the right way to do it or is there an
Ruslan,
I'm using iif, and running into some weird things. Well first of all I'm
generating CF on the fly, so I need to escape # so that the
variables don't
get evaluated until they are in the generated file. For example I'm using
something like this. Is this the right way to do it or
ww.cfchick.com
-Original Message-
From: Ruslan Sivak [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 4:05 PM
To: CF-Talk
Subject: iif usage
I'm using iif, and running into some weird things. Well first of all I'm
generating CF on the fly, so I need to escape # so that the
25 matches
Mail list logo