Monday, 24 September 2012

Notes error: Field is too large (32k) or ....

"Notes error: Field is too large (32k) or View's column & selection formulas are too large". I ran accross this error last week and it took a while to solve, as the error is not as descriptive as it seems.
The error occurred in a lotusscript agent while updating a document after receiving and processing an xml response from a webservice. As the agent is not dealing with changing views or view selection formulas, the problem had to be at field level.
Initially the error indicated its location in the code to be when storing the xml as an attachment on the document. But attachments are stored in rich text fields so that would be impossible.
While debugging the first thing I found is that the error would not occur at the moment an item/field would grow beyond the 32k limit, but at the moment the NotesDocument.Save method is called.
I did find a field that grew past the 32k limit, and solved it by changing the field type to richtext. But still the agent kept nagging with the 32k message.
Debugging on, it took a couple of hours of trial and error and googling around to find what was causing this next 32k limit error.
After a while I discovered that the content of the xml could occasionally contain large numbers repeating data and the agent processes this into 4 fields per repeat. The xml I discovered this on contained a 700+ repeat resulting in 2800+ extra fields on the form. As field summary was not disabled on the fields, this seemed to be causing a 32k message and excluding this code in a next debug run with the same xml confirmed this as no error was produced.
Eventually I solved the problem by replacing these 4 fields per repeat, into combining them in one richtext field using a richtext table.

Conclusion: The error message is a bit misleading, as adding more than 32k characters to a normal text field will cause a 32k error (but we already knew that), but adding lots of fields to a form with field summary enabled (which is default) can also cause this message when the total field summary exceeds the 32k limit.

This is what IBM writes about the error.


Anonymous said...

Welcome to 1989...LOL. My favorite part of the IBM document...
This issue was reported to Quality Engineering as SPR# CSMH46YTN6; however it was found that Notes/Domino is working as designed.

The IBM article also said an enhancement request was submitted. Well the article dates back to version 6, which came out in 2002. I'm guessing that if the "enhancement" hasn't come out in 10 years time, it probably never will.

This has to be one of the most irritating limitations of the product.

Divya Shrivastava said...

Hey Tom,
This article is good and has the description about very common lotus notes error but it is not that much easy to understand.
Can you brief this in easy to understand way, Please....

M Subbirul Muksud said...

Hi there,
I recently stepped on a similar problem and what Tom said was also my solution. It is not complex. Just make your Field RichText (where you are keeping the Return XML) instead of Text Field and guess what ?? thats the solution.

Divya Shrivastava said...

Hi Muksud,
I resolved my problem by using Stellar Pheonix Lotus Notes Recovery software. Anyways thank a lot.

lee woo said...

The only reason for time is so that everything doesn't happen at once. See the link below for more info.