Domino & Notes error

Invalid key value type

Raised by GetDocumentByKey, GetAllDocumentsByKey and related NotesView methods.

What it means

The key passed to a view lookup method is a type the method does not accept.

Common causes

  • A key array with an empty or uninitialised Variant element
  • A key of an unsupported type, such as an object or a fixed-length string
  • A known defect with Variant array keys in some 64-bit Designer and client releases

Quick fixes

  1. Make sure each key is a string, number, NotesDateTime or NotesDateRange
  2. Fill every element of a key array before the call, and convert values with CStr or CDbl
  3. If the code is correct, check the fix list for your Notes and Domino release

Need a hand with this?

Paste your exact message into What's That Error? for a plain-English explanation, or get in touch. I've been supporting Domino and Notes for 28 years.

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.