Andrew Pollack's Blog

Technology, Family, Entertainment, Politics, and Random Noise

STTN - Store more than 32k of non-rich text on a document, and let it still be visible -- even in Notes 6.5.4 and 7.0.1

By Andrew Pollack on 06/01/2006 at 01:51 PM EDT

I don't do "Show and Tell Thursday" all that often. I'm just too heads down right now. Today though, I thought I'd share a tip after having to resolve some customer issues related to a problem that can crop up in newer versions of the Notes client.

Background - What is "Summary" data?

When you save a Notes document, it cannot have more than 32k of "Summary" data on it. Summary data is all the values stored from all the fields on your forms that aren't rich text. It also includes any noteitems written to your document that don't have fields defined on the form. This includes the "Form" item, and anything you write with lotusscript, java, or even formula language using the "field itemname := " syntax. In order to be used in a view, data must be "summary" data on the document.

The Problem -

I have this form which is used to kick off a search in NCT Compliance Search. It builds a list of databases which are to be searched very deeply for all documents related to keyword. That's not like just doing a full text search and getting the top results. In this case, there may be thousands of databases and hundreds of thousands of documents to return. Compliance search writes the results to a database as a background process. Its mostly used for complying with legal requests for records.

The list of databases can be thousands of entries long. In some customer cases, its way too long to be stored as summary text. At save, I store the list as a comma delimited string in a hidden rich text field. That works fine and is easily parsed by the background java agent into an array. Its very quick. The problem is, I want to update in real-time a list on the form of the selected databases. Rich text is not good for that. The form has buttons and things that let you use file masks and wildcards to pick the databases to be searched, so its important that you be able to see the list before you submit the search.

Prior to version 6.5.4 and 7.0.1, I was able to write the data to a set of fields, taking care that none were greater than 16k, and display the values of those fields on the form. The data probably wasn't stored correctly on the document at save time, but it wasn't used anyway. Starting in these new versions, however, an error was raised complete with an unavoidable dialog box.

To try to solve the problem, I wrote a loop in the queryRecalc() event to set all those fields to 'non-summary' but that didn't help.

The Solution -

It turns out that even setting the values to non-summary didn't help because at recalc and save time, the field definitions override what you set in the scripted events, and they go back to summary fields. To get around the issue, when I write the list data out I write it to fields which have no prototype field definition on the form. Fieldvalue_1 -> Fieldvalue_N. As I create these items on the note, I set them to non-summary (notesItem.issummary=false). On the form itself, I have field prototypes set as "ComputedForDisplay" which are named differently, but show the values of the actual note items. Since the field prototypes are computed for display, their data is never saved, and thus never made summary or counted.

To clean up, in the querySave() even I have a loop which removes the noteitems I created as fieldvalue_1 -> fieldvalue_N since they are no longer needed.


There are  - loading -  comments....

My own thoughts on this are...By Richard Schwartz on 06/01/2006 at 10:26 PM EDT
Do I detect chunking going on here? ;-)
Ouch! The difference here is...By Andrew Pollack on 06/01/2006 at 10:58 PM EDT
...the use of the rich text field to store a large volume of data is
transient. Its a one way, one time use to move the data from the user
interface side to the back end agent.

The "Chunking" to which you refer was truly an evil genius hack from the very
bowels of hell, and used to store and interact with critical data.

:-)


Other Recent Stories...

  1. 01/26/2023Better Running VirtualBox or VMWARE Virtual Machines on Windows 10+ Forgive me, Reader, for I have sinned. I has been nearly 3 years since my last blog entry. The truth is, I haven't had much to say that was worthy of more than a basic social media post -- until today. For my current work, I was assigned a new laptop. It's a real powerhouse machine with 14 processor cores and 64 gigs of ram. It should be perfect for running my development environment in a virtual machine, but it wasn't. VirtualBox was barely starting, and no matter how many features I turned off, it could ...... 
  2. 04/04/2020How many Ventilators for the price of those tanks the Pentagon didn't even want?This goes WAY beyond Trump or Obama. This is decades of poor planning and poor use of funds. Certainly it should have been addressed in the Trump, Obama, Bush, Clinton, Bush, and Reagan administrations -- all of which were well aware of the implications of a pandemic. I want a military prepared to help us, not just hurt other people. As an American I expect that with the ridiculous funding of our military might, we are prepared for damn near everything. Not just killing people and breaking things, but ...... 
  3. 01/28/2020Copyright Troll WarningThere's a copyright troll firm that has automated reverse-image searches and goes around looking for any posted images that they can make a quick copyright claim on. This is not quite a scam because it's technically legal, but it's run very much like a scam. This company works with a few "clients" that have vast repositories of copyrighted images. The trolls do a reverse web search on those images looking for hits. When they find one on a site that looks like someone they can scare, they work it like ...... 
  4. 03/26/2019Undestanding how OAUTH scopes will bring the concept of APPS to your Domino server 
  5. 02/05/2019Toro Yard Equipment - Not really a premium brand as far as I am concerned 
  6. 10/08/2018Will you be at the NYC Launch Event for HCL Domino v10 -- Find me! 
  7. 09/04/2018With two big projects on hold, I suddenly find myself very available for new short and long term projects.  
  8. 07/13/2018Who is HCL and why is it a good thing that they are now the ones behind Notes and Domino? 
  9. 03/21/2018Domino Apps on IOS is a Game Changer. Quit holding back. 
  10. 02/15/2018Andrew’s Proposed Gun Laws 
Click here for more articles.....


pen icon Comment Entry
Subject
Your Name
Homepage
*Your Email
* Your email address is required, but not displayed.
 
Your thoughts....
 
Remember Me  

Please wait while your document is saved.