Q

Creating tables through LotusScript

I wish to create tables through LotusScript. I have tried and it is possible to render an item to HTML in LS (Lotus Script). Is it possible to do this in the backend? Also, has R6 solved this problem?

I'm assuming you want this for a Notes application, since for a Domino Web application you can just store the raw HTML and mark it as passthru, so there is no need to convert it to a rich text table.

It sounds like you've already discovered the NotesUIDocument.Import method for converting HTML to rich text in the front end. No equivalent function exists in back-end LotusScript.

You just want to create tables in the back end and you don't require that they come from HTML, you do have some choices. I recently wrote about them in the Redbook, "Domino Designer 6: A Developer's Handbook", which you can download free. Some of the techniques there are for Notes 6 only, but some work for Notes 5 as well -- the book says which.

The lowdown is, for Notes 5, you can't create a "true" table of any length you desire -- you can, however, copy a table from elsewhere, with a fixed number of rows, and fill data into the rows. You can more or less duplicate the appearance of a table of any number of rows, using one-row tables with very little space between them.

Notes 6 lets you create tables directly from LotusScript and control their length and contents. Many table formatting options are not available from LotusScript in Notes 6, so you may not be able to get exactly the appearance you want this way. However, by combining the two techniques you can generally accomplish what you want -- copy a table from elsewhere that's already formatted the way you want it, and use the NotesRichTextTable and NotesRichTextNavigator classes to add rows and insert data into the cells.

Another alternative available for Notes 5 is to use the Lotus XML Toolkit to create Notes documents by importing DXL data using Java. For Notes 6 you can do the same thing, but the DXL handling capability is built in to LotusScript (NotesDXLImporter class). This is not really covered in the Redbook, but there is a Redbook for R5 "XML Powered by Domino", and the Domino Designer help covers DXL functions for Notes 6.

There are also two third-party tools I know of that let you do rich text creation from LotusScript, with more functionality than is offered in Notes 6. These tools provide a LotusScript callable interface to Notes C API functions for manipulating rich text. They are:

I have not used either of these myself, so I can't offer an evaluation.

This was last published in January 2003

Dig Deeper on Domino Resources - Part 3

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchExchange

SearchContentManagement

Close