Re: IIF help

2006-04-16 Thread Rick Root
Mingo Hagen wrote:
 
 no quotes in the first argument.

thanks everyone.. the quotes were the issue.

Rick

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237846
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


IIF help

2006-04-14 Thread Rick Root
I always have trouble using IIF...

Why doesn't this work?

cfset request.dirsep = iif(lcase(server.os.name) contains 
'windows',de(/),de(\))

It gives me this error:

Parameter validation error for function IIF.
The value of the parameter 1, which is currently lcase(server.os.name) 
contains 'windows', must be a boolean value.

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237739
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: IIF help

2006-04-14 Thread Everett, Al \(NIH/NIGMS\) [C]
Try this:

cfset request.dirsep =
iif(FindNoCase(windows,server.os.name),de(/),de(\)) 


Al Everett (Contractor)
DIGICON Corporation
National Institute of General Medical Science
Information Resources Management Branch
[EMAIL PROTECTED]
301.594.4082

-Original Message-
From: Rick Root [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 14, 2006 8:02 AM
To: CF-Talk
Subject: IIF help

I always have trouble using IIF...

Why doesn't this work?

cfset request.dirsep = iif(lcase(server.os.name) contains
'windows',de(/),de(\))

It gives me this error:

Parameter validation error for function IIF.
The value of the parameter 1, which is currently lcase(server.os.name)
contains 'windows', must be a boolean value.



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237740
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: IIF help

2006-04-14 Thread Douglas Knudsen
cfset request.dirsep = iif(lcase(server.os.name) contains
'windows','/','\')

try that, eh?

Also, no need for DE(), just use all teh quotes luke!   ' foo '  like that

DK

On 4/14/06, Rick Root [EMAIL PROTECTED] wrote:
 I always have trouble using IIF...

 Why doesn't this work?

 cfset request.dirsep = iif(lcase(server.os.name) contains
 'windows',de(/),de(\))

 It gives me this error:

 Parameter validation error for function IIF.
 The value of the parameter 1, which is currently lcase(server.os.name)
 contains 'windows', must be a boolean value.

 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237741
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: IIF help

2006-04-14 Thread Mingo Hagen
iif(
lcase(server.os.name) contains 'windows',
de( \ ),
de( / )
)

no quotes in the first argument.



-- 
Met vriendelijke groet / Kind regards

Mingo J. Hagen.
E-Line Websolutions B.V.Herenweg 160
2101 MT  Heemstede

phone: +31620 775444
fax: +3123 5471920
fax [mingo]: +3184 7594914
e-mail / msn: [EMAIL PROTECTED]
skype: mjhagen
icq: 4775556
url: www.e-line.ws



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237742
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: IIF help

2006-04-14 Thread Andy Matthews
Rick...

It appears you've got quotes around your expression. Remove those and you
should be good.

!//--
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--//-

-Original Message-
From: Rick Root [mailto:[EMAIL PROTECTED]
Sent: Friday, April 14, 2006 7:02 AM
To: CF-Talk
Subject: IIF help


I always have trouble using IIF...

Why doesn't this work?

cfset request.dirsep = iif(lcase(server.os.name) contains
'windows',de(/),de(\))

It gives me this error:

Parameter validation error for function IIF.
The value of the parameter 1, which is currently lcase(server.os.name)
contains 'windows', must be a boolean value.



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237743
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


IIF() HELP!!!

2001-10-31 Thread Jason Green

why is it when you use IIF() and you are checking to see if a variable 
exists, the process will error out?  here is an example:

#IIF(IsDefined(FORM.classCodeID), DE(FORM.classCodeID), DE(ALL))#

if FORM.classCodeID exists, the code works fine.  but if FORM.classCodeID 
doesn't exist, it errors saying it can't find FORM.classCodeID.  shouldn't 
it run the second DE() statement?  am i just not understanding the whole 
IIF() tag?  has anyone else run into this and is there anyway of making it 
work without using lt;CFIFgt; tags?

jason


~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: IIF() HELP!!!

2001-10-31 Thread Mike Townend

AFAIK the IIF tag evaluates both the true and the false sections as the
function is processed... The best thing to do would be cfparam the
variable and check to see if it contains data.

CFPARAM NAME=FORM.classCodeID DEFAULT=

#IIF(Len(FORM.classCodeID), DE(#FORM.classCodeID#), DE(ALL))#


HTH

Mike

-Original Message-
From: Jason Green [mailto:[EMAIL PROTECTED]] 
Sent: 31 October 2001 21:20
To: CF-Talk
Subject: IIF() HELP!!!


why is it when you use IIF() and you are checking to see if a variable 
exists, the process will error out?  here is an example:

#IIF(IsDefined(FORM.classCodeID), DE(FORM.classCodeID), DE(ALL))#

if FORM.classCodeID exists, the code works fine.  but if
FORM.classCodeID 
doesn't exist, it errors saying it can't find FORM.classCodeID.
shouldn't 
it run the second DE() statement?  am i just not understanding the whole

IIF() tag?  has anyone else run into this and is there anyway of making
it 
work without using lt;CFIFgt; tags?

jason



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: IIF() HELP!!!

2001-10-31 Thread Tyler M. Fitch

I ran into this just yesterday.

The issue seems to be that since this is a CF function and not a tag it
processes it inside out.  Not the same as a CFIF where it will skip
elements of the if statement should it be false.

The IIF prepares the two DE arguments before it evaluates it's
conditional statement.  So undefined variables end up throwing errors
still even if they should be skipped.  I ended up needing to use the
CFIF.

The CFIF processes faster anyways, but I still try to avoid it when I
want to do a conditional statement inside the attributes of an HTML tag
to keep the code clean.

Cheers,

t

-Original Message-
From: Jason Green [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 31, 2001 1:20 PM
To: CF-Talk
Subject: IIF() HELP!!!


why is it when you use IIF() and you are checking to see if a variable 
exists, the process will error out?  here is an example:

#IIF(IsDefined(FORM.classCodeID), DE(FORM.classCodeID), DE(ALL))#

if FORM.classCodeID exists, the code works fine.  but if
FORM.classCodeID 
doesn't exist, it errors saying it can't find FORM.classCodeID.
shouldn't 
it run the second DE() statement?  am i just not understanding the whole

IIF() tag?  has anyone else run into this and is there anyway of making
it 
work without using lt;CFIFgt; tags?

jason



~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: IIF() HELP!!!

2001-10-31 Thread James Sleeman

Ok, it's not a problem as such, just the way functions work... before IIF 
can be run (before any function can be run) all the arguments must be 
resolved, the second argument in your example may not be resolved because 
FORM.classCodeID may not exist.  The correct way to write this...

#IIF(IsDefined(FORM.classCodeID), 'FORM.classCodeID', DE(ALL))#

note we are supplying a string expression as the second argument, and the 
third argument is a delayed evaluation of a string expression, if we didn't 
wrap DE around the ALL then if IIF came to evaluate that expression it 
would try to evaluate the varibale ALL, wrapping DE around it causes it to 
evaluate the string ALL.

At 10:20 AM 11/1/2001, you wrote:
why is it when you use IIF() and you are checking to see if a variable
exists, the process will error out?  here is an example:

#IIF(IsDefined(FORM.classCodeID), DE(FORM.classCodeID), DE(ALL))#

if FORM.classCodeID exists, the code works fine.  but if FORM.classCodeID
doesn't exist, it errors saying it can't find FORM.classCodeID.  shouldn't
it run the second DE() statement?  am i just not understanding the whole
IIF() tag?  has anyone else run into this and is there anyway of making it
work without using lt;CFIFgt; tags?

jason



~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: IIF Help

2001-10-23 Thread Philip Arnold - ASP

 Can someone Please help me with this one.

 #iif((dateformat(i, mm-dd-yy) eq (dateformat(qrygetusers1.we_date,
 mm-dd-yy)), de(checked), de())#

#iif((dateformat(i, mm-dd-yy) eq (dateformat(qrygetusers1.we_date,
mm-dd-yy)), de(checked), de())#

