Notes of my Lotus Notes Headline Animator

Search My Blog

Wednesday, April 28, 2010

Ways to do Version Controlling/Tracking

Version tracking is a feature that allows you to maintain the history of changes made in a document. And is another interview question.

Version tracking can be achieved in 2 ways. First through the Form properties and the Second is by using the reserved field $VersionOpt.


A. To achieve version tracking through form you need to designate the form as version-tracking form. When you design the form, in the Form Properties > Form Info tab, you can see a section called Versions. It has two drop downs to select. The first one is Versioning with the values as:

i.           New versions become responses
ii.          Prior versions become responses
iii.         New versions become siblings

These descriptions are self-explanatory. After you select a value another drop down, Create versions, will be enabled with the following values:
a. Manual – File, New Version
b. Automatic – File, Save


This would enable the form for version tracking and any changes made to the documents out of this form would be saved as responses / siblings as per the selection made.

B. The other way of enabling version tracking/control is to use the reserved field $VersionOpt.

$VersionOpt field allows you to have version control facility. It allows users to create new version of edited documents on a document-by-document basis.

You make this field as either Editable or Computed. The Computed for display / Computed when composed field types do not work for this reserved field.

If you want all documents created from a form to have same version control option then make it as Computed Text field and specify the Value as any of the numbers from 0 to 6.

The numbers are values for different types of version tracking; i.e.

0 ~ No version tracking
1 ~ New versions become responses if users choose File - Save As New Version when saving
2 ~ New versions automatically become responses when saved
3 ~ Prior versions become responses if users choose File - Save As New Version when saving
4 ~ Prior versions become responses when saved
5 ~ New versions become siblings if users choose File - Save As New Version when saving
6 ~ New versions automatically become siblings when saved

If you want users to have different version methods for different documents created from the same form, then have this field as Editable and select field type as Dialogue List. In the Control tab select Choices as Enter choices (one per line) and add the options 0 to 6 with the user understandable descriptions; e.g.

Don't track versions | 0
Create response if File - Save as New Version is used | 1
Create response automatically | 2
Promote to main document if File - Save as New Version is used | 3
Promote to main document automatically | 4
Create additional main document if File - Save as New Version is used | 5
Create additional main document automatically | 6

Thus, user can make a selection for the type of version controlling that she wants.

No comments: