What it means
LotusScript tried to read or write an array element using an index outside the array's bounds.
Common causes
- Reading
values(1) when the item only has one value
- Looping to
UBound + 1, or assuming arrays start at 1
- Using an array returned by
Split, Evaluate or GetItemValue without checking its size
Quick fixes
- Loop with
For i = LBound(arr) To UBound(arr) rather than fixed numbers
- Check
UBound before reading a specific element
- Use
ReDim Preserve when adding elements to a dynamic array
- Log
Erl in the error handler to find the failing line
Disclaimer
The errors, causes and fixes on this site are carefully researched, drawing on HCL documentation and 28 years of hands-on Domino and Notes experience. Every environment is different, though, and a solution that works in one may not be right for yours. Exact wording can also vary between Domino and Notes versions.
This information is general guidance only and is provided without warranty of any kind. Always back up your data and test changes on a non-production system first. To the extent permitted by law, Bruinsma Services Pty Ltd accepts no responsibility or liability for any loss, damage, downtime or other consequence arising from use of this information. For advice specific to your environment, please contact me.