This is a problem that appeared in a Notes application which stores a JSON string returned from a remote application in a text field. Despite running successfully for a number of weeks in testing a problem arose where documents in a view could not be processed by an agent or be opened from the view without an error “Field is too large (32K) or View’s column & selection formulas are too large”.
After googling this and trying to see what conditions might be leading to the error identified that there are a range of scenarios that could lead to this. In this case I suspected two factors that might be leading to this. 1) The Json string length is variable and is dependent on the type of job that it represents. A larger amount of textual data could be present in one job and not in another. 2) On checking previously created example documents that were not affected – I noted that the field containing the JSON string has the Summary flag set. This was done by looking at the document properties – right click on the document in the view and select properties. You cannot look at the properties of an affected document without getting the error!
My approach to this problem was two fold. I updated the code to ensure that the Flag was set to false before the document was saved by a Lotuscript agent AND changed the field to a rich text field.
This article is worth reading to understanding some of the summary flag issues and here is the code fragment used to implement it – with the last line changing the summary flag before the document is saved.
valuestring = jobj.readAJobAndReturnData(jobtocheck)
Set newrec = New NotesItem(geopaldoc,”GeopalRequestData”,valuestring)
newrec.IsSummary = false