You want to use IIF

syntax:

<cfset var = IIF(foo eq 1, 1, 2)>

At 11:16 PM 3/2/2002 +0200, you wrote:
>I'm using CF 4.5, how can I perform something like this?
>
><cfset variable="<cfif foo eq 1>1<cfelse>2</cfif>">
>
>without needing to do:
>
><cfif foo eq 1>
>     <cfset variable=1>
><cfelse>
>     <cfset variable=2>
></cfif>
>
>
>
>
>
>
______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to