IBM®
Skip to main content
    Country/region select      Terms of use
 
 
   
     Home      Products      Services & solutions      Support & downloads      My account     

developerWorks  >  Lotus  >  Forums & community  >  Best Practice Makes Perfect

Best Practice Makes Perfect

A collaboration with Domino developers about how to do it and how to get it right in Domino

There seems to be a widespread misconception among novice developers that a document retains some magical connection to the form that was used to create it, so that when they -- let us say -- add a computed field to the form, they expect the computed value to start showing up in views without their doing anything more. I responded to some such person in the 6&7 forum this morning, and I also wrote a bug report for the help folks, suggesting the addition of the following text to the Designing a Form help document:

NOTE: Making a change to a form (adding a field, for instance) does not have any effect on documents previously created with that form. The new field will not be added to existing documents and will not appear in views. Only when you edit and save a document, will the value of the new field be added to it; or, you can write an agent to set the new field in existing documents.

Likewise, when you remove a field from a form, this does not remove the data from your application. Even when you edit a document, if it already contains a value for which there is no longer a field, that value will not be touched.

Sometimes people become confused about this because they add a field that is computed or has a default value, and then they open a document, and the value is already there. This occurs because, when you open a document that doesn't already contain a value for a field, Notes calculates the computed field formula or field default value and displays that value. However, the value is not stored in the document, so it doesn't appear in views, unless you edit and save the document. A view only cares about the data actually stored in the note; it does not check the form to see what fields are "supposed" to be there.

To see the true contents of a document, use the document properties dialog from a view. This will show you what's actually stored in the document note at that time. You can see whether a field value is already stored and what its value is.

I tried to clarify it in my comments on the education materials also (not done reviewing those, must resume!). Any other ideas for getting the word out? Would I be going to extremes if I put in a message the first time you saved a form where there are already existing documents using that form, saying the above briefly with a "don't tell me again" checkbox?

Andre Guirard | 23 July 2007 12:36:47 PM ET | Café Porch, Plymouth, MN, USA | Comments (14)

Search this blog 

Disclaimer 

    About IBM Privacy Contact