title: ColdFusion ListAppend
body: <p>I am having difficulties trying to use <code>ListAppend</code>.</p>
  
  <p>I have data from a table and this is my code.</p>
  
  <pre><code>&lt;cfquery name="getData" datasource="test"&gt;
    select * from test;
  &lt;/cfquery&gt;
  </code></pre>
  
  <p>Now what I want to do is to make all the values in the column name which I have named it as <code>nm_column</code> into a list using <code>ListAppend</code>.</p>
  
  <pre><code>&lt;cfset dataList = ListAppend('', '#getData.nm_column#')&gt;
  &lt;cfoutput&gt;#dataList#&lt;/cfoutput&gt;
  </code></pre>
  
  <p>What this does is that it only shows the 1st value of the <code>nm_colum</code>. I do understand that I am missing the loop part, thats why its only showing me just the 1st value. So how do I loop it and get all the values to it?</p>
  
  <p>I tried this, but it did not work.</p>
  
  <pre><code>&lt;cfset dataList = ListAppend('', '&lt;cfloop query="getData"&gt;#getData.nm_column#&lt;/cfloop&gt;')&gt;
  </code></pre>
  
  <p>So can someone please teach me the way to properly write that code?</p>