coldfusion if - 如何在 IF 中查找多个项目

coldfusion if - how to look for several items in an IF

我有一个 if 结构如下:

<cfif #user.personnel_no# is 'xxxxx' or #user.personnel_no# is 'xxxxx' or #user.personnel_no# is 'xxxxx'>
---data
</cfif>

我该怎么做:

<cfif #user.personnel_no# in ('xxxxx','yyyyy','zzzzz')>
---data
</cfif>

查看 if 中的所有值?

或声明一个列表并执行类似

的操作
list = 'xxxxx','yyyyy','zzzzz'

<cfif #user.personnel_no# in list>
    ---data
</cfif>

谢谢。

<cfscript>
user.personnel_no = 'yyyyy' 

asArray = ['xxxxx','yyyyy','zzzzz']
writeOutput(asArray.find(user.personnel_no)) // 2


asList = 'xxxxx,yyyyy,zzzzz'
writeOutput(asList.listfind(user.personnel_no)) // 2

</cfscript>

https://trycf.com/gist/f737ef6d010d4ce37936f1d53d021a62/lucee5?theme=monokai

https://cfdocs.org/listfind

https://cfdocs.org/arrayfind