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

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & 
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273435
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to