Cfparam - MACROMEDIA COLDFUSION MX 61-CFML Reference

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

Advertisement

cfparam

Description
Tests for a parameter's existence, tests its data type, and, if a default value is not assigned,
optionally provides one.
Category
Variable manipulation tags
Syntax
<cfparam
name = "param_name"
type = "data_type"
default = "value">
See also
cfcookie, cfregistry, cfsavecontent, cfschedule,
Attributes
Attribute
Req/Opt Default
name
Required
type
Optional
default
Optional
Usage
You can use this tag to make the following tests:
To test whether a required variable exists, use this tag with only the
not exist, ColdFusion MX stops processing the page and returns an error.
To test whether a required variable exists, and that it is of the specified type, use this tag with
the
and
name
type, ColdFusion returns an error.
Description
Name of parameter to test (such as "Client.Email " or
"Cookie.BackgroundColor "). If omitted, and if the parameter
does not exist, an error is thrown.
any
The parameter data type:
• any: any type of value
• array: an array value
• binary: a binary value
• boolean: a Boolean value
• date: a date-time value
• guid: a Univerally Unique Identifier that follows the Microsoft/
DCE standard, as follows:
"
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
hexadecimal number.
• numeric: a numeric value
• query: a query object
• string: a string value or single character
• struct: a structure
• UUID: a ColdFusion Universally Unique Identifier, formatted
'
XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXXXXX
hexadecimal number. See
• variableName: a string formatted according to ColdFusion
variable naming conventions.
Value to set parameter to if it does not exist.
attributes. If the variable does not exist or its value is not of the specified
type
cfset
" where 'X' is a
', where 'X' is a
CreateUUID on page
438.
attribute. If it does
name
cfparam
265

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents