<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>LISTVALUECOUNTNOCASE</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">LISTVALUECOUNTNOCASE</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>
Counts instances of a specified value in a list. The search is case-insensitive. 
</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>
The number of instances of value in the 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">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>ListValueCountNoCase(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>
ListValueCount; "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">Example</span><pre>&lt;cfquery name = &quot;SearchByDepartment&quot; datasource = &quot;cfdocexamples&quot;&gt;
SELECT    Department
FROM    Employees
&lt;/cfquery&gt;

&lt;h3&gt;ListValueCountNoCase Example&lt;/h3&gt;
&lt;p&gt;This example uses ListValueCountNoCase to count employees in a department.

&lt;form action = &quot;listvaluecountnocase.cfm&quot;&gt;
&lt;p&gt;Select a department:&lt;/p&gt;
   &lt;select name = &quot;departmentName&quot;&gt;
         &lt;option value = &quot;Accounting&quot;&gt;
            Accounting
         &lt;/OPTION&gt;   
         &lt;option value = &quot;Administration&quot;&gt;
            Administration
         &lt;/OPTION&gt;   
         &lt;option value = &quot;Engineering&quot;&gt;
            Engineering
         &lt;/OPTION&gt;   
         &lt;option value = &quot;Sales&quot;&gt;
            Sales
         &lt;/OPTION&gt;                     
   &lt;/select&gt;
   &lt;/select&gt;
&lt;input type = &quot;Submit&quot; name = &quot;Submit&quot; value = &quot;Search Employee List&quot;&gt;
&lt;/form&gt;
&lt;!--- wait to have a string for searching defined ---&gt;
&lt;cfif IsDefined(&quot;FORM.Submit&quot;) and IsDefined(&quot;FORM.departmentName&quot;)&gt;
   &lt;cfset myList = ValueList(SearchByDepartment.Department)&gt;
   &lt;cfset numberInDepartment = ListValueCountNoCase(myList,
      FORM.departmentName)&gt; 
       
   &lt;cfif numberInDepartment is 0&gt;
      &lt;h3&gt;There are no employees in &lt;cfoutput&gt;#FORM.departmentName#      &lt;/
cfoutput&gt;&lt;/h3&gt;
   &lt;cfelseIf numberInDepartment is 1&gt;
      &lt;cfoutput&gt;      &lt;p&gt;There is only one person in #FORM.departmentName#.
      &lt;/cfoutput&gt;
   &lt;cfelse&gt;
      &lt;cfoutput&gt;      &lt;p&gt;There are #numberInDepartment# people in 
#FORM.departmentName#.
      &lt;/cfoutput&gt;
   &lt;/cfif&gt;
&lt;/cfif&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>String or number, or a variable that contains one. Item for which to search. The search is case-insensitive. </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 processes each occurrence of each character as a delimiter. </p>

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

  </body>
</html>
