Browse Prior Art Database

Method to synchronize data in a Notes database similar to a relational database.

IP.com Disclosure Number: IPCOM000013580D
Original Publication Date: 2001-May-01
Included in the Prior Art Database: 2003-Jun-18
Document File: 2 page(s) / 44K

Publishing Venue

IBM

Abstract

Disclosed is a method to help synchronize data between documents within a Lotus Notes database. Lotus Notes is not a relational database, and therefore suffers from lack of relational capability. Different document types that may need to keep the same data information (such as Employee serial number, dept, etc.), may exist within the database. This data must exist in both documents, rather than only in one document that can be referenced by the other as would exist in a relational database. When someone changes the value in one document, the other document will still have the old value, unless it is also manually changed (since 2 distinct copies of the same information exists). When many data elements need to be shared, and the dynamics of allowing them to change value exists, keeping information synchronized across documents that share information within Lotus Notes becomes very difficult, and usually requires manual intervention. This publication documents a Lotus Notes Agent that gets executed dynamically whenever a change occurs in a single field (such as project name in Table B). It automatically locates and updates every relevant document in the database application that references that field, to ensure the changes are propagated to the dependent documents as well. The example Lotus Notes Agent script can easily be changed to be adopted to other documents and document types within any Notes database. This relieves some of the burden from the users and the administrators of the database with data synchronization problems in complex applications.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 55% of the total text.

Page 1 of 2

Method to synchronize data in a Notes database similar to a relational database.

Disclosed is a method to help synchronize data between documents within a Lotus Notes database.

Lotus Notes is not a relational database, and therefore suffers from lack of relational capability. Different document types that may need to keep the same data information (such as Employee serial number, dept, etc.), may exist within the database. This data must exist in both documents, rather than only in one document that can be referenced by the other as would exist in a relational database. When someone changes the value in one document, the other document will still have the old value, unless it is also manually changed (since 2 distinct copies of the same information exists). When many data elements need to be shared, and the dynamics of allowing them to change value exists, keeping information synchronized across documents that share information within Lotus Notes becomes very difficult, and usually requires manual intervention.

This publication documents a Lotus Notes Agent that gets executed dynamically whenever a change occurs in a single field (such as project name in Table B). It automatically locates and updates every relevant document in the database application that references that field, to ensure the changes are propagated to the dependent documents as well. The example Lotus Notes Agent script can easily be changed to be adopted to other documents and document types within any Notes database.

This relieves some of the burden from the users and the administrators of the database with data synchronization problems in complex applications.

This Agent can be hooked into an Action Button (such as "Save and Exit"), or by hooking this code into the form to be executed when a document is saved in an edit session (Form event such as QuerySave). This will cause automatic execution of the code (which can be changed to accommodate other document types) to ensure that the critical data that needs to be consistent between 2 or more documents, is kept synchronized.

The Agent code shown in the example below performs this synchronization function between 2 document types (Resource and Allocation), and is executed and hidden from the general users view:

Sub Initialize

'Update allocation. For each allocation, update fields from resource doc. Dim session As New NotesSession

Dim RMS As NotesDatabase 'The current Database

Set RMS = session.CurrentDatabase 'The current database session

Dim i As Integer

Dim ws As New NotesUIWorkspace

Dim uiDoc As NotesUIDocument

Dim RMSDoc As NotesDocument 'This is the Resource document

Dim AllocDoc As NotesDocument 'This is the Allocation document that need to get the updated information

Dim AllocView As NotesView

Dim AllocColl As NotesDocumentCollection 'This is the collection of Allocation documents that need the update

Set AllocView = RMS.GetView("Resource Assignments")

Set uidoc = ws.CurrentDocument

Set RMSdoc = uidoc...