How to filter Lotus Notes database messages
Lotus Notes allows filtering messages inside folders by some text value from message content and by part of the sender’s or recipient’s address.
GroupDocs.Viewer also allows filtering the rendered messages using the following filters:
- Filter by subject and content using LotusNotesOptions.TextFilter;
- Filter by the sender’s and recipient’s email addresses using LotusNotesOptions.AddressFilter;
As an example, when setting LotusNotesOptions.TextFilteras ‘Microsoft’ the API will render all messages that contain the text ‘Microsoft’ in the message’s subject or body. Whereas, setting LotusNotesOptions.AddressFilteras ‘susan’ will filter messages that contain ‘susan’ as a part of the sender’s or recipient’s address. The following code samples show how to filter the messages.
using (Viewer viewer = new Viewer("sample.nsf"))
{
HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources();
HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources(pageFilePathFormat);
options.LotusNotesOptions.TextFilter = "April 2015";
options.LotusNotesOptions.AddressFilter = "test@test.com";
viewer.View(viewOptions);
}
More resources
GitHub Examples
You may easily run the code above and see the feature in action in our GitHub examples:
- GroupDocs.Viewer for .NET examples, plugins, and showcase
- GroupDocs.Viewer for Java examples, plugins, and showcase
- Document Viewer for .NET MVC UI Example
- Document Viewer for .NET App WebForms UI Modern Example
- Document Viewer for Java App Dropwizard UI Modern Example
- Document Viewer for Java Spring UI Example
Free Online App
Along with full-featured .NET library we provide simple but powerful free Apps. You are welcome to view Word, PDF, Excel, PowerPoint documents with free to use online GroupDocs Viewer App.