IF !INLIST(LEN(lcMyString), 0, 1, 3) if (new[] { 0, 1, 3 }.Contains(MyString.Length) == false) Credit: https://stackoverflow.com/questions/16866174/check-if-a-variable-is-in-an-ad-hoc-list-of-values