I built a form in Adobe LiveCycle with an xml schema and data file. The problem is with how the form renders the xml data file.
I have a statement element that consists of about 6 fields (statementID, statementName, statementAddress, statementCountry, statementZip, statementDate, etc) of data in the schema that allows for multiple iterations - so one xml data file can contain multiple statements. These fields allow for null values.
But here's the problem: When any of the statements - say statement 2 of 6 - has a null value in one of the fields, if the xml data file doesn't have a placeholder (example of placeholder: <statementName type="String"/> )in the xml for that field, my form pulls the field value from the NEXT statement.
This corrupts all the rest of the statement records, as this field is shifted up for all the rest.
I know that in the past I haven't needed a placeholder when a field was null. But I'm wondering if when the data allows for multiple records the xml data file needs to generate the placeholder. And where is the problem? In the Schema? The xml data file? My form? And the 64-thousand-dollar question: How to fix it?
If your <statement> element is the one that repeats, it should be bound to a subform with the binding string of something like $.statement[*]. Then in that subform should be your fields and they should have bindings of $.statementID, $.statementName, $.statementAddress, etc.