These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Reset repeating subforms

KDCS
Registered: Sep 30 2009
Posts: 36

I created an XFA Dynamic form with 4 subforms. I used the instance manager to create repeating line items with auto line item numbering, a quantity field, various drop down lists and total field. I want to reset each subform separately. I used the below script to reset each of the line items fields except the automatically input line item number field.

xfa.host.resetData("TopmostSubform.Page1.OrderSection.OrderItems.Table1.Item.Quantity,
TopmostSubform.Page1.OrderSection.OrderItems.Table1.Item.Assembly,
TopmostSubform.Page1.OrderSection.OrderItems.Table1.Item.PartList
TopmostSubform.Page1.OrderSection.OrderItems.Tabel1.Item.Price")

It works for the most part, but it does not reset any repeated/added fields.

Is there a fix for this?

Thanks.

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
You can use the setInstance method, to reset the appearence of the subforms to the number you wish.

referenceSyntax.instanceManager.setInstances(1);

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

KDCS
Registered: Sep 30 2009
Posts: 36
Thank you radzmar. I guess I did not explain myself well enough. What I want is to reset or clear all the fields to their original state and not their original number of instances. Is this possible?