What it means
LotusScript expected an array or list (a container) in a Variant, but the Variant holds a single value or nothing at all.
Common causes
- Using
ForAll or an index such as v(0) on a Variant that holds a scalar value
- A function that normally returns an array returned Empty or a single value
- Reading a field value without
GetItemValue, so a scalar was returned
Quick fixes
- Check with
IsArray(v) or IsList(v) before using ForAll or indexes
- Wrap single values into an array before processing them
- Use
doc.GetItemValue("Field"), which always returns an array
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.