I’m not finding much documentation or any examples on dynamic tables in lotusscript using the new classes. I’m able to create the table, add a row, but not sure how to position the cursor on that new row to add data. Also, I need to update a row vs. adding a new row in some cases. Is there a way to check the value in column/cell (all rows), and if found,update that row or delete that row and add new row. Any tips? Thanks in advance.
Subject: …deleting row where string is found in a cell
Set nav1 = RTitemBody1.CreateNavigator’ see if the Name is already in a row
Dim CName As String
CName = RCDoc.RPTo(0)
If rtnav.FindFirstString(CName, RT_FIND_CASEINSENSITIVE) Then
’ WANT TO REMOVE THE ROW WHERE I FOUND THIS STRING (targetrow)
End If
I see the
Call notesRichTextTable.RemoveRow( [count%] [, targetrow%] )
Is there a way to get the targetrow based on where the string was found? Thanks.
Subject: RE: adding table rows & data with Lotusscript
Please refer to the IBM Redbook Domino Designer 6 A Developer’s Handbook. There’s a chapter there on programming rich text, with many examples.
Reading data from a cell and updating it can be done, but it might be faster as well as easier, if you have another source for all the table data, to simply delete and replace the entire table.
Incidentally, are you also sure this isn’t a suitable application for an embedded view?
Subject: RE: adding table rows & data with Lotusscript
Thanks for the quick reply. I’ve been using the IBM Redbook to get as far as I have gotten, but there are not specifics on finding text within a row and updating it. I came up with a mathematical calculation of what element/cell to go to to start text in a newly added row, but curious if there is an easier way. I’ll investigate the embedded view option as well. Thanks.