I have a form that populates a Rich Text Field with a Table (the table is in the RTF) when a document is created. The table starts with two rows. I want to add a ‘add’ button which will add a row to this table each time that it is clicked. I can’t seem to find the right command or script to make this happen.
Any help would be greatly appreciated!
Subject: Can’t Add Row to Table
I don’t think there is an @Command for it, but the below LotusScript snippet should be about right:
Dim rtnav As NotesRichTextNavigator
Set rtnav = body.CreateNavigator
rtnav.FindFirstElement(RTELEM_TYPE_TABLE)
Dim rtt As NotesRichTextTable
Set rtt = rtnav.GetElement
Call rtnav.FindLastElement(RTELEM_TYPE_TABLECELL)
Call rtt.AddRow(1)
I’ve not tested this, but it should work.
Cheers,
Brian
Subject: Can’t Add Row to Table
There are a couple of databases in the sandbox that use dynamic tables. That’s a good place to start. There’s a lot of code with them.