I have a repeating subform with only one text field. It is for an account name that could be up to five lines long (36 character limit each).
We are now working to pull the data entered by our users via xml file using a submit button. I expected to see each instance in the xml with a name, then an instance indicator but all I see is multiple instances of the same field name.
There is no way to tell which is Account Long name 1, account long name 2, etc so we can map each instance to the appropriate field in another system.
My expectation was to see the following in the xml.
Default count is 1 instance. New instances are added by the user with a simple button. script below.
var oSubform = xfa.resolveNode("Long_Title");
var oNewInstance = oSubform.instanceManager.addInstance(1);
Can anyone help with a suggestion to help identify each instance in the xml output? The data binding is set to name. Thanks!
what you see in the XML data is exactly the way XML works.
Repeated elements simply use the same namings and not any kind if indicator.
You can format your XML in the way you want using a XSLT stylesheet, but this isn't that easy to learn.
So, you also can add a second hidden text field to your repeating subform that will store the index of the repeated subform.
Just add a script in its calculate event.
this.rawValue = this.parent.index + 1;