In LotusScript, How do you return the number of vaules in a multivalued field?

Hello,In lotus script is there a function for giving the number of elements a multi-valued field?

For example how do I get the number of recipients in the “SendTo” field in a memo document.

I am trying to find something like …

x=num_of_values(doc.SendTo)

But I can’t find a function like this anywhere.

Many thanks in advance.

Subject: correction: UBound(array) + 1

Subject: Many Thanks!

Subject: In LotusScript, How do you return the number of vaules in a multivalued field?

UBOUND will be one lower, since the array starts with 0. Remember to account for this.

Subject: In LotusScript, How do you return the number of vaules in a multivalued field?

The UBound has a default Option Base of 0 but you can change that to 1 by seting “Option Base 1” in the option tab. Then UBound = the number of elements in the array and the first element is Array(1) not Array(0).

Sets the default lower bound for array subscripts to 0 or 1.

Syntax

Option Base base

Elements

base

The default lower bound (either 0 or 1) for all dimensions of all arrays in the module in which the Option Base statement occurs.

Usage

Option Base can be specified only once in a module, and only at the module level. If you use Option Base, it must precede all array declarations and all ReDim statements in the module.

The value set by Option Base applies to all arrays in the module that are either declared by Dim statements or redefined by ReDim statements.

If the module does not include an Option Base statement, the default lower bound for all dimensions of all arrays is 0. For example, a one-dimensional array of 10 elements would use subscripts 0-9.