October 2004


I sometimes come across a chunk of PeopleCode that requires a variable be compared to a list of values — like the IN operator in SQL:


If &code = "ABCD" Or &code = "HIJK" Or &code = "OPQR" Then
   ...

If the condition needs to be checked multiple times within the code and the list changes, there will be some effort required to update the code.

A better coding approach is to use an array and its Find method:

read more…