Multiple Rich Text Tables - Updated

Upon reading this article, I found that I really could use this code to compile quick email reports. However when it came down to generating the code that manipulates the tables I seem to have hit a brick wall. I can not seem to be able to create seperate tables, dynamically. I can get the row to create under the new headings but it is actually a part of the older table. Any suggestions?

The code I am running is within an agent. What I need it to do is grab docs from a view, grab certain field values from each doc, populate a table for each doc sorted by a persons name, then if the next doc has a different name email the doc containing the rich text tables.

My biggest problem is getting the agent to force the rich text field to allow for a new table, and not append the new table to the old table. I have tried running the code several different ways, from calling the table at each stage of the creation of the table then populating each field, then the next thing I tried was creating a seperate “Body” field. But since the Maildoc that Notes sends only has one body field it wouldnt send the other “body2” field information.

Subject: Multiple Rich Text Tables

Are the tables nested or not? If they are nested, you are going to have problems. If not, NotesRichTextNavigator and NotesRichTextRange should do the trick.

brandt

Subject: RE: Multiple Rich Text Tables

The code I am running is within an agent. What I need it to do is grab docs from a view, grab certain field values from each doc, populate a table for each doc sorted by a persons name, then if the next doc has a different name email the doc containing the rich text tables. My biggest problem is getting the agent to force the rich text field to allow for a new table, and not append the new table to the old table. I have tried running the code several different ways, from calling the table at each stage of the creation of the table then populating each field, then the next thing I tried was creating a seperate “Body” field. But since the Maildoc that Notes sends only has one body field it wouldnt send the other “body2” field information.

Subject: RE: Multiple Rich Text Tables

If they are nested, you will need to move to either DXL processing or a third party product such as our Midas Rich Text LSX.

Subject: RE: Multiple Rich Text Tables

What does it do, exactly?Please show the relevant source code.

Please tell us where the code is (in an agent, in the Exiting event of field ___, etc).

Please read about the C R I S P Y initiative, and help us to help you.

Though your description of the problem is a bit vague, I suspect you are following the sample code in the article too closely and failing to think about what the methods you are calling actually do. In particular, when you ask for the nth table cell in the rich text field, you are getting the nth table cell in the rich text field – not the nth cell in the table you just inserted. You need to first navigate to the beginning of the last table (the new one), and then start searching for next table cells from that point.