Can't work out IIF/IsDefined quirk

2000-08-29 Thread Paul Johnston
I got this: Error Diagnostic Information An error occurred while evaluating the expression: #IIF(IsDefined("form.categories"), form.categories, DE(''))# Error near line 51, column 11. Error resolving

RE: Can't work out IIF/IsDefined quirk

2000-08-29 Thread Geoffrey V. Brown
Hi, Use this: #IIF(isdefined("form.categories"), "form.categories", de(''))# Thanks, Geoffrey Vail Brown __ Director of Online Operations Deerfield.com 231.935.4640 [EMAIL PROTECTED] Check out our complete line of Internet leveragi

RE: Can't work out IIF/IsDefined quirk

2000-08-29 Thread Andy Ewings
I think that will return the string "form.categories" instead of the value of the variable. I would have said to try: IIF(isdefined("#form.categories#"), #form.categories#, de('')) -Original Message- From: Geoffrey V. Brown [mailto:[EMAIL PROTECTED]] Sent:

RE: Can't work out IIF/IsDefined quirk

2000-08-29 Thread Bud
On 8/29/00, Geoffrey V. Brown penned: Hi, Use this: #IIF(isdefined("form.categories"), "form.categories", de(''))# Sorry. You can't use isdefined in an IIF. If it's not defined it will still try and reference the variable and return an error. If you must use isdefined

RE: Can't work out IIF/IsDefined quirk

2000-08-29 Thread Paul Johnston
If I can't use IsDefined with IIF, how come the code I was given works then? ;) As far as I am aware, IIF will work with any boolean expression, and IsDefined is probably the most useful boolean function around in CF. Paul -Original Message- From: Bud [mailto:[EMAIL PROTECTED]] Sent

RE: Can't work out IIF/IsDefined quirk

2000-08-29 Thread Chapman, Katrina
Paul, You're right you can use IsDefined in an IIf. I do it all the time. BTW you should probably also trim the form.fieldname. IE: Cfif IIF(IsDefined("form.fieldname"), "Trim(form.fieldname)", DE("")) is "something" The form fieldname equa

RE: Can't work out IIF/IsDefined quirk

2000-08-29 Thread Geoffrey V. Brown
] Subject: RE: Can't work out IIF/IsDefined quirk On 8/29/00, Geoffrey V. Brown penned: Hi, Use this: #IIF(isdefined("form.categories"), "form.categories", de(''))# Sorry. You can't use isdefined in an IIF. If it's not defined it will still try and reference the variable

RE: Can't work out IIF/IsDefined quirk

2000-08-29 Thread Bud
On 8/29/00, Geoffrey V. Brown penned: Hi, Don't mean to disagree, but give that line of code a shot, I use it everywhere in my scripts! You must use double quotes around the variable name though. I stand corrected sir! That's why I love this list. Now if I can just remember that. :) -- Bud

RE: Can't work out IIF/IsDefined quirk

2000-08-29 Thread Scott, Andrew
OTECTED] Subject: RE: Can't work out IIF/IsDefined quirk Hi, Use this: #IIF(isdefined("form.categories"), "form.categories", de(''))# Thanks, Geoffrey Vail Brown __ Director of Online Operations Deerfield.com 231.935.4640 [EMAIL PROTECTED]

dynamic IIf

2000-08-21 Thread Peter Benoit
Having a hard time with this: cfset value="#IIF url.stuff IS "whatever", "something", "something else"#" Tried mixing things up a bit (quotes, pound signs) with no success. Any suggestions? TIA, Pete ---

Re: dynamic IIf

2000-08-21 Thread Jamie Keane
The syntax should be IIF(condition,result1,result2) where result1 occurs if condition is true and result2 occurs if condition is false. -- Jamie Keane Programmer SolutionMasters, Inc. 9111 Monroe Rd., Suite 100 Charlotte, NC 28270 www.solutionmasters.com 704.563.5559 x 228 Voice 704.849.9291

RE: dynamic IIf

2000-08-21 Thread Peter Benoit
Well that's what I have IIF(url.stuff IS "whatever" then "something" else "something else") which is what my line of code essentially says. Though it doesn't work :/ * -Original Message- * From: Jamie Keane [mailto:[EMAIL PROTECTED]] * Sent: Mo

Re: dynamic IIf

2000-08-21 Thread Cary Gordon
Without seeing an example of your code, my best guess is that you are likely doing something which requires the use of DE() (the delayed evaluation function) it the actions. The Iif() function raises some timing issues which are ameliorated by DE(). Cary At 11:43 AM 8/21/2000 -0400, you

Re: dynamic IIf

2000-08-21 Thread Jamie Keane
- From: Peter Benoit [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Date: Monday, August 21, 2000 12:03 PM Subject: RE: dynamic IIf Well that's what I have IIF(url.stuff IS "whatever" then "something" else "something else") which is what my line of

IIf() and DE confusion

2000-07-10 Thread Jim McAtee
I know this can be done, but I'll be hanged if I can figure out the right combination of DE() and ## and quotes and whatever else might be needed. I'm trying to use IIf() in a SQL statement instead of the following: thedate = cfif IsDate(form.thedate)#CreateODBCDate(form.thedate)#cfelseNULL/cfif

RE: IIf() and DE confusion

2000-07-10 Thread Bryan Batchelder
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --_=_NextPart_001_01BFEAAC.DB4262B0 Content-Type: text/plain; charset="iso-8859-1" shouldn't this work?: iif(IsDate(form.th

Re: IIf() and DE confusion

2000-07-10 Thread Jim McAtee
PROTECTED]' [EMAIL PROTECTED] Date: Monday, July 10, 2000 2:25 PM Subject: RE: IIf() and DE confusion This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --_=_NextPart_001_01BFEAAC.DB4262B0 Content-Type: text/plain

Re: IIf() and DE confusion

2000-07-10 Thread Michael Dinowitz
#IIF(IsDate(form.thedate), 'CreateODBCDate(form.thedate)', '''NULL''')# Note the use of single and multiple quotes here in place of DE. Using DE instead will look like one of these: #IIF(IsDate(form.thedate), 'CreateODBCDate(form.thedate)', DE('NULL'))# #IIF(IsDate(form.thedate), DE

Re: IIf() and DE confusion

2000-07-10 Thread Michael Dinowitz
Sorry, missed the use in the wrap. The code would actually be: CFSET thedate=IIF(IsDate(form.thedate), 'CreateODBCDate(form.thedate)', '''NULL''') or CFSET thedate=IIF(IsDate(form.thedate), 'CreateODBCDate(form.thedate)', DE('NULL')) CFSET thedate=IIF(IsDate(form.thedate), DE(CreateODBCDate

Re: IIf() and DE confusion

2000-07-10 Thread Jim McAtee
: Monday, July 10, 2000 3:16 PM Subject: Re: IIf() and DE confusion #IIF(IsDate(form.thedate), 'CreateODBCDate(form.thedate)', '''NULL''')# Note the use of single and multiple quotes here in place of DE. Using DE instead will look like one of these: #IIF(IsDate(form.thedate), 'CreateODBCDate

Re: IIf() and DE confusion

2000-07-10 Thread Michael Dinowitz
True, it would. The problem with IIF is that its a function. Before a function evaluates, any subfunctions AND variables inside it are evaluated. When using the DE functions, it tried to evaluate what was in it, which was a function. This failed, causing the whole thing to fail

RE: OT - IIF function in Access

2000-05-05 Thread Paul Wakefield
I think you've got the SUM and IIF nested the wrony way 'round - try SUM(IIF(site_date {d '2000-04-27'}, totalbirds, 0)) -Original Message- From: Deanna L. Schneider [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 04, 2000 10:07 PM To: [EMAIL PROTECTED] Subject: Re: OT - IIF

OT - IIF function in Access

2000-05-04 Thread Deanna L. Schneider
AND #createodbcdate(month)# GROUP BY site.per_id, person.fname, person.lname /cfquery It works fine, but what I want to do is pull the bird counts for the week, the month and the year. I think I should be able to do it with something like: cfquery name="pullcount" datasource="#dbvar#&

Re: OT - IIF function in Access

2000-05-04 Thread John N Westerlund
I usually see the query coded as: AND site_date #date1# AND site_date #now()# Primitive I know, but tried and true :-) -Original Message- From: Deanna L. Schneider [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thursday, May 04, 2000 3:10 PM Subject: OT - IIF

Re: OT - IIF function in Access

2000-05-04 Thread Deanna L. Schneider
Thanks, John, but that's not really the problem, I don't think. The query works if I use constants like this. cfquery name="pullcount" datasource="#dbvar#" SELECT IIF(10, sum(totalbirds), 0) AS weekbirds, IIF(10, sum(totalbirds), 0) AS monthbirds, IIF(10, sum(totalbi

Re: OT - IIF function in Access

2000-05-04 Thread David E. Crawford
Missing comma in this piece (right before sum(totalbirds). Change that and see what happens. SELECT IIF(site_date {d '2000-04-27'} sum(totalbirds), 0) AS weekbirds, IIF(10, sum(totalbirds), 0) AS monthbirds, IIF(10, sum(totalbirds), 0)AS yearbirds, site.per_id, person.fname, person.lname FROM

<    1   2   3