B
BethA
I am plugging away at autopopulating some fields of a repeating section
(including BriefDescription) given an item number, using the OnAfterChange
event for the item number. I started out using a secondary data source (a
view on SQL server) and couldn't get that to work, but got some help with
using ADO.net to access SQL server and get the data I need.
It works great for the first item in the section, but when a second item is
added, the fields in the first item are populated instead of in the second
item. That's exactly what I was telling it to do since I accessed the nodes
in this way:
Dim fDescNode As IXMLDOMNode =
thisXDocument.DOM.selectSingleNode("/my:myFields/my:RequestedSample/my:BriefDescription")
So every time it is getting the first node in the repeated section. How do I
tell it to get the node which matches the ItemNumber that has just been
updated?
I hope this makes sense, because I'm learning XML as I go along!
Another question that just came up is: why doesn't my event handler happen
when I publish the form and fill it in from the published form? It works when
I'm previewing in InfoPath.
Thanks,
BethA
(including BriefDescription) given an item number, using the OnAfterChange
event for the item number. I started out using a secondary data source (a
view on SQL server) and couldn't get that to work, but got some help with
using ADO.net to access SQL server and get the data I need.
It works great for the first item in the section, but when a second item is
added, the fields in the first item are populated instead of in the second
item. That's exactly what I was telling it to do since I accessed the nodes
in this way:
Dim fDescNode As IXMLDOMNode =
thisXDocument.DOM.selectSingleNode("/my:myFields/my:RequestedSample/my:BriefDescription")
So every time it is getting the first node in the repeated section. How do I
tell it to get the node which matches the ItemNumber that has just been
updated?
I hope this makes sense, because I'm learning XML as I go along!
Another question that just came up is: why doesn't my event handler happen
when I publish the form and fill it in from the published form? It works when
I'm previewing in InfoPath.
Thanks,
BethA