ColdFusion dynamic evaluation functions

The following table describes the functions that perform dynamic evaluation and are useful in evaluating dynamic expressions:

Function Purpose

DE

Escapes any double-quotation marks in the argument and wraps the result in double-quotation marks. The DE function is particularly useful with the IIF function, to prevent the function from evaluating a string to be output.

For an example of using the DE function with the IIF function, see Using the IIF function.

Evaluate

Takes one or more string expressions and dynamically evaluates their contents as expressions from left to right. (The results of an evaluation to the left can have meaning in an expression to the right.) Returns the result of evaluating the rightmost argument.

For more information on this function see About the Evaluate function.

IIf

Evaluates a boolean condition expression. Depending on whether this expression is True or False, dynamically evaluates one of two string expressions and returns the result of the evaluation. The IIF function is convenient for incorporating a cfif tag in-line in HTML.

For an example of using this function, see Using the IIF function.

SetVariable

Sets a variable identified by the first argument to the value specified by the second argument. This function is no longer required in well-formed ColdFusion pages; see SetVariable function considerations.


View comments in LiveDocs