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 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 dollarFormat does not break) This is great instead of a <cfif> around the whole thing. Kinda cool =) Chris ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create Web Applications With ColdFusion MX7 & Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273437 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4