Hi,
I have a repeating section . There will be two instances for contact and address . I want to set the value dynamically through code based on a drop down selection.I don't know how to get each instance .The form is basedo an XML Schema.
Here is what the actual XML Should look like :
<Contact label="Attn:" linenumber="1">John Smith</Contact>
<Contact label="Room:" linenumber="2">640</Contact>
<AddressLine linenumber="1">1968 Northeast</AddressLine>
<AddressLine linenumber="2">5th Avenue</AddressLine>
here is the part of the code,
but as you can see it won't work, Please help.
Dim root As XPathNavigator = MainDataSource.CreateNavigator()
root.SelectSingleNode("/PurchaseRequisitionMessage/PurchaseRequisition/RequisitionHeader/ShipTo/Address/Contact/@label", NamespaceManager).SetValue("Attn:")
root.SelectSingleNode("/PurchaseRequisitionMessage/PurchaseRequisition/RequisitionHeader/ShipTo/Address/Contact/@linenumber", NamespaceManager).SetValue("1")
root.SelectSingleNode("/PurchaseRequisitionMessage/PurchaseRequisition/RequisitionHeader/ShipTo/Address/Contact", NamespaceManager).SetValue("Kim Linnet")
root.SelectSingleNode("/PurchaseRequisitionMessage/PurchaseRequisition/RequisitionHeader/ShipTo/Address/Contact/@label", NamespaceManager).SetValue("Room:")
root.SelectSingleNode("/PurchaseRequisitionMessage/PurchaseRequisition/RequisitionHeader/ShipTo/Address/Contact/@linenumber", NamespaceManager).SetValue("2")
root.SelectSingleNode("/PurchaseRequisitionMessage/PurchaseRequisition/RequisitionHeader/ShipTo/Address/Contact", NamespaceManager).SetValue("640")
Thanks