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

I'm sorry there's  been such a long interval between posts -- very busy developing new product features. I hope to make it worth the wait by providing something useful now.

I've been working on this as I could find time, and I think it's ready to post for people to try out and add on to. I've written about it before, but it wasn't finished enough to post at that time.

What we have here is an end-user tool that includes a toolbar button you can click while you have a replication conflict document open or highlighted (or the main document), and it will open the replication conflict and main document side by side to compare them visually. There's also a list of the field differences and a marked-up version of any rich text showing what has changed (text differences only, I'm afraid, but still helpful).

This is provided "as is" for you to play with and comment on -- if you have a problem, please do not call Lotus Support! But you can post a comment here.

When you open the database, installation and use instructions will be visible.

The "diff" action is not described in the instructions; it lets you launch an external application of your choice on the text rendering of the entire document (text in OS style fields seems to be missing, unfortunately -- must write another bug report). I mean to change this to use the DXL versions of the documents run through XSLT to prettify it, but this will require a little work and a version of Notes that doesn't have the DOM parser bug that I wrote about previously. In the meantime, if you use winmerge, my favorite tool for the purpose, the proper command line is:

"C:\Program Files\winmerge\WinMerge.exe" /e /x /ub /wl /wr /dl "Original Document" /dr "Conflict Document" "%1" "%2"

(substituting the appropriate filepath, of course).

Attachment: docConflict.nsf

NOTE: The application was created using version 8.0. I think it will work in 7.0 also; if not please tell me. Earlier than 7.0 is not a good bet.

In case the "Install" button doesn't work for you, here's the code for the toolbar button:

_dbpath := @Environment("DocConflictPath");
@If(_dbpath = ""; @Return(@Prompt([Ok]; "Conflict Resolver"; "Conflict Tool path unknown -- you must open the database so it can register itself in your notes.ini (DocConflictPath)")); "");
ENVIRONMENT Param1 := @Name([CN]; @DbName[1]) + "|" + @DbName[2] + "||" + @Text(@DocumentUniqueID);
@Command([Compose];  @Left(_dbpath; "!!") : @RightBack("!!"+_dbpath; "!!"); "ConflictFinder");
@If(@Elements(@Explode(@Environment("Param1"); "|"; 1)) = 6;
  @Command([FileOpenDatabase]; @Left(_dbpath; "!!") : @RightBack("!!"+_dbpath; "!!"));
@Environment("Param1") != "!";
  @Prompt([Ok]; "Conflict compare"; "There was a problem... either I couldn't find the other document to compare to, or couldn't open the database, or... See status bar for a clue.");

and here's the image I use on the button: conflict.gif

Andre Guirard | 11 September 2007 11:00:00 PM ET | Plymouth, MN, USA | Comments (14)


1) Little error
JY Riverin | 9/12/2007 8:16:20 AM


I have a little error when i click Install in the InstallXML Sub

{ Link }

I'm using Win Xp on Notes 6.5.4 (French)

Any ideas?


2) re: Little error
Andre Guirard | 9/12/2007 8:42:21 AM

The DXL it's trying to import was generated in version 8.0. I'm guessing there's something in the binary item data that the import function in version 6.5.4 doesn't understand. I've edited the post and added the code for the toolbar button so that you can create it manually, but I'm far from certain that the whole thing will work in 6.5.4 -- please let me know.

3) This is unbelievable!
Elijah Lapson | 9/12/2007 9:47:31 AM

I have a couple of DB admins who are going to love this. FYI no problems in 7.0.2.

Thanks a ton.


4) Yes sir
JY Riverin | 9/12/2007 1:23:56 PM

André : It works!!!!!! :-))

Thank you,


5) Tool for Replication Conflict resolution
John L | 9/13/2007 4:28:33 AM

I have just had a quick play with this and it seems to work fine in 6.5.2 - fantastic thanks

6) Minor error
Tim | 9/18/2007 1:37:15 AM

Andre you are my hero! I've been looking for a tool like this.

One minor issue, I get the following error twice each time I run it:

"Notes Error - Specified command is not available from the workspace."

If I ignore this error and click ok it seems to work correctly. Any idea how to stop this error?

