How I can add a row and input field on button click in lotus note 8.5. form?

1.1k Views Asked by At

I have question about Lotus Note. I have form: https://i.stack.imgur.com/YWii6.jpg

In this form I need create bottom. With this buttom user can add new row with input field in this row to existing table. I find that kind of lotusscript from:

http://www-01.ibm.com/support/knowledgecenter/SSVRGU_9.0.1/com.ibm.designer.domino.main.doc/H_EXAMPLES_ADDROW_METHOD_RTTABLE.html

But when I this script copied to this form, I get error "Object variable no set" Then I tried this solotion:

LotusNotes 8.5 - Adding a row to a table with a button And I again get the same error.

Can anybody tell me please, how I can create new row and input field in this row, when I pressed buttom "Add row"?

2

There are 2 best solutions below

0
On

It seems you are a bit confused as to the difference between a form (your picture) and a document (the code you link). Also, you definitely need to understand the meaning of "Object variable not set", which is the most common error when you use Lotusscript.

Anyhow, where to go from here depends on how you plan using the data once it is input. Will it be edited ? Will each row need to be handled as a separate record ?

2
On

You can't make a table with a dynamic amount of rows in a Lotus Notes Form. There are two common ways to solve this:

Use child-documents; one document for each row; and show these documents using an embedded view. This is the most elegant imho.

Create a large, fixed-elements table, and hide the rows that are not needed (for instance, by checking the presence of an input in the preceding row. This is OK for small amounts of row, but performance starts getting bad if you have too many rows.