Hi,
does anyone know whether it is possible to replicate field-wise, i.e. when two users change a document on different replicas simultaneously, and provided the users changed different fields this will merge into one document instead of creating a replication conflict?
Thanks in advance
Björn
Subject: Field wise replication
You can set properties on individual forms to merge replication conflicts. If user A changes field 1 and user B changes field 2 on the same document, the respective fields will be updated and no replication conflict will be created. There’s also a “do not create conflicts” option, but you don’t want that. It simply discards one version of the document.
Subject: RE: Field wise replication
Riggsby is right but we have found it to be a bit impractical. It is a nice concept for simple forms. Too many forms (ours anyway) have a number of computed fields which always get modified (e.g. EditHistory, SubmittedBy, SubmitTo, etc.). If any one field gets changed on both sides, a conflict results – no merging happens.
Subject: RE: Field wise replication
Right – and there’s no way for Notes to know which fields are unimportant enough that they can just be recalculated, and which ones have some associated code that modifies other fields or even other documents. There are even situations involving simple editable fields which don’t work well with “merge replication conflicts”.
For instance, you have a category keyword field and a separate subcategory field. The choices for subcategory are looked up based on the category value. Here’s part of the hierarchy:
Fruit
Yellow things
A document exists that contains category selection “Yellow things” and subcategory “Bananas”. User A edits this document and changes the Category to “Fruit”. User B on another server edits the same document and changes subcategory to “Daffodils”. Though both are valid combinations as they save the documents, merge replication conflicts gives us a document with “Fruit / Daffodils” – an invalid combination. And since the form code doesn’t execute during a merge, there’s no way for us to detect the error and refuse the merge.
It’s too much to expect Domino to reliably detect the dependencies among your fields. You must write custom agent code to run on new conflict documents to decide whether and how they can safely be merged with their main document.