<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>SharePoint Integration</title><link>https://www.infopathdev.com:443/forums/46.aspx</link><description> For questions concerning issues in the integration of SharePoint and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Form changes not processed (XmlFormView)</title><link>https://www.infopathdev.com:443/forums/thread/16538.aspx</link><pubDate>Thu, 11 Jan 2007 08:26:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:16538</guid><dc:creator>fahlen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/16538.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=16538</wfw:commentRss><description>Thanks for your reply. I still haven't figured it out, but I'll let everyone know when I do.</description></item><item><title>Re: Form changes not processed (XmlFormView)</title><link>https://www.infopathdev.com:443/forums/thread/16537.aspx</link><pubDate>Wed, 10 Jan 2007 09:25:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:16537</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/16537.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=16537</wfw:commentRss><description>Hi Markus,&lt;br /&gt;You're on the bleeding edge here. I don't know the answer either but I'm guessing that you can add a rule or something in the form that will cause it to be updated. There are a number of things which will refresh the form and there may even be some settings in the browser compat settings tab that help you here - I haven't looked. Let us know what you come up with. This is a good new area.</description></item><item><title>Form changes not processed (XmlFormView)</title><link>https://www.infopathdev.com:443/forums/thread/15521.aspx</link><pubDate>Tue, 09 Jan 2007 16:07:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15521</guid><dc:creator>fahlen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15521.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=15521</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;I have created an InfoPath form which populates a drop-down list box with data from a web service when the form loads. Then, I've added code that executes on the Changed event for this list box. This code updates the rest of the form, querying a web service (passing the current value of the list box as a parameter).&lt;br /&gt;&lt;br /&gt;This is the code:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;        public void pending_Changed(object sender, XmlEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            // Write your code here to change the main data source.&lt;br /&gt;&lt;br /&gt;            // Get hold of the datasource for the webservice operation&lt;br /&gt;            DataSource ds = this.DataSources["GetExpense"];&lt;br /&gt;&lt;br /&gt;            // Create an XPathNavigator to the node we have to set to query the method&lt;br /&gt;            XPathNavigator guidField = ds.CreateNavigator().SelectSingleNode("/dfs:myFields/dfs:queryFields/tns:GetExpense/tns:guid", this.NamespaceManager);&lt;br /&gt;&lt;br /&gt;            // Set the query value to the current Guid&lt;br /&gt;            guidField.SetValue(e.NewValue);&lt;br /&gt;&lt;br /&gt;            // Execute the webservice operation&lt;br /&gt;            ds.QueryConnection.Execute();&lt;br /&gt;&lt;br /&gt;            // The data will now be in the datasource&lt;br /&gt;            XPathNavigator entryNavigator = this.DataSources["GetExpense"].CreateNavigator();&lt;br /&gt;&lt;br /&gt;            // Add the namespaces so we can query the datasource&lt;br /&gt;            XmlNamespaceManager umanager = new XmlNamespaceManager(entryNavigator.NameTable);&lt;br /&gt;            umanager.AddNamespace("dfs", "http://schemas.microsoft.com/office/infopath/2003/dataFormSolution");&lt;br /&gt;            umanager.AddNamespace("tns", "http://tempuri.org/");&lt;br /&gt;            umanager.AddNamespace("my", "http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-01-02T10:15:45");&lt;br /&gt;            umanager.AddNamespace("xd", "http://schemas.microsoft.com/office/infopath/2003");&lt;br /&gt;&lt;br /&gt;            // Get hold of the node we're after&lt;br /&gt;            XPathNavigator formNode = entryNavigator.SelectSingleNode("/dfs:myFields/dfs:dataFields/tns:GetExpenseResponse/my:GetExpenseResult", umanager);&lt;br /&gt;            &lt;br /&gt;            // Set values of name and date&lt;br /&gt;            this.CreateNavigator().SelectSingleNode("/my:myFields/my:name", this.NamespaceManager).SetValue(&lt;br /&gt;                formNode.SelectSingleNode("//my:name", umanager).ToString());&lt;br /&gt;            this.CreateNavigator().SelectSingleNode("/my:myFields/my:date", this.NamespaceManager).SetValue(&lt;br /&gt;                formNode.SelectSingleNode("//my:date", umanager).ToString().Substring(0, 10));&lt;br /&gt;&lt;br /&gt;            this.CreateNavigator().SelectSingleNode("/my:myFields/my:mileageCost", this.NamespaceManager).SetValue(&lt;br /&gt;                formNode.SelectSingleNode("//my:mileageCost", umanager).ToString().Replace('.', ','));&lt;br /&gt;&lt;br /&gt;            // Update repeating table with new data&lt;br /&gt;            XPathNavigator ipRepTable = this.CreateNavigator().SelectSingleNode("/my:myFields/my:group1", this.NamespaceManager);&lt;br /&gt;            XPathNavigator wsRepTable = formNode.SelectSingleNode("//my:group1", umanager);&lt;br /&gt;            ipRepTable.ReplaceSelf(wsRepTable);&lt;br /&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This works just fine when the form is executed in InfoPath. However, when I publish the form to Office Forms Server and embed the form in a Web Form using the XmlFormView control, things get more difficult. Well, actually the only problem is that when the selected item in the list box changes, the code for updating the contents of the form is executed, but the form as presented in the browser isn't updated.&lt;br /&gt;&lt;br /&gt;If I click on "Print preview", I get the message:&lt;br /&gt;&lt;br /&gt;"The form contains changes that must be processed before it can be printed. Click OK to update the form, and then try printing again."&lt;br /&gt;&lt;br /&gt;I click OK, and the form is refreshed, showing me the correct data.&lt;br /&gt;&lt;br /&gt;How can I trigger this update/refresh of the XmlFormView control in code? There has to be a way of doing this, I just haven't figured out how yet.&lt;br /&gt;&lt;br /&gt;I hope someone will be able to give me a hint.&lt;br /&gt;&lt;br /&gt;Thanks in advance,&lt;br /&gt;Markus</description></item></channel></rss>