Skip to main content
Participant
January 18, 2010
Question

Conditional Expression in ColdFusion

  • January 18, 2010
  • 2 replies
  • 1298 views

Use the function iif().  There is no operator or expression syntax.

This was remarkably hard to find out.  There seem to be a lot of people who don't know what one is.  Also, the term gets used to refer to the condition that is evaluated for a case statement.  The CF case statement is a <cfswitch> I believe.  And it seems to be in an error message that is frequently encountered in an attempt to write a query on a query.

So for experts who know languages and what a conditional expression is, but might be coming to ColdFusion recently like me, this might hopefully get indexed and turn up in searches.

No reply required.

This topic has been closed for replies.

2 replies

BKBK
Community Expert
Community Expert
January 19, 2010
No reply required.

Nah, you're asking for it.

This was remarkably hard to find out.  There seem to be a lot of people who don't know what one is.

Like a decent woman or good wine? It's all about where you look, mate, and the luck o' the draw.

The CF case statement is a <cfswitch> I believe.

The CF case statement is a <cfcase>.

And it seems to be in an error message that is frequently encountered in an attempt to write a query on a query.

I'll leave that one to them experts like you. When I tried to open it, my spanner broke

Participant
January 19, 2010

There are many of us who work in multiple environments. I know

there are lots of deeply expert x/html, css, php, coldfusion, etc

people out there, but I sure wish that there was more in the way of

references that used the terminology of programming languages and

efficiently provided pointers to the constructs needed that don't

begin with "for example" and then proceed with lots of "why you would

want to write a program" and "how to get started writing your own web

site with ". I also wish there were a language

reference with a formal syntax for some of these.

Perhaps I criticize unfairly. I have actually embarked upon simply

reading the w3c definitions, but I don't find such a thing for php,

coldfusion, et al.

Thanks for the reply, and correction.

Turns out, too, that iif() is not quite what it appears. So I've

abandoned conditional expressions and just write flow of control ...

g'day

Ben

Inspiring
January 19, 2010

I'm sure you have a good point in your initial post.  The problem is... I have no idea what it is you're trying to say.  Which - given what I think you're trying to say - seems slightly ironic to me.

So, like, what're you trying to say in your first post?

--

Adam

Inspiring
January 18, 2010

Huh?

--

Adam