<?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: Populate Drop Down List Programatically - Solved</title><link>https://www.infopathdev.com:443/forums/thread/6366.aspx</link><pubDate>Thu, 23 Dec 2004 23:22:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6366</guid><dc:creator>sasquatch</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6366.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6366</wfw:commentRss><description>The code below describe how to query and read the result of a&lt;br /&gt;webervice(Datasource) with Infopath&lt;br /&gt;&lt;br /&gt;//Request information from the webservice&lt;br /&gt;DataObject&lt;br /&gt;doConnection=thisXDocument.DataObjects["DataConnectionName"];&lt;br /&gt;&lt;br /&gt;//Fill parameter&lt;br /&gt;doConnection.DOM.selectSingleNode("//*[local-name()='param1']").text =&lt;br /&gt;param1;&lt;br /&gt;&lt;br /&gt;//Send the query&lt;br /&gt;doGroup.Query();</description></item><item><title>Re: Populate Drop Down List Programatically - Solved</title><link>https://www.infopathdev.com:443/forums/thread/6365.aspx</link><pubDate>Thu, 18 Nov 2004 14:17:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6365</guid><dc:creator>CodeWzrd</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6365.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6365</wfw:commentRss><description>I figured it out.  Sort of...&lt;br /&gt;&lt;br /&gt;Here is how you do it...&lt;br /&gt;&lt;br /&gt;Layout of Controls:&lt;br /&gt;Drop down list box 1 (field1) button1 (btnGetCustomers)&lt;br /&gt;Drop down list box 2 (field2) button2 (btnGetOrders)&lt;br /&gt;&lt;br /&gt;Create a secondary data source.  Go through the wizard, select the URL for the web service, select the web method you want to use, give it a friendly name (GetCustomersID) and deselect "Automatically retrieve data when form is opened."  Click Finish.&lt;br /&gt; &lt;br /&gt;In C#:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;[InfoPathEventHandler(MatchPath="btnGetCustomers", EventType=InfoPathEventType.OnClick)]&lt;br /&gt;public void btnGetCustomers_OnClick(DocActionEvent e)&lt;br /&gt;{&lt;br /&gt;	// Write your code here.&lt;br /&gt;	WebServiceAdapterObject adapter = null;&lt;br /&gt;	adapter = (WebServiceAdapterObject) thisXDocument.DataObjects["GetCustomersID"].QueryAdapter;&lt;br /&gt;	adapter.Query();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Problem I have is (i'll create a seperate thread for this) is that the call to the second web service method requires an input parameter.  I get an error &lt;i&gt;"Reference to undeclared namespace prefix: 'dfs'"&lt;/i&gt; when I try to get the node that contains the input parameter.&lt;br /&gt;</description></item><item><title>Populate Drop Down List Programatically - Solved</title><link>https://www.infopathdev.com:443/forums/thread/4507.aspx</link><pubDate>Wed, 17 Nov 2004 15:20:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4507</guid><dc:creator>CodeWzrd</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4507.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=4507</wfw:commentRss><description>On the InfoPath newsgroup, Carole had asked &lt;i&gt;Is there a way to programmatically bind a drop down list box, or do I have to use a web service as a secondary data source?"&lt;/i&gt;  And Greg Collins response was &lt;i&gt;populate a repeating list of nodes with individual values for each user...&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;See the original thread here &lt;a href='http://groups.google.com/groups?hl=en&amp;lr=&amp;frame=right&amp;th=d8769aa5310fb641&amp;seekm=evzfRvtuEHA.1524%40TK2MSFTNGP09.phx.gbl#link1' target='_blank' title='http://groups.google.com/groups?hl=en&amp;lr=&amp;frame=right&amp;th=d8769aa5310fb641&amp;seekm=evzfRvtuEHA.1524%40TK2MSFTNGP09.phx.gbl#link1'&lt;a target="_blank" href=http://groups.google.com/groups?hl=en&amp;lr=&amp;frame=right&amp;th=d8769aa5310fb641&amp;seekm=evzfRvtuEHA.1524%40TK2MSFTNGP09.phx.gbl#link1&gt;http://groups.google.com/groups?hl=en&amp;lr=&amp;frame=right&amp;th=d8769aa5310fb641&amp;seekm=evzfRvtuEHA.1524%40TK2MSFTNGP09.phx.gbl#link1&lt;/a&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I want to do something very similar.  When the form is opened to be filled out, it automatically gets a list of name/id pair values of customers in a drop down list (field1).  When the user selects a customer, I call a web service in the OnAfterChange event of field1, passing in the value of the selected customer name.  In the web service, using the customer id, I get a list of order numbers into a DataSet object.  How do I add the results in a DataSet object to a second drop down list (field2)?&lt;br /&gt;&lt;br /&gt;Hope this site gets lots of users.  This could become a great community.&lt;br /&gt;&lt;br /&gt;Thanks.</description></item></channel></rss>