Highlighted

direct binding vs. relative binding

Avatar

Avatar

alukyro

Avatar

alukyro

alukyro

20-10-2008

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?

Replies

Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

20-10-2008

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.
Highlighted

Avatar

Avatar

alukyro

Avatar

alukyro

alukyro

20-10-2008

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.
Highlighted

Avatar

Avatar

alukyro

Avatar

alukyro

alukyro

21-10-2008

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