View comments | RSS feed
Contents > CFML Reference > ColdFusion Functions > StructClear PreviousNext

StructClear

Removes all data from a structure.

True, on successful execution; False, otherwise.

Structure functions

StructClear(structure)

Structure functions

ColdFusion MX: Changed behavior: this function can be used on XML objects.

Parameter

Description

structure

Structure to clear

Do not call this function on a session variable. For more information, see TechNote 14143, "ColdFusion 4.5 and the StructClear(Session) function," at www.coldfusion.com/Support/KnowledgeBase/SearchForm.cfm. (The article applies to ColdFusion 4.5, 5.x, and ColdFusion MX.)

<!--- Shows StructClear function. Calls cf_addemployee custom tag which 
   uses the addemployee.cfm file. --->
<body>
<h1>Add New Employees</h1>
<!--- Establish params for first time through --->
<cfparam name = "Form.firstname" default = "">
<cfparam name = "Form.lastname" default = "">
<cfparam name = "Form.email" default = "">
<cfparam name = "Form.phone" default = "">
<cfparam name = "Form.department" default = ""> 
<cfif form.firstname eq "">
 <p>Please fill out the form.
<cfelse>
 <cfoutput>
  <cfscript>
   employee = StructNew();
   StructInsert(employee, "firstname", Form.firstname);
   StructInsert(employee, "lastname", Form.lastname);
   StructInsert(employee, "email", Form.email);
   StructInsert(employee, "phone", Form.phone);
   StructInsert(employee, "department", Form.department); 
  </cfscript> 
 </cfoutput>
<!--- Call the custom tag that adds employees --->
 <cf_addemployee empinfo = "#employee#">
 <cfscript>StructClear(employee);</cfscript> 
 </cfif>

Contents > CFML Reference > ColdFusion Functions > StructClear PreviousNext

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.

Comments


JeffHouser said on Jan 14, 2004 at 9:40 AM :
Technote 17479; not 14143

http://www.macromedia.com/support/coldfusion/ts/documents/tn17479.htm

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/functa90.htm