Have tried in v8 and v6.5.4 but get same error in both.



7) Very Impressive
Theo Heselmans | 9/18/2007 8:54:00 AM

Hi André,

Great Job.

Tx a lot.

8) re: Minor error
Andre Guirard | 9/18/2007 4:47:21 PM

Haven't seen it and you seem to be the only one reporting this; can you narrow it down some? Please send email.

9) re: Minor error
Tim | 9/19/2007 7:18:08 AM

Tried again on fresh install of notes and it worked perfectly. Must have been something wrong with the settings on my computer. Once again thanks for a great tool.

10) 6.5.4 seems to like it
Doug Finner | 9/24/2007 8:36:47 AM

The only thing that is obviously failing is the installer and the code you posted for the tool button works great.


The output of your code seems to be a superset of what WinMerge produces; WinMerge seems to just check fields that are visible while your code does hidden fields also. While users only have direct influence over visible and editable fields, the hidden fields can impact workflow status so it's good to know everything that differs between the docs (++ for Andre)

The WinMerge output displays the full field data with changes highlighted while your code displays the changed bits plus some data around the changed bits (ie yours is more concise). For routine use, I don't think I'll need the full WinMerge version and your excerpted version is better (++ for Andre)

I haven't looked at the code so I'm still trying to figure out what the action buttons are all for. (-- for lazy developer wanting everything tied up in a nice neat package with all the I's dotted...).

I ran the db through the TeamStudio Best Practice filter and came up with only one 'high' flag. Form 'CompareConflictVert' was flagged as being > 76,000 bytes in size. There were a number of low and medium flags that don't seem terribly important. If I find different, I'll let you know. Seems like the code is all legal for 6.5.4. I may try to recompile and see if anybody complains...

LOVE IT! Many thanks.


ps - if you want the TS output, my email is posted at LDD, just ping me and I'll send the output.

11) Great Tool !!!
Brad G | 9/26/2007 4:07:17 PM

Works great in 7.0.2 and easier to use than TeamStudio's Delta product for comparing conflict documents.

12) Tool for Replication Conflict resolution
Julian Fernandez | 7/28/2008 4:52:29 PM

I can't download the file docConflictAPG.nsf link is missing. thanks you

13) Tool for Replication Conflict resolution
Andre Guirard | 8/1/2008 9:59:52 PM

Julian, works for me; maybe try again?

14) some thing is missing
Laura | 11/4/2009 12:04:02 AM

hi you have done a great job, i have a query related to the same i hv installed this tool but i have a scenario some one deleted the parent doc of conflict document when i selects this conflict document and runs the tool then it is not showing the differance in the fields. hope only you could help me.

15) Tool for Replication Conflict resolution
Andre Guirard | 11/10/2009 10:12:25 AM

@Laura, I'm not sure I understand. You want the tool to show you the differences between the selected document and a document that no longer exists? I'll add that to my list, but I'm still working on that whole spinning-straw-into-gold thing and after that I have to figure out how to levitate, so it may be a while before I get to it.

16) A more general free tool that does this, too
Jamie Magee | 8/3/2010 5:40:15 PM

MartinScott's NoteMan.DocDelta ({ Link } ) is a freeware toolbar that does the same thing for Notes 6 and later, Win/Mac/Linux. Also lets you merge field values between a loser and winner, swap winner and loser (including all child docs), delete the loser, etc. And it works on ANY two documents, even across databases. E.g., you can compare the field level differences between two Server documents in different address books.

Simply highlight the first doc, click the toolbar button, then do the same for any other document anywhere in Notes.

The site indicates there's a fee for this tool, but at this time the current download version 2.0.6 does not need a registration key even after 30 days.

17) how to add the button to the Client toolbar
Sang | 8/17/2010 3:31:01 AM

I have changed the DXL for the install button according to my requirements.the outline entry is displaying in the bookmark database but the install button is not showing in the client toolbar. What need to be done so that it will be display on client toolbar.

 Add a Comment
Comment:  (No HTML - Links will be converted if prefixed http://)
Remember Me?     Cancel

Search this blog 


    About IBM Privacy Contact