<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>STRUCTCLEAR</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
   <div id="Description">
   <table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
      <tr> 
         <td valign="top" class="name">STRUCTCLEAR</td>
         <td valign="top" nowrap class="compatibility">&nbsp;</td>
      </tr>
      <tr>
         <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
      </tr>


    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Description</span>
<p>
Removes all data from a structure. 
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Returns</span>
<p>
True, on successful execution; False, otherwise.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Category</span>
<p>
Structure functions
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Function syntax</span><pre>StructClear(structure)
</pre>    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">See also</span>
<p>
Structure functions; "Modifying a ColdFusion XML object" in Chapter&#160;35, "Using XML and WDDX," in ColdFusion MX Developer's Guide
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">History</span>
<p>
ColdFusion&#160;MX: Changed behavior: this function can be used on XML objects.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Parameters</span>
<p>

</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Usage</span>
<p>
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</a>. (The article applies to ColdFusion 4.5, 5.x, and ColdFusion&#160;MX.)
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Example</span><pre>&lt;!--- Shows StructClear function. Calls cf_addemployee custom tag which 
   uses the addemployee.cfm file. ---&gt;
&lt;body&gt;
&lt;h1&gt;Add New Employees&lt;/h1&gt;
&lt;!--- Establish params for first time through ---&gt;
&lt;cfparam name = &quot;Form.firstname&quot; default = &quot;&quot;&gt;
&lt;cfparam name = &quot;Form.lastname&quot; default = &quot;&quot;&gt;
&lt;cfparam name = &quot;Form.email&quot; default = &quot;&quot;&gt;
&lt;cfparam name = &quot;Form.phone&quot; default = &quot;&quot;&gt;
&lt;cfparam name = &quot;Form.department&quot; default = &quot;&quot;&gt; 
&lt;cfif form.firstname eq &quot;&quot;&gt;
 &lt;p&gt;Please fill out the form.
&lt;cfelse&gt;
 &lt;cfoutput&gt;
  &lt;cfscript&gt;
   employee = StructNew();
   StructInsert(employee, &quot;firstname&quot;, Form.firstname);
   StructInsert(employee, &quot;lastname&quot;, Form.lastname);
   StructInsert(employee, &quot;email&quot;, Form.email);
   StructInsert(employee, &quot;phone&quot;, Form.phone);
   StructInsert(employee, &quot;department&quot;, Form.department); 
  &lt;/cfscript&gt; 
 &lt;/cfoutput&gt;
&lt;!--- Call the custom tag that adds employees ---&gt;
 &lt;cf_addemployee empinfo = &quot;#employee#&quot;&gt;
 &lt;cfscript&gt;StructClear(employee);&lt;/cfscript&gt; 
 &lt;/cfif&gt;
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="STRUCTURE">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">STRUCTURE</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>


<p>Structure to clear</p>

  </td>
  </tr>
  </table>
</div>

  </body>
</html>
