Support 3 or 4 tests
Solved
Is there a simple way to do if-elif-elif in an eval statement? Support 3 or 4 tests
Best answer by David Maislin
There are a couple simple approaches using the Lookup Function or the Eval Function that should be easy to understand and maintain.
IN:

Example 1: The Lookup Function
Under Knowledge Lookups, create a Lookup Table

Add a Lookup Function (Advanced Settings Ignore Case)

Example 2: The Eval Function
The syntax of /^IN$/i.test(direction) is a case insensitive (i) regular expression that tests for a match in the field direction. The ^ and $ represent the beginning and end of the value. The first line of the evan ensures that a direction field is not created if direction is not defined.

Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
