SelectSingleNode does not return a value - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

SelectSingleNode does not return a value

Last post 02-13-2012 08:46 AM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-10-2012 11:28 AM

    SelectSingleNode does not return a value

    My Infopath 2007 form always works locally returning the vendorID of the selected value but never works after its published to the server. If SharePoint has added namespacing to the XML file how do I figure out how to navigate to the datasource now that its changed. Realize that I have no confirmation that this is happening and would appreciate any suggestion to validation the theory. Or any suggestions on resolving such an issue. XPathNavigator root = MainDataSource.CreateNavigator(); string xpath = "/dfs:myFields/dfs:dataFields/tns:GetVendorsResponse/" + "tns:GetVendorsResult/NewDataSet/Vendors[Name='" + payeeTypedName + "']/VendorID"; string vendorID = DataSources["Vendors"].CreateNavigator().SelectSingleNode(xpath, NamespaceManager).InnerXml; Thanks
  • 02-13-2012 08:46 AM In reply to

    Re: SelectSingleNode does not return a value

    Are you opening in the browser?

    If so, you've admin approved or sandboxed your form so that your managed code will run, correct?

    I've never heard of publishing a form affect the namespace in a main data source and never had that happen myself, so I'd suspect that theory is incorrect. Are you able to see what your payeeTypedName variable contains? Perhaps consider writing that variable to a form field so you can see the value (if you are running in IPFS - otherwise, an Alert works nicely).

     

    Hilary Stoupa

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.