ColdFusion compare variable to a list - cfif statement

Hi, I have a variable that I want to compare to a list, and if it matches on of the values, then I want to display something.  I don't remember the right way to do this.

Basically, I want this:

<CFIF #value# in (1,2,3)>go</cfif>
wkolasaAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
erikTsomikConnect With a Mentor System Architect, CF programmer Commented:
try this
<cfset lList="1,2,3">
<cfif ListFindNoCase(lList,value) gt 0>
go
</cfif>
0
 
wkolasaAuthor Commented:
Thank you.  Solution worked just as I needed.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.