If the list is finite, another option is to use a Table Lookup.
Populate the Table with the valid values. Each Valid value returns a “Y” and the default (notfound) returns an “N”. Have the Table Lookup populate a temp variable, then test the temp variable for Y or N and react accordingly.
If you need to use Tcl, rather than write a snippet which can only be used once, why not write an Xlate proc which is driven by argument(s) and does a string match wherin the components of the string match command are built from the argument(s). The arguments can be passed at the invocation of the proc or (I do this a lot) place the argument(s) in temp variable(s) and include them in the Action which invokes the proc. The proc then searches for the argument(s) in the xltInList and gets the argument(s) value from the corresponding xlateInVals.
This proc then can be used to look for any string matches in any Xlate related to any field or set of fields. Write it once use it many times.
Jim Kosloskey
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.