<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Automate 'Run Query'</title><link>https://www.infopathdev.com:443/forums/thread/8692.aspx</link><pubDate>Sat, 07 Jan 2006 01:13:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8692</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8692.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8692</wfw:commentRss><description>No problem, let us know if you have any other questions!&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;Matt Faus&lt;br /&gt;InfoPath Dev Texas&lt;br /&gt;</description></item><item><title>Re: Automate 'Run Query'</title><link>https://www.infopathdev.com:443/forums/thread/8691.aspx</link><pubDate>Fri, 06 Jan 2006 17:07:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8691</guid><dc:creator>sjc724</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8691.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8691</wfw:commentRss><description>Thank you, this is a great help!</description></item><item><title>Re: Automate 'Run Query'</title><link>https://www.infopathdev.com:443/forums/thread/8690.aspx</link><pubDate>Fri, 06 Jan 2006 15:04:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8690</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8690.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8690</wfw:commentRss><description>Sure thing.  If the Web Service is used as your main DOM (via New form from Data Connection -&amp;gt; Web Service), then you should be able simply add XDocument.Query() to the OnLoad event handler as mentioned above.  To do this Chooose Programming | On Load Event from the Tools Menu and type XDocument.Query() into the function that is generated in the Microsoft Script Editor.&lt;br /&gt;&lt;br /&gt;If you are using a Web Service (or any other data connection ) as a secondary data source you will have to use a slightly more specific code snippet:&lt;br /&gt;&lt;pre&gt;var webService = XDocument.DataObjects( "Name of your Data Connection" );&lt;br /&gt;&lt;br /&gt;webService.Query();&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If you have not downloaded the InfoPath SDK (which is where all of this information came from), I would highly recommend it. A link can be found on the left side of this page.&lt;br /&gt;&lt;br /&gt;Hope this helps, let us know if you have any more questions!&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;Matt Faus&lt;br /&gt;InfoPath Dev Texas&lt;br /&gt;</description></item><item><title>Re: Automate 'Run Query'</title><link>https://www.infopathdev.com:443/forums/thread/8689.aspx</link><pubDate>Fri, 06 Jan 2006 12:14:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8689</guid><dc:creator>sjc724</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8689.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8689</wfw:commentRss><description>Thanks for your response.  I'm sorry, but I have no idea how I would access the associated data connection or how I would then run XDocument.Query() for that connection.  Could you please either point me to some documentation or provide a bit of code?  &lt;br /&gt;&lt;br /&gt;Thank you</description></item><item><title>Re: Automate 'Run Query'</title><link>https://www.infopathdev.com:443/forums/thread/8688.aspx</link><pubDate>Thu, 05 Jan 2006 21:39:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8688</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8688.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8688</wfw:commentRss><description>In the OnLoad event handler call the XDocument.Query() method for the associated Data Connection.&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;Matt Faus&lt;br /&gt;InfoPath Dev Texas&lt;br /&gt;</description></item><item><title>Automate 'Run Query'</title><link>https://www.infopathdev.com:443/forums/thread/5243.aspx</link><pubDate>Thu, 05 Jan 2006 20:47:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5243</guid><dc:creator>sjc724</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5243.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5243</wfw:commentRss><description>Hi,&lt;br /&gt;I have a simple form connected to a web service.  When I click 'Run Query' it fills out the fields on the form as expected, but I would like the fields to be automatically filled in when the form loads and remove the 'Run Query' button.  What code is required to do this?&lt;br /&gt;&lt;br /&gt;Thank you!</description></item></channel></rss>