I am by no means an expert but I have a condition where a form will bind to an xml repeatable element called transactions with elements under each transaction as seen below.
I'm having trouble with a situation where the including XML is missing an OPTIONAL element for one of the transctions. While I would expect the form to show this:
| 7/27/2011 | Deposit | 5000 |
| 7/28/2011 | Check | |
| 7/29/2011 | Transfer | 1000 |
It's actually showing this:
| 7/27/2011 | Deposit | 5000 |
| 7/28/2011 | Check | 1000 |
| 7/29/2011 | Transfer |
So it's basically bubbling up the Credit of 1000 to the 2nd repeatable element rather than leaving it blank and correctly adding it to the 3rd repeatable element. I'm sure it's how I have the form setup or how I'm setting up the XML binding but can someone assist? I get around this by forcing the user to always include a blank repeatable element but it's optional in the schema so it's not a good thing to force on my callers.
Thank you so much for the help!
</Transaction>
</Transaction>
- <Transaction>
<Description>Transfer</Description>
<Credit>1000.00</Credit>
</Transaction>
</Transactions>
Hi, Make sure you have have the row or repeating subform (whatever is the parent of the three fields) bound to the Transaction element, it should have a binding expression that looks like $.Transaction[*] then the three fields will have relative binding expression that look like $.PostDate and will keep them all grouped on the same row (or subform). If the individual fields have binding expressions like $.Transaction[*].PostDate then you will get the problem you discribe. Regards. Bruce
That was exactly the issue! Now the question is, in what circumstances would one try to do "$.Transaction[*].PostDate" vs the binding to the parent? I'm trying to drive some design standards and would like to know if this is just a novice mistake or a valid approach in certain conditions.
North America
Europe, Middle East and Africa
Asia Pacific