Lotus Notes to SharePoint Blog

Blog about Dell's Notes Migrator to SharePoint tool and other things related to Lotus Notes migration projects

Selection Formula madness

Notes Migrator for SharePoint includes the ability to use the Notes formula language for selecting documents. 

image

This is almost exactly the same thing as specifying a Selection Formula for a view in Domino Designer.  I say “almost”, because you can use things like the current time of day or the current user, which you can’t do in Notes.

Of course not everyone running migration jobs is a Domino developer.  So we get a lot of questions along the lines of “how do I write a formula that does such and such?” 

Here are is a listing of some of the most commonly requested examples:

Select documents that were created with the “Memo”form:

FORM = “Memo”

Select documents that have attachments:

@Attachments > 0

Select documents that are under a certain size:

@DocLength > 100

Select documents based on certain keyword values:

@IsMember(status; ‘open’:’delayed’)

Select documents that were created after a certain date:

@Created > [12/31/2006]

Select documents that were last modified after a certain date:

@Modified > [12/31/2006]

Select one document based on it’s UNID:

@Compare(@Text(@DocumentUniqueID); “123456789012345678901234567890ab”; [CASEINSENSITIVE]) == 0

Exclude one document based on it’s UNID:

@Compare(@Text(@DocumentUniqueID); “123456789012345678901234567890ab”; [CASEINSENSITIVE]) != 0

Select response documents only:

@IsResponseDoc

Of course you can use AND and OR to combine expressions, etc. 

Remember that Notes views can have selection formulas too.  If you find a view that has the filtering you need already built into it, you can get much better performance by using that view because the select formulas may have been evaluated already and the results cached on your Domino server.

Specifying a view and a formula together can be very powerful as well.  In this case, the formula is only evaluated on the documents selected by the view and a strict subset of the view contents is selected.

4 responses to “Selection Formula madness

  1. Therelee Washington February 6, 2012 at 9:20 pm

    How about between date ranges, say migrating data docs from 01/01/2010 thru 12/31/2010

  2. swalch February 7, 2012 at 8:44 am

    @Modified >= [1/1/2010] & @Modified <= [12/31/2010]

  3. krishna January 21, 2013 at 4:23 am

    how to migrate a particular document alone by giving its docID or name that belong to a specific document