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! Second better way: Don't write "if True then True else False"! (parenthesis are unnecessary here, but I feel they make it more readable) Third better way: Don't use cfform! (that's from my form custom tag library, not yet released) :) > I'm

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

2007-03-23 Thread Rob Wilkerson
checked="#something eq 'somethingelse#" That should work just fine. No need for the iff() in this case. On 3/23/07, Richard Cooper <[EMAIL PROTECTED]> wrote: > > I'm assuming there is a noticeable difference in using IFF? Recently I've > been using it quite heavily in forms now i.e. > > checked

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

2007-03-22 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. Are there better ways of doing this? ~| ColdFusion MX7 by AdobeĀ® Dyncamically transform webcontent into A

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

2007-03-22 Thread Rob Wilkerson
t; 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 > really see a good place for it. Until today. =) > > Check this out: > > dollarformat(iif(Cost, cost, 0)) &

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 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 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 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&#

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: >

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 the dollar