Evaluates one or more string expressions, dynamically, from left to right. (The results of an evaluation on the left can have meaning in an expression to the right.) Returns the result of evaluating the rightmost expression.


An object; the result of the evaluations.


ColdFusion (2018 release): Introduced named parameters.


Dynamic evaluation functions

Function syntax


See also

DEIIfPrecisionEvaluateUsing Expressions and Number Signs in the Developing ColdFusion Applications





Expressions to evaluate


String expressions can be complex. If a string expression contains a single- or double-quotation mark, the mark must be escaped.This function is useful for forming one variable from multiple variables. For example, to reference a column of the query qNames with a variable, var, using an index value to traverse rows, you could use the following code:

<cfset var=Evaluate("qNames.#colname#[#index#]")>


<!--- This example shows the use of PrecisionEvaluate and DE functions.--->
<h3>Evaluate Example</h3>
<cfif IsDefined("FORM.myExpression")>
<!--- Evaluate the expression --->
<cfset theExpression = Evaluate(Form.myExpression)>
<!--- The DE function prevents the Evaluate function from evaluating
the expression. --->
The value of the expression #Evaluate(DE(FORM.MyExpression))#
is #theExpression#.<br>
<!--- The following line does not use the DE function. --->
The value of the expression #FORM.MyExpression#
is #theExpression#.<br>

<cfcatch type="application">
<cfoutput>Could not evaluate the expression #Form.myExpression#.<br>
Make sure you enter a valid ColdFusion Expression.

<cfform preservedata="yes">
<h3>Enter a ColdFusion expression for evaluation</h3>
<cfinput type="text" name="myExpression" size="60"><br />
<br />
<cfinput type="submit" name="submit">

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy