Expand my Community achievements bar.

direct binding vs. relative binding

Avatar

Former Community Member
Hi,<br /><br />I have two sub forms whit similar fields representing legal guardians of a child. I want to bind these fields to an xsd of this type:<br /><br /><xs:element name="Guardian" type="GuardianType" minOccurs="0" maxOccurs="2"><br /><br />When I do I get the following warning on my fields:<br /><br />"Direct binding references to multiple levels of repeating data may not produce desired results. Form may require relative binding references for repeating sub form containers."<br /><br />Please let me know how I can solve this. Do I need to supply relative binding references as the warning states? If so, how is that done?
3 Replies

Avatar

Former Community Member
In your schema definition you are saying that there can be 2 occurances of Guardian. If you use an absolte reference then there could only be one occurance in the form. If there are two occurances you can get both of them by adding a [*] to the parent node of guardian in the binding expression. This indicates that you will create a new structure for each child under that node.

Avatar

Former Community Member
Thanks Paul.



Is this what you mean?:



Application[*].Guardian[*].FirstName



"Application" is the parent node to "Guardian".



I still get the warning, I assume it can be ignored if the above is correct.

Avatar

Former Community Member
Think I've worked it out.



I have written it like this, an the warnings are gone.



Application[*].Guardian[0].FirstName



Application[*].Guardian[1].FirstName