August 2001
Intermediate to advanced
976 pages
38h 8m
English
IsDefined
IsDefined('variable_name')Determines if the specified variable exists. Returns
True if the specified variable exists or
False if it doesn’t. Note that
IsDefined( ) replaces the deprecated
ParameterExists( ) function. Examples:
<CFSET MyVar="Variable">
<CFSET Form.MyFormVar="Form Variable">
<CFOUTPUT>
<CFIF IsDefined('MyVar')>
Variable MyVar exists:<BR> MyVar = #MyVar#
<CFELSE>
No variable called MyVar exists.
</CFIF>
<P><CFIF IsDefined('MyFormVar')>
Variable MyFormVar exists:<BR> MyFormVar = #MyFormVar#
<CFELSE>
No variable called MyFormVar exists.
</CFIF>
<P><CFIF IsDefined('Queryname.field')>
Variable Queryname.Field exists:<BR> QueryName.Field = #Queryname.Field#
<CFELSE>
No variable called Queryname.Field exists.
</CFIF>
</CFOUTPUT>Read now
Unlock full access