Evaluate - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

Evaluate

Description
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.
Returns
An object; the result of the evaluation(s).
Category
Dynamic evaluation functions
Function syntax
Evaluate(string_expression1 [, string_expression2 [, ... ] ] )
See also
DE,
IIf
Parameters
Parameter
string_expression1,
string_expression2...
Usage
String expressions can be complex. If a string expression contains a single or double quotation
mark, it 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,
could use the following code:
<cfset var=Evaluate("qNames.#colname#[#index#]")>
For more information, see
ColdFusion MX Applications.
Example
<!--- This shows the use of DE and Evaluate --->
<h3>Evaluate Example</h3>
<cfif IsDefined("FORM.myExpression")>
<h3>The Expression Result</h3>
<cftry>
<!--- Evaluate the expression --->
<cfset myExpression = Evaluate(FORM.myExpression)>
<!--- Use DE to output the value of the variable, unevaluated --->
<cfoutput>
<I>The value of the expression #Evaluate(DE(FORM.MyExpression))#
is #MyExpression#.</I>
</cfoutput>
...
468
Chapter 3: ColdFusion Functions
Description
Expressions to evaluate
Chapter 4, "Using Expressions and Pound Signs,"
, using an index value to traverse rows, you
var
in Developing

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents