Repeating subform and remembering no# of instances?

Avatar

Avatar

g5spark

Avatar

g5spark

g5spark

16-06-2011

We have a form with a Primary subform and a Repeating Dependent subform.

The repeating subform has a min count of 0 (which clears out), max = 5 and a init of 1.

We have reader extended the forms so you can save.

When we click "Add Dep" (so there is 2) and save.  Close REader.  Reopen reader, the form has 1 Primary + 2 Dependents (as expected).

However, if we click "RemoveMe" so there is just the primary, Save and Close Reader, and then reopen, the form opens with 1 Primary and 1 Dependent.  However the last state of the form was just 1 Primary.

Is there a way so that if we save with no Dependents that it remembers?  Unfortunately we cannot start the form with 1 Primary and NO dependents since we will have ppl who will just print out the form and fill out by hand.  Nor can we just leave it as is, since we validate that all the fields are populated before submitting.

BTW, i can't seem to be able to upload the file..So here is a snapshot from Designer.

SubFormObj.JPG

The code behind the Add Dep button (Click event) is

Page1._Dep.addInstance();

The code behind the Remove Dep button (Click event) is

Dep.instanceManager.removeInstance(this.parent.instanceIndex);

View Entire Topic

Avatar

Avatar

MorisTM

Avatar

MorisTM

MorisTM

16-06-2011

I believe this is working as implemented. Setting "Initial Count" to 1 does just that on initialise.

Your requirement (as i understand it) is to be able to print a blank form.

Maybe remove the Initial Count. Add a "Print Blank Form" button (maybe up in the top right corner) and script the addition of the Dependant subforms, to the Max count, then execute the print function.