Home > Domino Tips > Developer > A flexible data export agent for Lotus Notes
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

LOTUSSCRIPT

A flexible data export agent for Lotus Notes


Chuck Connell
03.08.2007
Rating: -2.86- (out of 5)


Lotus Notes and Domino tips, tutorials and how-to articles
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Two years ago, I published a tip called "Putting an end to the frustration of mail merge" that showed how to export data from Lotus Notes to Microsoft Word. I included a sample Microsoft Word document that showed how to use the exported data during a mail merge. I also noted that the same Lotus Notes export agent code works unchanged with Microsoft Excel. Since that time, this has been one of my most popular articles, earning me a reader rating of 4.6 out of 5.

But as I've applied this export agent method within my own work for customers, I've discovered some limitations. Suppose you want to add another export choice that sends a different set of fields to Microsoft Word? You can do this with my older example, but you have to use Domino Designer to create another copy of the export agent. Many Lotus Notes shops simply don't have Domino Designer.

Or suppose you want 10 different kinds of exports for varying situations? In my earlier example, this would get ugly, since you would need 10 nearly identical copies of the export agent.

A solution to these problems would be to allow users to define any number of their own export configurations (field lists and output files) without programming. Such a solution is presented here with a new downloadable sample called "Flexible Data Export from Notes. This time, I've also included an R5 version of the sample right from the start, since I always get that request.

The key new feature in this example is a user-configurable setup view that contains a variable number of Lotus Notes export definitions. Each export definition has a name, and users can choose the style of export from a picklist of these names.

After opening the sample Lotus Notes database, notice that there are two Admin views. The view Admin/Settings is simply a holder for configurable p...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Lotus Notes Domino Agents
How the Agent Profiler tool improves Notes/Domino performance
Run or restart Notes/Domino agents via text messages
Calculating results for a column in a Lotus Notes view
Approve Lotus Notes documents using a BlackBerry mobile device
LotusScript agent indexes Lotus Notes/Domino databases
Top 10 Lotus Notes/Domino coding and development tips of 2008
Open documents in Lotus Notes from the Web without a UNID
Fix and update Lotus Notes documents with limited access
Verify scheduled agent status with Domino Extensible Language (DXL)
Top 10 Lotus Notes Domino programming and development tips of 2007

LotusScript
LotusScript finds the first occurrence of a string from the right
Clear Recent Contacts view and prevent repopulation in Lotus Notes 8.x
Search Microsoft Active Directory with LotusScript
Three steps to trap and handle save conflicts with LotusScript
Troubleshoot agents by displaying LotusScript variables online
LotusScript sorts lists alphabetically
Run or restart Notes/Domino agents via text messages
LotusScript code rebuilds corrupted busytime.nsf file
Soft-code item names to facilitate LotusScript management
LotusScript agent automates selective mail file replication

Database
LotusScript code rebuilds corrupted busytime.nsf file
How to move Notes databases off Domino 8 servers and save disk space
Top 10 Lotus Notes/Domino administration tips of 2008
Batch file runs scheduled Lotus Notes database maintenance tasks
Fix and update Lotus Notes documents with limited access
Programmatically replace the design of Lotus Notes databases
Add a program doc to compact Lotus Notes databases automatically
More efficient local Lotus Notes database replication
Remove orphaned Lotus Notes documents on Domino databases with a 'virtual delete'
Detect and fix 'Manager' access control list settings in Lotus Notes Domino

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


icklists, such as name prefixes. This view is restricted to users with the [Settings] role, so you can control which users may modify application picklists. (There is another hidden view of the picklists that is open to all, so users can see the picklists when creating a document.)

The view Admin/Exports contains the list of export configurations that are key to this sample. This view is also restricted to users with the [Settings] role and also has a matching hidden view to allow all users to see the export choices at runtime. Each export configuration contains:

  • The name of the export.
  • The default filename used for the exported data.
  • A switch that controls whether the export emits a header row with field names. The switch can be either "Header" or "No Header."
  • The list of Lotus Notes field names to be exported when the user chooses this kind of export.
  • A description of the export, which appears in this view.

Within the Lotus Notes export agent, the LotusScript code presents users with the list of export choices found in the Admin/Exports view, by using the command:

The result of all this is that designated users -- with the [Settings] role -- can create new export choices within an application, with a name of their choosing. Each export choice can be completely configured, with its own default output file, header row option and field list. There can be any number of export choices, each of which takes up very little space in the Lotus Notes database.

To test the downloaded sample:

  1. Select some documents in view #1, pull down the command Actions -> Export Data.

  2. Select one of the export choices, and then follow the other prompts.

  3. Test the configurability by modifying (or adding) to the export choices in the Admin/Exports view.

  4. Run the export again.

To create a new document within the Settings or Export views, copy and paste an existing document with Ctrl-C/Ctrl-V.

About the author: Chuck Connell is president of CHC-3 Consulting, which helps organizations with all aspects of Lotus Notes and Domino.

Do you have comments on this tip? Let us know.

Related information from SearchDomino.com:

  • Expert Advice: Exporting data from Microsoft Excel to Lotus Notes
  • Expert Advice: Importing data from a text file into a Lotus Notes calendar
  • Tip: Exporting email from Lotus Notes to .EML messages
  • Tip: Creating Microsoft Word documents from Lotus Notes

    Please let others know how useful this tip is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our tip contest and you could win a prize.

    Rate this Tip
    To rate tips, you must be a member of SearchDomino.com.
    Register now to start rating these tips. Log in if you are already a member.




    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



  • Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
    HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




    All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts