Good day!
Attached is a form I've designed in LCDS 8.2. What I'm trying to accomplish is adding additional sheets of the same page. I've seen examples on the forum and looking at the Javascript Basics guide of adding additional instances of rows in a table or subform. However, I didn't see any information of adding instances of the entire page. In the past I've done things like this using checkboxes and hiding pages but I just want to add additional ones or remove extras that I don't need for our patients when they sign-in.
Secondly, on the same form I have a total calculation using formcalc and even though it works I'm wondering if coding could be a lot more simpler or this is how it's done.
form1.Page1.Table1.Row11.Amount::calculate - (FormCalc, client)
(Page1.Table1.Row3.Amount+Table1.Row4.Amount+
Table1.Row5.Amount+Table1.Row6.Amount+Table1.Row7.Amount+
Table1.Row8.Amount+Table1.Row9.Amount+Table1.Row10.Amount)
http://www.narcofreedom.com/Forms/token%20form.pdf
Pages are subforms therefore you can use the same mechanism to add/remove instances of a page i.e. use the instance manager. For example:
Be sure to allow Page1 to repeat in the object palette | Binding tab.
As for the script, from what I see, row3 to row10 are identical. You could delete row4 to row10. Rename row3 to row, allow it to repeat a minimum of 8 times. With this structure, you can use the following script:
Sum(Table1.Row[*].Amount)
Does this make sense?
Hélène