This content has been marked as final. Show 3 replies
> I actually want to write the following using the IIF statement:
Not that you asked, but IMO this is a mistake, for the very reason you're
experiencing here: the iif() version of this code is quite difficult to
read (and easy to muck up, as you have).
WHY are you wanting to change it to an iif() expression?
> <cfset label = iif(temp eq 0,DE("-"),(iif(temp gt 0,DE("Over"),DE("Under"))))>
I *suspect* (strongly ~) this is because you are "escaping" the overs and
unders in the nested iff() call, but not in the result of the outer one.
So, if temp happens to be greater than zero, for all intents and purposes
you are left with this line of code:
iif(temp eq 0,DE("-"), "Over")
If this is the case, I think you need to have a DE() around you entire
second iif() expression.
Stick with the CFML
Thanks a lot TSB!
That did the trick.