<?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>Data Connections</title><link>https://www.infopathdev.com:443/forums/44.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Refresh data</title><link>https://www.infopathdev.com:443/forums/thread/59435.aspx</link><pubDate>Wed, 29 Sep 2010 19:55:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:59435</guid><dc:creator>rohitspage</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/59435.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=59435</wfw:commentRss><description>&lt;p&gt;I am simplifying my form setup for readers/responders.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Form Setup&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Drop Down A : Has list of Countries&lt;/p&gt;
&lt;p&gt;Text Box B: Populates the cpaital of the selected country.&lt;/p&gt;
&lt;p&gt;Data connection type:&amp;nbsp;XML Data Connection. &lt;a href="http://site/subsite/_vti_bin/owssvr.dll?Cmd=Display&amp;amp;List={11111111-2222-3333-4444-555555555555}&amp;amp;XMLDATA=TRUE"&gt;http://site/subsite/_vti_bin/owssvr.dll?Cmd=Display&amp;amp;List={11111111-2222-3333-4444-555555555555}&amp;amp;XMLDATA=TRUE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Upon selecting &amp;#39;Country&amp;#39;&amp;nbsp;I am using a XML Data Connection to retrieve the name of Capital city from the SharePoint List&amp;nbsp;by modifying theFileLocation to -&lt;/p&gt;
&lt;p&gt;&lt;a href="http://site/subsite/_vti_bin/owssvr.dll?Cmd=Display&amp;amp;List={11111111-2222-3333-4444-555555555555}&amp;amp;XMLDATA=TRUE&amp;amp;FilterField1=Country&amp;amp;FilterValue1=USA"&gt;http://site/subsite/_vti_bin/owssvr.dll?Cmd=Display&amp;amp;List={11111111-2222-3333-4444-555555555555}&amp;amp;XMLDATA=TRUE&amp;amp;FilterField1=Country&amp;amp;FilterValue1=USA&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Below is the pseudo code executed when Country is changed.&lt;/p&gt;
&lt;p&gt;drpCountry_Changed(Object sender, XmlEventArgs e)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&amp;nbsp;FileQueryConnection qryConn=(FileQueryConnection)this.DataConnections[country];&lt;/p&gt;
&lt;p&gt;qryConn.FileLocation=&amp;nbsp;&lt;a href="http://site/subsite/_vti_bin/owssvr.dll?Cmd=Display&amp;amp;List={11111111-2222-3333-4444-555555555555}&amp;amp;XMLDATA=TRUE&amp;amp;FilterField1=Country&amp;amp;FilterValue1=e.NewValue"&gt;http://site/subsite/_vti_bin/owssvr.dll?Cmd=Display&amp;amp;List={11111111-2222-3333-4444-555555555555}&amp;amp;XMLDATA=TRUE&amp;amp;FilterField1=Country&amp;amp;FilterValue1=e.NewValue&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;qryConn.execute();&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Basic Execution&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The form works perfectly. It populates the capital city of the selected country.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Problem Statement&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Steps -&lt;/p&gt;
&lt;p&gt;a. Open the form, select Country=USA, it populates the Capital city as Washington DC&lt;/p&gt;
&lt;p&gt;b. &lt;u&gt;&lt;em&gt;Now without closing the form, change the Capital city of USA to Philadelphia in the Share Point List.&lt;/em&gt;&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;c. &lt;em&gt;&lt;u&gt;Now select USA again in the Form. It populates the capital city as &amp;quot;Washington DC&amp;quot; as opposed to &amp;quot;Philadelphia&amp;quot;&lt;/u&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;d. Close the current form, ReOpen the form and select country=USA, it now populates the capital city as &amp;quot;Philadelphia&amp;quot;&lt;/p&gt;
&lt;p&gt;I am not sure why would it cache the contents of list.&lt;/p&gt;
&lt;p&gt;I would appreciate any guidance on this issue.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Troubleshooting steps&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I compared the XML data obtained by the query in the infopath form and the XML data returned by browser when I paste &lt;a href="http://site/subsite/_vti_bin/owssvr.dll?Cmd=Display&amp;amp;List={11111111-2222-3333-4444-555555555555}&amp;amp;XMLDATA=TRUE&amp;amp;FilterField1=Country&amp;amp;FilterValue1=USA"&gt;http://site/subsite/_vti_bin/owssvr.dll?Cmd=Display&amp;amp;List={11111111-2222-3333-4444-555555555555}&amp;amp;XMLDATA=TRUE&amp;amp;FilterField1=Country&amp;amp;FilterValue1=USA&lt;/a&gt;&amp;nbsp;in the browser.&lt;/p&gt;
&lt;p&gt;The XML data returned to InfoPath contains Capital City as Washington DC, but the browser reflects the change.&lt;/p&gt;</description></item></channel></rss>