Oneof

Determines whether the given value is within a set.

Syntax

Oneof(s1, s2 [, s3 ...])

Parameters

Parameter

Description

s1

The position of the value you want to select within the set. If this value is not a whole number, the function rounds s1 down to the nearest whole value.

s2

The first value in the set of values.

s3 (Optional)

Additional values in the set.

Examples

The following expressions are examples that use the Oneof function:

Expression

Returns

Oneof(3, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)

True (1)

Oneof("John", "Bill", "Gary", "Joan", "John", "Lisa")

True (1)

Oneof(3, 1, 25)

False(0)

Oneof("loan", Fields[*])

Verifies whether any occurrence of Fields has a value of loan.

// Ethnio survey code removed