Structdelete - MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Reference

Cfml language reference
Table of Contents

Advertisement

Chapter 2: ColdFusion Functions

StructDelete

Removes the specified item from the specified structure.
See also StructClear, StructFind, StructInsert, StructIsEmpty, StructKeyArray,
StructCount, StructKeyArray, and StructUpdate.
Syntax
StructDelete( structure , key [, indicatenotexisting ])
structure
Structure containing the item to be removed.
key
Item to be removed.
indicatenotexisting
Indicates whether the function returns FALSE if key does not exist. The default is
FALSE, which means that the function returns Yes regardless of whether key exists.
If you specify TRUE for this parameter, the function returns Yes if key exists and No
if it does not.
Example
<!--- This example shows how to use the StructDelete function. --->
<HTML>
<HEAD>
<TITLE>StructDelete Function</TITLE>
</HEAD>
<basefont face="Arial, Helvetica" size=2>
<body
<H3>StructDelete Function</H3>
<P>
This example uses the StructInsert and StructDelete functions.
<!--- Establish parms for first time through
<CFPARAM NAME="firstname" DEFAULT="Mary">
<CFPARAM NAME="lastname" DEFAULT="Torvath">
<CFPARAM NAME="email" DEFAULT="mtorvath@allaire.com">
<CFPARAM NAME="phone" DEFAULT="777-777-7777">
<CFPARAM NAME="department" DEFAULT="Documentation">
<CFIF IsDefined("FORM.Delete")>
<CFOUTPUT>
Field to be deleted: #form.field#
</CFOUTPUT>
<P>
<CFScript>
employee=StructNew();
StructInsert(employee, "firstname", firstname);
StructInsert(employee, "lastname", lastname);
StructInsert(employee, "email", email);
StructInsert(employee, "phone", phone);
StructInsert(employee, "department", department);
bgcolor="#FFFFD5">
--->
525

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion 4.5

Table of Contents