<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>LISTAPPEND</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">LISTAPPEND</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>
Concatenates a list or element to a list. 
</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>
A copy of the list, with value appended. If delimiter = &quot;&quot;, returns a copy of the list, unchanged.
</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>
List 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>ListAppend(list, value [, delimiters ])
</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>
ListPrepend, ListInsertAt, ListGetAt, ListLast, ListSetAt; "Lists" in Chapter&#160;3, "Using ColdFusion Variables," 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">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>
ColdFusion inserts a delimiter character before value. 
</p>

<p>
The following table shows examples of ListAppend processing:
</p>

<p>
</p><div align="left">
<table border="1">
  <caption></caption>
  <tr align="center">    <th>&#160;</th>
    <th>&#160;</th>
    <th>&#160;</th>
</tr>
  <tr align="left">    <td><pre>ListAppend(&#39;elem1,elem2&#39;, &#39;&#39; )
</pre></td>
    <td>
<p>elem1,elem2,</p></td>
    <td>
<p>Appended element is empty; delimiter is last character in list; list length is 2.</p></td>
</tr>
  <tr align="left">    <td><pre>ListAppend(&#39;&#39;, &#39;elem1,elem2&#39; )
</pre></td>
    <td>
<p>elem1,elem2</p></td>
    <td>
<p>List length is 2.</p></td>
</tr>
  <tr align="left">    <td><pre>ListAppend
(&quot;one___two&quot;, &quot;three&quot;, 
&quot;___&quot;)
</pre></td>
    <td>
<p>&quot;one___two_three&quot;</p></td>
    <td>
<p>Inserted the first character of delimiters before &quot;three.&quot;</p></td>
</tr>
</table>
</div>
<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">Example</span><pre>&lt;h3&gt;ListAppend Example&lt;/h3&gt;
&lt;!--- First, query to get some values for our list elements---&gt;
&lt;cfquery name = &quot;GetParkInfo&quot; datasource = &quot;cfdocexamples&quot;&gt;
SELECT PARKNAME,CITY,STATE
FROM PARKS WHERE PARKNAME LIKE `AL%'
&lt;/cfquery&gt;
&lt;cfset temp = ValueList(GetParkInfo.ParkName)&gt;
&lt;cfoutput&gt;
&lt;p&gt;The original list: #temp#
&lt;/cfoutput&gt;
&lt;!--- now, append a park name to the list ---&gt;
&lt;cfset temp2 = ListAppend(Temp, &quot;ANOTHER PARK&quot;)&gt;
...
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="LIST">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">LIST</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>A list or a variable that contains one.</p>

  </td>
  </tr>
  </table>
</div>
<div id="VALUE">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">VALUE</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>An element or a list of elements.</p>

  </td>
  </tr>
  </table>
</div>
<div id="DELIMITERS">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">DELIMITERS</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>A string or a variable that contains one. Character(s) that separate list elements. The default value is comma. </p>
<p>If this parameter contains more than one character, ColdFusion uses only the first character. </p>

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

  </body>
</html>
