I've written some code for a changed event hookup on a field in infopath 2010. The form is for submission to a sharepoint 2010 forms library.
What the code does is fill in a specific value into a field depending on the selected value from a combo-box elsewhere on the form. When i preview this in Infopath 2010 it works perfectly but when i fill out the form through the web interface it simply does
nothing. I've got another piece of code which executes on load and this works perfectly in both the preview and the web filler. What it does is just set the value of a field when the form loads.
Here is the code, could someone tell me what i'm doing wrong?
public void InternalStartup()
EventManager.XmlEvents["/my:myFields/my:service_level"].Changed += new XmlChangedEventHandler(service_level_Changed);
EventManager.FormEvents.Loading += new LoadingEventHandler(FormEvents_Loading);
public void service_level_Changed(object sender, XmlEventArgs e)
// Write your code here to change the main data source.
XPathNavigator xroot = MainDataSource.CreateNavigator();
XPathNavigator serviceLevel = xroot.SelectSingleNode("/my:myFields/my:service_level",NamespaceManager);
XPathNavigator xest = xroot.SelectSingleNode("/my:myFields/my:est_cost", NamespaceManager);
View Complete Post