Iif() Evaluation Weirdness

2015-02-03 Thread Mosh Teitelbaum
, the first argument in the IIF() function evaluates to false (both conditions are false) so only the third argument, De(), should be evaluated. However, for some reason, both the second and third arguments are being evaluated and I'm getting an error message that Element NICKNAME is undefined

RE: Iif() Evaluation Weirdness

2015-02-03 Thread Mosh Teitelbaum
Dave Watts wrote: cfset variables.nickname = Iif( (arguments.nicknameInd NEQ 0) AND (IsDefined(importData.nickname)), De(importData.Nickname), De()) CF is going to verify that the variable exists, because you're referring to it. That's what's happening here. Just because you're using

Re: Iif() Evaluation Weirdness

2015-02-03 Thread Dave Watts
, the first argument in the IIF() function evaluates to false (both conditions are false) so only the third argument, De(), should be evaluated. However, for some reason, both the second and third arguments are being evaluated and I'm getting an error message that Element NICKNAME is undefined

Re: Iif() Evaluation Weirdness

2015-02-03 Thread Russ Michaels
) and a series of indicators (nicknameInd) that indicate if the value from the query should be used (indicator = 1) or not (indicator = 0). In the below code, the first argument in the IIF() function evaluates to false (both conditions are false) so only the third argument, De(), should be evaluated. However

RE: Iif() Evaluation Weirdness

2015-02-03 Thread Mosh Teitelbaum
Thanks Russ (and Dave). That's the route I ended up going to. Kind of annoying as I think the Iif() method produces cleaner code (and I had already written it) but it is what it is. -- Mosh Teitelbaum Russ Michaels wrote If you are going to use a variable that doesn't exist then using

Re: Iif() Evaluation Weirdness

2015-02-03 Thread Dave Watts
cfset variables.nickname = Iif( (arguments.nicknameInd NEQ 0) AND (IsDefined(importData.nickname)), De(importData.Nickname), De()) CF is going to verify that the variable exists, because you're referring to it. That's what's happening here. Just because you're using the DE

Re: Iif() Evaluation Weirdness

2015-02-03 Thread Russ Michaels
Well if you want to try it out then try using nested evaluate(de('')) You can also achieve same using nested quotes like de('stuff') to avoid evaluation, But it just gets messy imho Iif() has its uses for simple inline evaluations, such as select lists or dynamic style classes but beyond that I

iif

2009-07-20 Thread RamaDevi Dobbala
cfquery datasource=askseaton name=get_offices1 result=log select s.office_name,u.userid,s.lead_mgr,iIf(u.userid = s.lead_mgr, u.first , s.lead_note ) as leadMgr from sourcebook_1 s ,user_info u where s.active = 1 and office_id not in(36,37,38,73) order

Re: iif

2009-07-20 Thread Francois Levesque
IIF is a ColdFusion method, you can't use it in SQL like that. What you're probably looking for is CASE: CASE WHEN u.userid = s.lead_mgr THEN u.first ELSE s.lead_note END AS leadMgr Francois Levesque http://blog.critical-web.com/ On Mon, Jul 20, 2009 at 9:31 AM, RamaDevi Dobbala ramadobb

Re: iif

2009-07-20 Thread RamaDevi Dobbala
ya my case should be like that, but i need to pass that result to the cfgrid, along with some ohter rows IIF is a ColdFusion method, you can't use it in SQL like that. What you're probably looking for is CASE: CASE WHEN u.userid = s.lead_mgr THEN u.first ELSE s.lead_note END AS leadMgr

Re: Outputting a hash character in an IIF() function.

2008-01-09 Thread Tom Chiverton
On Wednesday 09 Jan 2008, Ian Skinner wrote: I'm having trouble with this and the usual tricks don't seem to be working. #iif(bgFlag,DE(' style=background-color: #DDFFDD'),DE(''))# Why not just rewrite it so as not to use iif or de ? -- Tom Chiverton Helping to administratively architect

Outputting a hash character in an IIF() function.

2008-01-09 Thread Ian Skinner
I'm having trouble with this and the usual tricks don't seem to be working. #iif(bgFlag,DE(' style=background-color: #DDFFDD'),DE(''))# This fails. I have tried escaping the internal hash character by doubling. I have tried to concatenate chr(35). Everything I do throws exceptions involving

RE: Outputting a hash character in an IIF() function.