With the quotes around the dateformat, you're comparing the text rather than
the evaluated functions, which will never be equal

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

Websites for the real world

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**


 -Original Message-
 From: Joshua Tipton [mailto:[EMAIL PROTECTED]]
 Sent: 17 October 2001 13:22
 To: CF-Talk
 Subject: IIF Help


 
~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: IIF Help

2001-10-21 Thread Bill Holloway

I'd do a dateCompare() or a dateDiff() rather than messing with the
dateFormat().  Something like: #iif( NOT dateCompare(i,
qrygetusers1.we_date), DE('checked'), DE('')#

HTH,
Bill
-Original Message-
From: Joshua Tipton [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 17, 2001 6:22 AM
To: CF-Talk
Subject: IIF Help

Can someone Please help me with this one.

#iif((dateformat(i, mm-dd-yy) eq (dateformat(qrygetusers1.we_date,
mm-dd-yy)), de(checked), de())#

~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: IIF Help

2001-10-21 Thread James Sleeman

At 02:22 AM 10/18/2001, you wrote:
Can someone Please help me with this one.

#iif((dateformat(i, mm-dd-yy) eq (dateformat(qrygetusers1.we_date,
mm-dd-yy)), de(checked), de())#

what was with the extra quotes and brackets ? this looks better...

#iif(dateformat(i, mm-dd-yy) eq dateformat(qrygetusers1.we_date,
mm-dd-yy), de(checked), de())#





--
James Sleeman
Innovative Media Ltd
Phone: (03) 377 6262
http://www.websolutions.co.nz/

CAUTION: The information contained in this email message is confidential 
and may be legally privileged. If the reader of this message is not the 
intended recipient you are notified that any use, dissemination, 
distribution or reproduction of this message is prohibited. If you have 
received this message in error please notify the sender immediately and 
destroy the original message and any attachments.

Views expressed in this communication may not be those of Innovative Media 
Ltd.

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



IIF Help

2001-10-18 Thread Joshua Tipton

Can someone Please help me with this one.

#iif((dateformat(i, mm-dd-yy) eq (dateformat(qrygetusers1.we_date,
mm-dd-yy)), de(checked), de())#
~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists