<?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>Re: Secondary Data Connections - How to query\filter?</title><link>https://www.infopathdev.com:443/forums/thread/73377.aspx</link><pubDate>Sat, 31 Dec 2011 07:11:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73377</guid><dc:creator>Jo-Anne Alfafara</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73377.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=73377</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You can use the fields in your main data source to display the values from your secondary data connection. Open the rules for your query button and add an action to set a field&amp;#39;s value.&amp;nbsp;Select the field from your main data soure to display the value to, you can do that by clicking the modify button next to the Field text box. In the Value text box, click the &lt;em&gt;fx&lt;/em&gt; button, click on Insert Field or Group... and then select the field in your secondary data connection (just click it). Click Filter Data. Click Add. From there you need to specify a filter condition such that the Account Number (secondary) is equal to the&amp;nbsp;Account Number (main). Click OK to the dialog boxes, and repeat that to the rest of your fields. Take note that those actions need to be under the action rule that queries your secondary data source. That should do it.&lt;/p&gt;
&lt;p&gt;Please modify your secondary data connection to uncheck the &amp;quot;Automatically retrieve data when form is opened&amp;quot;, you don&amp;#39;t need that since&amp;nbsp;the form is dynamically setting the values. &lt;/p&gt;
&lt;p&gt;Let me know if that works.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Secondary Data Connections - How to query\filter?</title><link>https://www.infopathdev.com:443/forums/thread/73284.aspx</link><pubDate>Tue, 27 Dec 2011 17:18:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73284</guid><dc:creator>JMO9966</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73284.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=73284</wfw:commentRss><description>&lt;p&gt;Ideally, I&amp;#39;m looking for a way to use InfoPath 2007 to display main and secondary data connection results based on the query value for the main data connection.&lt;/p&gt;
&lt;p&gt;When I added a secondary data connection, I noticed InfoPath is not displaying the queryFields option for this data connection.&amp;nbsp; The connection shows dataFields, but not the queryFields section??&lt;/p&gt;
&lt;p&gt;I can explain further.&amp;nbsp; My main data connection has a query field named Account Number.&amp;nbsp; The user will enter an Account Number in this query field and then click the Run Query button.&amp;nbsp; InfoPath then displays the data field values for the main data connection&amp;nbsp;in my form based on this account number.&lt;/p&gt;
&lt;p&gt;I then added a second data connection to a different sql server that also stores information about the account.&amp;nbsp; I added the data fields for the secondary data connection onto my form. I have the secondary data connection set to Automatically retrieve data when the form is opened.&amp;nbsp; Now when I run the query, the secondary connection data fields display all records from these tables, instead of only the record(s) that match the Account Number specified.&lt;/p&gt;
&lt;p&gt;How would I go about having my secondary data connection data fields apply the account number logic the main connection is using?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item></channel></rss>