### In Array operator

Basic and Crystal syntax.

##### Usage

`x in [y]`

Is x in the array y?

##### Examples

The following example is applicable to both Basic and Crystal syntax:

Rem Basic syntax
{customer.REGION} In Array ("CA", "HI", "AK")

//Crystal syntax
{customer.REGION} in ["CA", "HI", "AK"]

Is the value of the {customer.REGION} field in the array of state abbreviations?

The following examples are applicable to Crystal syntax:

`{file.COLOR} in ["Red", "White", "Blue"]`

Is the value of the {file.COLOR} field in the array of colors listed in the brackets?

`DayofWeek({file.DATE}) in [2, 4, 6]`

Is the value of the {file.DATE} field, converted to a number that represents the DayOfWeek in the array of numbers listed in the brackets? (Sunday = 1, Saturday = 7)

###### Related topics

Formula 2

Formula 3

Formula 8

Formula 11

Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com