Searching...
Monday 30 June 2014
6/30/2014 01:26:00 am 0

How to solve Lotus Notes error “Field is too large (32K)”?

IBM Lotus Notes offers various tools and features that help you manage the email communication. It provides document that contains fields which stores the information. Such as: Field Name stores the name of the field, Data Length stores the size of the data in the field in bytes. You can create a Notes document using any of the two methods: either by Manual method or using an agent to create a document.
 
Manual method includes using the user interface e.g.  The Notes menu File > Save.  The programming method included creation of Notes document by using Functions or the Lotus Script Save method
 
You can use the NotesUIDocument class or Notes Document class to programmatically save your notes document. 
 
While creating and saving Notes documents, if the process isn’t accomplished successfully then, various error messages are shown to the user. One such error is: “Field is too large (32K)”.  

NotesDocument & NotesUIDocument class:

•    Notes Document class: 

The Notes Document class represents a document in a database.

NotesUIDocument is a "front end" object & NotesDocument is a "back end" document that is returned by the NotesUIDocument.Document property.

Front object refers to the object that is visible in the user interface or user screen. Backend refers to the object stored on the disk.

CreateDocument method of NotesDocument class:

The CreateDocument method is used to create a new document in the database. It returns the NotesDocument object that represents the new document. You must call the Save (True, True) method , in order to save the new document to disk.

If you are using OLE then the CreateDocument method can be used to create a NotesDocument object without using New.

Set notesDocument = notesDatabase.CreateDocument

The CreateDocument method returns the NotesDocument object that is the newly-created document

•    NotesUIdocument class:

Using this class you can merge up the form and document in the user interface. It handles the NotesDocument object by getting a corresponding handler.
The class contains various properties for handling the front end document updates or status of the user interface, document edit mode cursor location..

AutoReload property: This property value is set to true so that if there is any change in the back end document, it could be automatically updated to the front end document.

Current field property: This property returns the field name that is in focus when the document is in edit mode.

Document property: It represents a document corresponding to the backend document. The return value of the above property is NotesDocument object.

The NotesUIdocument class contains various methods for LotusScript programming. The common among them are: FieldGetText, FieldSetText,Close, OpenNavigator, OpenView etc.

Lotus Notes error “Field is too large (32K)”:

Whenever you enable a summary flag for any document field, corresponding summary information is created. This information is used for showing field values in views, folders or search results. If you don’t want to display any document field then simply disable the Summary flag.
 
In Lotus Notes the summary data size limit is 32K and the entire document size limit is 64K. Whenever the summary data or the document increases the predefined size limits errors will be has grown beyond the defined size limit then the following error will occur:


Once the above error occurs, the document will turn inaccessible. It will not be opened anyway (neither by double click nor by data code) and the property box information will also turn inaccessible. You can only see the Document Info property tab.

The error can occur in following scenarios:

•    Error while creating and saving Notes document:
•    While using the programmatic method for Notes creation user can have to face the below error:
"Field is too large (32k) or View's column & selection formulas are too large"
•    While using the LotusScript agent, the following error can be prompted on the screen:
"Notes error: Field is too large (32k) or View's column & selection formulas are too large"
•    While using the user interface the following error may be prompted to screen:
"Only plain text can be used in this type of field"

"Document has invalid structure"

Cause:

There is predefined size limit of Summary data for the document and the fields in the document. If the document or any field in the document exceeds this predefined size limit then the above errors can occur.

For Notes/Domino 6.x:

•    The maximum size  limit for Summary field per document  is:6 4k
•    The maximum size  limit for Summary field per document  field is: 32K

The document fields are set as summary field by default. Howe ever this limit can be changed by using the NotesItem.IsSummary property
The value of IsSummary flag can be either set to false or true.
If for a notes item the value of this flag is set to true that means it contains summary data. Otherwise if it’s false then it contains non-summary data.

Syntax
To get: flag = notesItem.IsSummary
To set: notesItem.IsSummary = flag

Resolution: The affected documents are still readable in views* as long as the field that exceeded the 32K limit is not being displayed in any of the columns.

After the above error occurs you can see document in view but you can’t access it. In such situation the Compact and Fixup tasks cannot resolve the issue. Sometimes creating a new replica will help you deal with the error but the affected documents cannot be copied.

Create a new view that lists summarized items. From there you can export the data from the view but the Non-summarized fields (like Rich Text) which can’t be displayed in views.

•    If the errors are occurring due to limit exceed by particular document field, then try out the following fix. The fields that are causing problems should be excluded from views. For such items which exceeded the document limit, set the NotesItem.IsSummary property to False.
•    The documents items that are more than 15k in size should be flagged as non-summary items. This includes all items that are edited by a user by using the NotesDocument.ComputeWithForm method.
•    The size of rich text field can be adjusted according to your needs. So, if you have large content then it’s better to put it in a Rich Text field instead of a Text field.
You can use the ComputeWithForm method or the IsSummary propertyto update old documents to correspond with the form
•    It’s recommended to display smaller amount of data in the view. For unusable fields in views it’s better to either remove some of the text or put it in a separate a non summary field.
•    I f you using memos then remember not to make it too large, your recipient list should be small. You can split a single memo into multiple memos then send it. Or you can create a group and send the memo to the group instead of mutiple individual addresses.
•    The size of the whole document, document items and the summary data must be kept as smaller as possible. The content displayed in view must be smaller, for that you can break a large document into multiple documents then display them.

0 comments:

Post a Comment