CFM Tutorial     

Cold Fusion Function: ParameterExists


Description

ParameterExists checks to see if a specified variable exists. It returns TRUE if the specified variable exists, and FALSE if it does not exist. The ParameterExists takes a single parameter, the variable to check for. This parameter may be passed as a fully qualified variable, with a preceding variable type designator. Do not enclose the variable name in quotes.

Syntax

ParameterExists(Parameter)

Example

The following example checks to see if a variable of any type name USER_ID exists.
<CFIF ParameterExists(USER_ID) IS "Yes">
The next example checks to see if a CGI variable name USER_ID exists, and ignores variables of other types.
<CFIF ParameterExists(CGI.USER_ID) IS "Yes">

    References

    (1) the Cold Fusion Web Application Construction Kit, Second Edition.

puthik.com.com ©2008