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 think it just makes for better code
not to do it inline.


On Wed, Feb 4, 2015 at 0:21 AM, Mosh Teitelbaum <[email protected]>
wrote:


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 this
method will cause you issues as cf will still try to evaluate both sides of
it even if false.

> There are ways round it using nested evaluate and de statements, but
frankly it just becomes messy and unreadable, I used to do this myself.
> You are better off just using cfif or switch statement instead.




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360051
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to