Question: I have a column(cse\_dept) where it has integers , I would only like to show the columns where it equals 12 or 39.
Is there a way to do this?

```
  <cfif  (#GetCurrentUser.cse_dept# eq '12'39') >
    <h1>test</h1>
 </cfif>

```

It does not show me a error it just doesn't work the way I would like it.

Answer: 
You can use `listFind`. If the value of `GetCurrentUser.cse_dept` is 12 or 39 `listFind` will return the a number greater than 0

```
<cfif listFind('12,39', GetCurrentUser.cse_dept)>
  <h1>test</h1>
</cfif>

```

`listFind` is case sensitive in case you were searching for something other than numbers. If you need a case-insensitve search you can use `listFindNoCase`

Alternatively you could check for each value separately

```
<cfif GetCurrentUser.cse_dept EQ 12 OR GetCurrentUser.cse_dept EQ 39>
  <h1>test</h1>
</cfif>

```

If you want to check if `GetCurrentUser.cse_dept` is 12 or 39 for any result in your query you can do

```
<cfif listFind(valueList(getCurrentUser), 12) OR listFind(valueList(getCurrentUser), 39)>
  <h1>test</h1>
</cfif>

```
There are a few ways to do this:

Method 1 - Query of Queries

```
<cfquery name="q1" dbtype="query">
   select count(*) records
   from GetCurrentUser 
   where cse_dept in (12,39)
</cfquery>

<cfif q1.records gt 0>
do something
</cfif>

```

Method 2 - List Functions

```
<cfif ListFind(ValueList(GetCurrentUser.cse_dept), 12)
+
ListFind(ValueList(GetCurrentUser.cse_dept), 39) gt 0>
do something
</cfif>

```

Method 3 - Array Functions

```
<cfif ArrayFind(GetCurrentUser['cse_dept'], 12) 
+
ArrayFind(GetCurrentUser['cse_dept'], 39) gt 0>
do something
</cfif>

```

Method 2 is very similar to Matt's second suggstion. One difference is the use of a ValueList function. The second is that instead of using "or", I added the function results together. The results are the same.

Method 3 is probably the fastest. However, depending on where those numbers 12 and 39 come from, Method 1 might be a better approach.