User Guide

Table Of Contents
About scopes 67
Creating and using variables in scopes
The following table shows how you create and refer to variables in different scopes in your code.
For more information on the mechanisms for creating variables in most scopes, see “Creating
variables” on page 44.
Scope
prefix
(type)
Prefix
required to
reference
Where available Created by
Variables
(Local)
No On the current page. Cannot
be accessed by a form’s
action page (unless the form
page is also the action page).
Variables in this scope used
on a page that calls a custom
tag can be accessed in the
custom tag by using its Caller
scope; however, they are not
available to any nested
custom tags.
Specifying the prefix Variables, or
using no prefix, when you create the
variable.
Form No On the action page of a form
and in custom tags called by
the action page; cannot be
used on a form page that is
not also the action page.
A
form or cfform tag. Contains the
values of form field tags (such as
input) in the form body when the
form is submitted. The variable
name is the name of the form field.
URL No On the target page of the
URL.
The system. Contains the
parameters passed in the URL
query string used to access the
page.
Attributes Yes On the custom tag page. The calling page passing the values
to a custom tag page in the custom
tag’s attributes.
Caller On the custom
tag page, Yes.
On the calling
page, No
(Variables prefix
is optional).
On the custom tag page, by
using the Caller scope prefix.
On the page that calls the
custom tag, as local variables
(Variables scope).
On the custom tag page, by
specifying the prefix Caller when
you create the variable.
On the calling page, by specifying
the prefix Variables, or using no
prefix, when you create the variable.
ThisTag Yes On the custom tag page. Specifying the prefix ThisTag when
you create the variable in the tag or
using the
cfassociate tag in a
nested custom tag.
Request Yes On the creating page and in
any pages invoked during the
current HTTP request after
the variable is created,
including in custom tags and
nested custom tags.
Specifying the prefix Request when
you create the variable.