2008-01-09 Thread Dave
: Outputting a hash character in an IIF() function. I'm having trouble with this and the usual tricks don't seem to be working. #iif(bgFlag,DE(' style=background-color: #DDFFDD'),DE(''))# This fails. I have tried escaping the internal hash character by doubling. I have tried

Re: Outputting a hash character in an IIF() function.

2008-01-09 Thread Ian Skinner
Tom Chiverton wrote: On Wednesday 09 Jan 2008, Ian Skinner wrote: I'm having trouble with this and the usual tricks don't seem to be working. #iif(bgFlag,DE(' style=background-color: #DDFFDD'),DE(''))# Why not just rewrite it so as not to use iif or de ? Generally because I prefer

Re: Outputting a hash character in an IIF() function.

2008-01-09 Thread Ian Skinner
Dave wrote: Have you tried assigning it to a variable in a cfset and then displaying the variable. Alternately, convert to RGB: style=background-color:rgb(221 255 221)' Yes I can set and use a variable, but I was curious why I would have to do this. Why do I need to create five lines to set

Re: Outputting a hash character in an IIF() function.

2008-01-09 Thread Tom Chiverton
{ bar=b } b seems clearer to me than nested iif and de. -- Tom Chiverton Helping to revolutionarily orchestrate B2B experiences on: http://thefalken.livejournal.com This email is sent for and on behalf of Halliwells LLP. Halliwells

RE: Outputting a hash character in an IIF() function.

2008-01-09 Thread Brad Wood
The hash simply needs to be escaped as #iif(bgFlag,DE(' style=background-color: DDFFDD'),DE(''))# The hash needs to be escaped twice since you are delaying evaluation. The text: style=background-color: DDFFDD Is passed out of the de function as (including the quotes): style

RE: Outputting a hash character in an IIF() function.

2008-01-09 Thread Brad Wood
a hash mark in an iif. (which I answered in my previous reply. ~Brad ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w

Re: Outputting a hash character in an IIF() function.

2008-01-09 Thread Ian Skinner
Brad Wood wrote: The hash simply needs to be escaped as #iif(bgFlag,DE(' style=background-color: DDFFDD'),DE(''))# The hash needs to be escaped twice since you are delaying evaluation. The text: style=background-color: DDFFDD Is passed out of the de function as (including

Re: Outputting a hash character in an IIF() function.

2008-01-09 Thread Ian Skinner
Tom Chiverton wrote: if (foo){ bar=a }else{ bar=b } b seems clearer to me than nested iif and de. This is completely personal preference and a very very small matter. But I generally find less to be clearer then more. -- cfscript if (foo) { bar='a'; } else

RE: Outputting a hash character in an IIF() function.

2008-01-09 Thread Bobby Hartsfield
cfscriptif (foo) {bar='a';} else {bar='b';}/cfscriptuse_number #bar# Now it's one line... who didn't see that coming? :-P ..:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com ~| Adobe® ColdFusion® 8 software 8

Iif and CF 7vs. CF 8

2007-11-06 Thread Lincoln Milner
Hello, all, I have this code snippet below which runs fine on my local workstation (Windows XP, CF 8 IIS 5.1). When I throw it up on our dev server (Windows 2k3, IIS 6, CF 7) I get an index out of bounds error on the second IIF line below. I've looked at the docs and I don't see why this code

RE: Iif and CF 7vs. CF 8

2007-11-06 Thread Dave Watts
cfset uploadFile( IIF(Len(Trim(form.txtFileName)) GT 0, Evaluate(DE(ListGetAt(form.txtFileName, intCounter))), ), ... Why are you using DE inside Evaluate? The point of the DE (Delay Evaluation) function is to prevent the automatic evaluation that occurs within IIF. Dave Watts, CTO, Fig

Re: Just a tidbit for those who might not have use iif before

2007-03-23 Thread Richard Cooper
I'm assuming there is a noticeable difference in using IFF? Recently I've been using it quite heavily in forms now i.e. cfinput type=radio name=myField id=myField value=myValue checked=#IIF(something eq 'somethingelse', DE('Yes'), DE('No'))# / Are there better ways of doing

Re: Just a tidbit for those who might not have use iif before

2007-03-23 Thread Rob Wilkerson
=radio name=myField id=myField value=myValue checked=#IIF(something eq 'somethingelse', DE('Yes'), DE('No'))# / Are there better ways of doing this? ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful

Re: Just a tidbit for those who might not have use iif before

2007-03-23 Thread Peter Boughton
First better way: Don't use strings for booleans! cfinput type=radio name=myField id=myField value=myValue checked=#IIF(something eq 'somethingelse', 1, 0)# / Second better way: Don't write if True then True else False! cfinput type=radio name=myField id=myField value=myValue checked

Just a tidbit for those who might not have use iif before

2007-03-22 Thread Peterson, Chris
I have never really used iif before, I was aware it existed but didn't really see a good place for it. Until today. =) Check this out: dollarformat(iif(Cost, cost, 0)) That says, evaluate cost as a Boolean, if its true (anything but 0 or null) then return cost, otherwise return 0 (so

Re: Just a tidbit for those who might not have use iif before

2007-03-22 Thread Rob Wilkerson
Uh oh. You're probably about to get hammered with responses related to the performance cost... On 3/22/07, Peterson, Chris [EMAIL PROTECTED] wrote: I have never really used iif before, I was aware it existed but didn't really see a good place for it. Until today. =) Check this out

RE: Just a tidbit for those who might not have use iif before

2007-03-22 Thread Andy Matthews
Here come the Iif police. -Original Message- From: Peterson, Chris [mailto:[EMAIL PROTECTED] Sent: Thursday, March 22, 2007 3:10 PM To: CF-Talk Subject: Just a tidbit for those who might not have use iif before I have never really used iif before, I was aware it existed but didn't

RE: Just a tidbit for those who might not have use iif before

2007-03-22 Thread John Rossi
and about whether Cost is truly a Boolean... -Original Message- From: Rob Wilkerson [mailto:[EMAIL PROTECTED] Sent: Thursday, March 22, 2007 3:15 PM To: CF-Talk Subject: Re: Just a tidbit for those who might not have use iif before Uh oh. You're probably about to get hammered

RE: Just a tidbit for those who might not have use iif before

2007-03-22 Thread Heald, Timothy J
Quick, someone find a way to make that need an evaluate(). -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Thursday, March 22, 2007 4:17 PM To: CF-Talk Subject: RE: Just a tidbit for those who might not have use iif before Here come the Iif police. -Original

RE: Just a tidbit for those who might not have use iif before

2007-03-22 Thread Justin Scott
dollarformat(iif(Cost, cost, 0)) You could also use the val() function around the cost variable to do the same thing more efficiently. It will also correct for unexpected non-integer characters in the variable as well. I've found that in almost any situation where iif() looks like it's needed

Re: Just a tidbit for those who might not have use iif before

2007-03-22 Thread Rob Wilkerson
I think I heard something about them going back on tour this year... On 3/22/07, Andy Matthews [EMAIL PROTECTED] wrote: Here come the Iif police. -Original Message- From: Peterson, Chris [mailto:[EMAIL PROTECTED] Sent: Thursday, March 22, 2007 3:10 PM To: CF-Talk Subject: Just

Using Iif and De together...

2006-12-07 Thread Andy Matthews
I KNOW that I've used this method successfully before, but for some reason it's not working correctly now. I've got a radio button in a form. I want to make sure that button is there, and if so use it's value. It it's not there then I want the string N: IIf(NOT StructKeyExists(FORM

Re: Using Iif and De together...

2006-12-07 Thread JediHomer
IIf(StructKeyExists(FORM, listing_openhouse), 'Trim(FORM.listing_openhouse)', 'N') *should* do it :) On 07/12/06, Andy Matthews [EMAIL PROTECTED] wrote: I KNOW that I've used this method successfully before, but for some reason it's not working correctly now. I've got a radio button

Re: Using Iif and De together...

2006-12-07 Thread Michael Dinowitz
second argument. Before the function is processed, the trim function will run and the Trim(FORM.listing_openhouse) will be replaced with text. If this is 'true' then the result of the trim will be treated as a variable, not as a value. I'd rewrite the function as: IIf(NOT StructKeyExists(FORM

RE: Using Iif and De together...

2006-12-07 Thread Andy Matthews
--//- -Original Message- From: Michael Dinowitz [mailto:[EMAIL PROTECTED] Sent: Thursday, December 07, 2006 9:48 AM To: CF-Talk Subject: Re: Using Iif and De together... Two points. The first is that any variable or function used in the last 2 arguments will be evaluated both before and after the tag

RE: Using Iif and De together...

2006-12-07 Thread Bobby Hartsfield
-Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Thursday, December 07, 2006 11:49 AM To: CF-Talk Subject: Using Iif and De together... I KNOW that I've used this method successfully before, but for some reason it's not working correctly now. I've got a radio button

RE: iif: am I understanding correctly?

2006-07-24 Thread Snake
This always makes me laugh. Why don't you make a page with CFIF, then run it Now use IIF() and run it What difference do you see in execution time? Bugger all. If you make a big loop that calls IIF 1000 times then you may notice a difference. Also imagine this code select name = bob #IIF

RE: iif: am I understanding correctly?

2006-07-24 Thread Ashwin Mathew
I've seen debates around this so many times I decided to blog it: http://blogs.sanmathi.org/ashwin/2006/07/24/whento-evaluate-and-iif/ In summary - evaluate() and iif() will perform well when the expressions being evaluated remain static, since the Java classes that are compiled to process

RE: iif: am I understanding correctly?

2006-07-24 Thread Russ
Well we all know what the industry standard has been, but it seems that in real world tests, iif is faster then cfif in some instances, and arguably more readable (especially if you're using it inside a select or radio/checkbox. Russ -Original Message- From: Mike Soultanian [mailto

RE: iif: am I understanding correctly?

2006-07-23 Thread Russ
Looks like that works... and for large values of X, looks like this method is the fastest, followed by iif with DE, followed by cfif. Does this mean that it's no longer true that iif is not efficient? If I'm using it only a few times on a page, and it's a little slower then cfif, I don't really

iif: am I understanding correctly?

2006-07-21 Thread Josh Nathanson
understand how. cfset fieldlist = Customer_ID,FirstName,LastName,Email,Address1,Address2,City,State,State2,Zip,Country,Phone cfloop list=#fieldlist# index=i cfset temp = iif(didquery and didfind, getCust.#i#, DE()) cfparam name=attributes.#i# default=#temp# /cfloop What I don't get is how iif

RE: iif: am I understanding correctly?

2006-07-21 Thread Munson, Jacob
. -Original Message- From: Munson, Jacob [mailto:[EMAIL PROTECTED] Sent: Friday, July 21, 2006 4:22 PM Here's how I understand iif: If the condition is true, return the 2nd parameter, otherwise return the 3rd. So in your example, if (didquery and didfind) returns true, the code

RE: iif: am I understanding correctly?

2006-07-21 Thread loathe
cfif didquery and didfind cfset temp = variables[getCust][i] cfelse cfset temp = /cfif Does the same thing right? -Original Message- From: Munson, Jacob [mailto:[EMAIL PROTECTED] Sent: Friday, July 21, 2006 4:43 PM To: CF-Talk Subject: RE: iif: am I understanding

RE: iif: am I understanding correctly?

2006-07-21 Thread Munson, Jacob
, 2006 3:00 PM cfif didquery and didfind cfset temp = variables[getCust][i] cfelse cfset temp = /cfif Does the same thing right? -Original Message- From: Munson, Jacob [mailto:[EMAIL PROTECTED] Sent: Friday, July 21, 2006 4:43 PM To: CF-Talk Subject: RE: iif

Re: iif: am I understanding correctly?

2006-07-21 Thread Josh Nathanson
This part of the app is not going to take heavy traffic, so the performance hit would be negligible. However going forward I will always take into consideration the possible performance implications of iif/evaluate/DE. Ben -- I guess I like messing around with stuff like this (iif, evaluate

RE: iif: am I understanding correctly?

2006-07-21 Thread Ben Nadel
Josh, I am right with you on that point! I am a huge fan of learning by doing! Keep it up. ... Ben Nadel www.bennadel.com -Original Message- From: Josh Nathanson [mailto:[EMAIL PROTECTED] Sent: Friday, July 21, 2006 6:10 PM To: CF-Talk Subject: Re: iif: am I

RE: iif: am I understanding correctly?

2006-07-21 Thread Munson, Jacob
This part of the app is not going to take heavy traffic, so the performance hit would be negligible. However going forward I will always take into consideration the possible performance implications of iif/evaluate/DE. Yeah, and another thing to keep in mind when memorizing things

Re: Using IIf() in query value

2006-06-05 Thread Tom Chiverton
On Friday 02 June 2006 23:20, Jim McAtee wrote: cfquery datasource=#dsn# INSERT INTO cctransactions ( name, response ) VALUES ( '#form.name#', '#IIf(StructKeyExists(authresponse, http_response), authresponse.http_response, DE())#' ) /cfquery VALUES

Using IIf() in query value

2006-06-02 Thread Jim McAtee
I'm working in CF5. I thought single quotes within strings were always escaped in a cfquery. I have a query using an IIf() in the value and this doesn't appear to be the case. Does this have something to do with how I'm doing the evaluation of the second argument in the IIf() below

RE: The IIf function

2006-05-02 Thread Everett, Al \(NIH/NIGMS\) [C]
It used to be, but is not so anymore, that IIF() was slower than cfifcfelse/cfif. It also used to be true, although I don't think it is any more, that all of the expressions in an IIF() are evaluated even if not used. Not true of cfif. I know in older versions this would cause an error: #iif

The IIf function

2006-05-01 Thread Matthew Chambers
Hi all, Am I correct in saying that the IIf function and the cfif tag work differently on the following scenerio. In the CFIF tag, when the CFIF fails it will jump over the code which follows until a CFELSEIF, CFELSE or CFIF. Here's an example: -- CFIF The cfif failed so this text

Re: The IIf function

2006-05-01 Thread Douglas Knudsen
IIF() is shorthand replacement for IF/THEN/ELSE. Other langs have IIF() too, eh? Thus cfif foo IS 5 foo is 5 cfelse foo is not 5 /cfif is equivalent to IIF(foo IS 5, 'foo is 5', 'foo is not 5') *note...mind the quotes! ' is double quote followed by single quote DK On 5/1/06, Matthew

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:

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

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

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

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

RE: IIF help

2006-04-14 Thread Andy Matthews
] 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

IIf() - Mix literal with variable evaluation

2006-01-09 Thread Jim McAtee
I always run into this, and I've probably come across a solution, but forgotten it. In an IIf() I can easily return the value of a varible by surrounding it in quotes, or return a literal by using DE(), but how to use both? What would be the correct syntax to use in the first argument to IIf

Re: IIf() - Mix literal with variable evaluation

2006-01-09 Thread Zaphod Beeblebrox
cfset a = loc.address IIf(Len(loc.city), DE(, #loc.city#) , DE()) On 1/9/06, Jim McAtee [EMAIL PROTECTED] wrote: I always run into this, and I've probably come across a solution, but forgotten it. In an IIf() I can easily return the value of a varible by surrounding it in quotes, or return

Syntax for IIF statement in report writer

2005-12-06 Thread Claremont, Timothy
I am using the CF report builder and having a tough time with a conditional statement. What I want to achieve is a field on the report that says either C or FFS What I want this to say is... If #query.capdate is before January 1, 1900, show FFS, otherwise show C How do I make this work on the

Re: Syntax for IIF statement in report writer

2005-12-06 Thread Michael Dinowitz
Due to the double evaluation nature of IIF, you have to double escape text results in IIF. For example: IIF(1 eq 1, 'one', 'not one') What you see there is single quotes around double quotes. This can also be done with the DE() function, but that's a waste in my mind. http

iif in MSSQL

2004-09-20 Thread Richard Meredith-Hardy
dear all is there a way of doing the following in a query to MSSQL like you can to access? SELECT field1, field2, iif(field1 = field2,'same','different') AS mynote FROM mytable WHERE etc I appreciate it could be done in a SP or by analysing the output but in this case it is easier

Re: iif in MSSQL

2004-09-20 Thread Massimo Foti
is there a way of doing the following in a query to MSSQL like you can to access? SELECT field1, field2, iif(field1 = field2,'same','different') AS mynote FROM mytable WHERE etc I appreciate it could be done in a SP or by analysing the output but in this case it is easier not to... Check

Re: iif in MSSQL

2004-09-20 Thread Jochem van Dieten
Richard Meredith-Hardy wrote: is there a way of doing the following in a query to MSSQL like you can to access? SELECT field1, field2, iif(field1 = field2,'same','different') AS mynote FROM mytable WHERE etc Look up the CASE .. WHEN .. THEN blabla statement. Maybe even Access

Re: iif in MSSQL

2004-09-20 Thread Qasim Rasheed
http://www.extremeexperts.com/sql/faq/IIForDecode.aspx - Original Message - From: Richard Meredith-Hardy [EMAIL PROTECTED] Date: Mon, 20 Sep 2004 10:36:13 +0100 Subject: iif in MSSQL To: CF-Talk [EMAIL PROTECTED] dear all is there a way of doing the following in a query to MSSQL like

Re: iif in MSSQL

2004-09-20 Thread Richard Meredith-Hardy
Perfect.Thankyou! -- Regards; Richard Meredith-Hardy - r[dot]mh[at]flymicro[dot]com Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations

Quickbooks IIF files???

2004-08-23 Thread Ray Champagne
finding is that Quickbooks needs the import data to be in the Inuit Info File (I think that is what it stands for), or .iif format.Research on an iif file seems to show that it is just another version of a csv file.Has anyone in here ever exported from a db to Quickbooks before?I know how

RE: Quickbooks IIF files???

2004-08-23 Thread Mark Leder
: Quickbooks IIF files??? I am currently building a timesheet application for my company, which is pretty simple.My boss wants me to save her some time by being able to take all the data that I am collecting from the employees and import it into Quickbooks.I have been google-ing this for the past hour

RE: Quickbooks IIF files???

2004-08-23 Thread Mark A. Kruger - CFG
You are correct - the iif file is pretty much a comma delimited ascii file. The answer you need is actually in the quickbooks help files - here's an excerpt. -Mark --- You may also want to refer to the Reference Guide to Import Files Note

RE: Quickbooks IIF files???

2004-08-23 Thread Ray Champagne
Thanks to both of the Mark's... I will try out the second solution. Sometimes you just gotta know where to look for the right info! Ray At 01:51 PM 8/23/2004, you wrote: You are correct - the iif file is pretty much a comma delimited ascii file. The answer you need is actually

IIF doesn't work correctly

2004-03-19 Thread Robert Everland III
I was having some issues on IIF and thought I was using it correctly so I reverified it by looking at the examples in the book and if I copy an example directly out of the docs, it doesn't work. Try this in CFMX 6.1 #IIf(IsDefined(Form.Deliver), Evaluate(DE(Form.Deliver)), DE(no))# That should

Re: IIF doesn't work correctly

2004-03-19 Thread Robert Everland III
I correct myself, the example works, but what I'm trying to do doesn't work. Can anyone look at this and see why it isn't working #iif(listlen(cgi.query_string, ) gt 1, Evaluate(DE(listdeleteat(listdeleteat(cgi.query_string, 1, ), 1, =))), DE(test))# The cgi query_string will have either

RE: IIF doesn't work correctly

2004-03-19 Thread Dave Watts
I was having some issues on IIF and thought I was using it correctly so I reverified it by looking at the examples in the book and if I copy an example directly out of the docs, it doesn't work. Try this in CFMX 6.1 #IIf(IsDefined(Form.Deliver), Evaluate(DE(Form.Deliver)), DE

RE: IIF doesn't work correctly

2004-03-19 Thread Pascal Peters
:45 To: CF-Talk Subject: Re: IIF doesn't work correctly I correct myself, the example works, but what I'm trying to do doesn't work. Can anyone look at this and see why it isn't working #iif(listlen(cgi.query_string, ) gt 1, Evaluate(DE(listdeleteat(listdeleteat(cgi.query_string, 1

Re: IIF doesn't work correctly

2004-03-19 Thread Robert Everland III
I figured it out, must not put double quotes. Bob I correct myself, the example works, but what I'm trying to do doesn't work. Can anyone look at this and see why it isn't working #iif(listlen(cgi.query_string, ) gt 1, Evaluate(DE(listdeleteat(listdeleteat(cgi.query_string, 1, ), 1

IIF() and IsDefined()

2003-04-04 Thread Alexander Sherwood
Help: #IIF(StructKeyExists(struct, 'keyname'),DE(struct.keyname),DE('no key'))#.fails if the key is not present. BUT, cfif StructKeyExists(struct, 'keyname') #struct.keyname# cfelse no key /cfif doesn't. Am I missing something about IIF() and DE()? It looks as if both DE

RE: IIF() and IsDefined()

2003-04-04 Thread Tangorre, Michael
try quotes around the argument passed to DE. DE(struct.keyname) should be DE('struct.keyname') mike -Original Message- From: Alexander Sherwood [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 2:36 PM To: CF-Talk Subject: IIF() and IsDefined() Help: #IIF(StructKeyExists(struct

RE: IIF() and IsDefined()

2003-04-04 Thread Barney Boisvert
you don't need the de() call around the variable name, just put it in quotes: iif(structKeyExists(struct, keyname), struct.keyname, de(no key)) Your code was trying to output a variable with a name equal to the value stored in #struct.keyname#, which isn't what you wanted. Usually, using CFIF

Re: Iif() and StructKeyExist()

2003-02-23 Thread Jann VanOver
someone here can give a good example of a null check added to a cfqueryparam ... Any takers? #Iif(not StructKeyExists(values[i], proximity), DE(null), ' values[i][proximity] '))# Thanks! ~| Archives: http

RE: Iif() and StructKeyExist()

2003-02-22 Thread Aidan Whitehall
I don't think you can use IIF in this case as IIF has a habit of evaluating both results regardless of whether it resolves to true or false. Even if proximity doesn't exist, it will still evaluate values[i][proximity]. Yeah, that's how it's starting to look. Well, thanks for the confirmation

RE: Iif() and StructKeyExist()

2003-02-21 Thread David Collie (itndac)
dont have time to test, but would it not need to something like this??? #Iif(not StructKeyExists(values[i], proximity), DE(null), DE(values[i][proximity])))# You would then need to check the value and decide whether quotes would work Could be wrong... my 2 secs worth -Original

RE: Iif() and StructKeyExist()

2003-02-21 Thread mark brinkworth
I don't think you can use IIF in this case as IIF has a habit of evaluating both results regardless of whether it resolves to true or false. Even if proximity doesn't exist, it will still evaluate values[i][proximity]. Cheers I've got an array of structures and am looping through them

Iif() and StructKeyExist()

2003-02-20 Thread Aidan Whitehall
by apostrophes? #Iif(not StructKeyExists(values[i], proximity), DE(null), ' values[i][proximity] '))# Thanks! -- Aidan Whitehall [EMAIL PROTECTED] Macromedia ColdFusion Developer Fairbanks Environmental Ltd +44 (0)1695 51775

Re: iif usage

2002-09-09 Thread Stephen Moretti
Russ, Seeing as no one has actually answered your question as to why your IIF isn't working, here's the reason. You say that if qryCustomer.allareas is FALSE then and only then you get qryAreas. This is the reason for your IIF not working. When IIF is interpreted by the CF Server all

Re: iif usage

2002-09-09 Thread Sean A Corfield
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

RE: iif usage

2002-09-09 Thread Bryan Love
I agree with Sean. IIF is slow and can ALWAYS be avoided. I'm very fond of using the following syntax as Sean pointed out, except that I use style sheet classes instead of arrays: cfset theMod = currentRow MOD 2 td class=alternateRowColor#theMod# .. /td IIF screws up the color coding

Re: iif usage

2002-09-09 Thread Joe Eugene
Good (humor) Sean...~! 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... Joe - Original Message - From: Sean A Corfield [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent

Re: iif usage

2002-09-09 Thread Sean A Corfield
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

RE: iif usage

2002-09-09 Thread Tangorre, Michael
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. All languages have their fans in terms of language specifics and what to use and what not to use... if you do not like something, don't use it. If you

RE: iif usage

2002-09-09 Thread Dave Watts
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

RE: iif usage

2002-09-09 Thread Tangorre, Michael
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

iif usage

2002-09-08 Thread Ruslan Sivak
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

Re: iif usage

2002-09-08 Thread Joe Eugene
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 !=0 ...display ALL Areas else Display qryAreas.name

RE: iif usage

2002-09-08 Thread Ruslan Sivak
#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 name Russ -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Sunday

RE: iif usage

2002-09-08 Thread Mike Townend
Try #IIF(qryCustomer.allareas, DE('All Areas'), DE('#ValueList(qryAreas.Name)#'))# Havent tested it but it should work... The downside of using an IIF() against an if() statement is that the true and false sections are always evaluated... Whereas a normal if statement if its true the false

Re: iif usage

2002-09-08 Thread Joe Eugene
Carefully note the usage of single and double quotes.. there are there for a reason! and make sure... u have the query.columnName.. u are pointing..to #IIF(qryCustomer.allareas, 'All Areas' , '#ValueList(qryAreas.name,',')#' )# Joe - Original Message - From: Ruslan Sivak [EMAIL

RE: iif usage

2002-09-08 Thread Ruslan Sivak
have commented out the cfif above, so that the query runs in either case, but I'd still like to know how to get the iif to work the way I want it to. Russ P.S. Yes, sorry about missing the single quotes in the middle. I have the following code now, but still has the same problem if the qryAreas

  1   2   3   >