<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: How do I bind a list box to an existing dataset?</title><link>https://www.infopathdev.com:443/forums/thread/55604.aspx</link><pubDate>Fri, 04 Jun 2010 01:59:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55604</guid><dc:creator>rbemiller</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55604.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55604</wfw:commentRss><description>&lt;p&gt;disregard this post&lt;/p&gt;</description></item><item><title>Re: How do I bind a list box to an existing dataset?</title><link>https://www.infopathdev.com:443/forums/thread/55598.aspx</link><pubDate>Thu, 03 Jun 2010 21:10:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55598</guid><dc:creator>mgarant</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55598.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55598</wfw:commentRss><description>&lt;p&gt;I don&amp;#39;t know why it doesn&amp;#39;t create a data source automatically when you create a control... I&amp;#39;m using Infopath 2007 too and it does it. when you are in the &amp;quot;controls&amp;quot; pane... at the bottom of the pane... is there a check box &amp;quot;automatically create data source&amp;quot;? is it checked? if it is it should create the data source for you when you add a control to your form&lt;/p&gt;</description></item><item><title>Re: How do I bind a list box to an existing dataset?</title><link>https://www.infopathdev.com:443/forums/thread/55597.aspx</link><pubDate>Thu, 03 Jun 2010 21:04:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55597</guid><dc:creator>rbemiller</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55597.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55597</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m using InfoPath 2007.&amp;nbsp; I have given in and am now trying to use a repeating table instead of a list box.&amp;nbsp; I read that you can format it to scroll like a list box so it might work for me.&amp;nbsp; I was able to create the data connection to the xml file and bind the repeating table to it successfully.&amp;nbsp; Now I just need to get it to populate.&amp;nbsp; Nothing happens when I test it.&lt;/p&gt;</description></item><item><title>Re: How do I bind a list box to an existing dataset?</title><link>https://www.infopathdev.com:443/forums/thread/55596.aspx</link><pubDate>Thu, 03 Jun 2010 20:54:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55596</guid><dc:creator>mgarant</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55596.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55596</wfw:commentRss><description>&lt;p&gt;Ok... what version of infopath do you use? Any way, just create a data source that is not repeating and you should be ok... i guess...&lt;/p&gt;</description></item><item><title>Re: How do I bind a list box to an existing dataset?</title><link>https://www.infopathdev.com:443/forums/thread/55595.aspx</link><pubDate>Thu, 03 Jun 2010 20:33:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55595</guid><dc:creator>rbemiller</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55595.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55595</wfw:commentRss><description>&lt;p&gt;It was bound to a repeating group...the datasource I created.&amp;nbsp; I deleted both the datasource and the list box.&amp;nbsp; It doesn&amp;#39;t create a data source for me automatically...when I ad a list box it pops up the window to select the binding...there&amp;#39;s no option to have it create a data source for me.&lt;/p&gt;</description></item><item><title>Re: How do I bind a list box to an existing dataset?</title><link>https://www.infopathdev.com:443/forums/thread/55594.aspx</link><pubDate>Thu, 03 Jun 2010 20:00:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55594</guid><dc:creator>mgarant</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55594.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55594</wfw:commentRss><description>&lt;p&gt;Look to what kind of Data Source you list box is bind to. Look in the right panel on infopath -&amp;gt; Data Source then select your list box and see to wich of the data source it is bind. If it is a repeating group try to delete both the list box and data source and recreate the list box and let infopath create the data source for you.&lt;/p&gt;</description></item><item><title>Re: How do I bind a list box to an existing dataset?</title><link>https://www.infopathdev.com:443/forums/thread/55593.aspx</link><pubDate>Thu, 03 Jun 2010 19:49:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55593</guid><dc:creator>rbemiller</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55593.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55593</wfw:commentRss><description>&lt;p&gt;Tried that, unfortunatel it didn&amp;#39;t resolve my issue.&amp;nbsp; I get the same errors.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How do I bind a list box to an existing dataset?</title><link>https://www.infopathdev.com:443/forums/thread/55592.aspx</link><pubDate>Thu, 03 Jun 2010 19:42:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55592</guid><dc:creator>mgarant</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55592.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55592</wfw:commentRss><description>&lt;p&gt;Ok, when you create the data connection, check &amp;quot;Include the data as a resource file in the form template or template part&amp;quot; instead of &amp;quot;Access the data from the specified location&amp;quot;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;It should solve the problem&lt;/p&gt;</description></item><item><title>Re: How do I bind a list box to an existing dataset?</title><link>https://www.infopathdev.com:443/forums/thread/55591.aspx</link><pubDate>Thu, 03 Jun 2010 19:36:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55591</guid><dc:creator>rbemiller</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55591.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55591</wfw:commentRss><description>&lt;p&gt;I went to Manage Data Connections, then added a data connection &amp;gt;&amp;nbsp;new connection to receive data &amp;gt; XML Document &amp;gt; selected my PatientData.xml file &amp;gt; selected Access data from the specified location &lt;/p&gt;
&lt;p&gt;Then when I add the list box, I get the automatic List Box Binding pop-up &amp;gt; then select the PatientData (secondary) data source &amp;gt; then no matter which node or field I select I get the error.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the PatientData.xml file:&lt;/p&gt;
&lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;&amp;lt;options&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;option&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;displayname /&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/option&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;option&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;displayname /&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;/options&amp;gt;&lt;/p&gt;</description></item><item><title>Re: How do I bind a list box to an existing dataset?</title><link>https://www.infopathdev.com:443/forums/thread/55590.aspx</link><pubDate>Thu, 03 Jun 2010 19:00:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55590</guid><dc:creator>mgarant</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55590.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55590</wfw:commentRss><description>&lt;p&gt;How did you bind your data to the list box? because i&amp;#39;ve just tried to bind a list box to an xml dataconnection and it is working perfectly...&lt;/p&gt;</description></item><item><title>Re: How do I bind a list box to an existing dataset?</title><link>https://www.infopathdev.com:443/forums/thread/55589.aspx</link><pubDate>Thu, 03 Jun 2010 18:54:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55589</guid><dc:creator>rbemiller</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55589.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55589</wfw:commentRss><description>&lt;p&gt;Okay I may have it now using dataRow.Field.&amp;nbsp; See below...&lt;/p&gt;
&lt;p&gt;Next thing I noticed is that when trying to bind my list box to the PatientData datasource, I get the error that &amp;quot;a list box cannot be bound to a group or repeating field...&amp;quot;&amp;nbsp; What should I bind it to?&lt;/p&gt;
&lt;p&gt;foreach (DataRow dataRow in patientTable.Rows)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string PatientID = dataRow.Field&amp;lt;string&amp;gt;(&amp;quot;patientId&amp;quot;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string PatientLName = dataRow.Field&amp;lt;string&amp;gt;(&amp;quot;patientLastName&amp;quot;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AddItem(PatientID, PatientLName, &amp;quot;PatientData&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/p&gt;</description></item><item><title>Re: How do I bind a list box to an existing dataset?</title><link>https://www.infopathdev.com:443/forums/thread/55582.aspx</link><pubDate>Thu, 03 Jun 2010 18:29:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55582</guid><dc:creator>mgarant</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55582.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55582</wfw:commentRss><description>&lt;p&gt;For your second error, &lt;/p&gt;
&lt;p&gt;AddItem(PatientID, PatientLName, &amp;quot;PatientData&amp;quot;); // and here I get the error: the name PatientData does not exist in the current context&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;You forgot your &amp;quot;&amp;quot;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;For your first error,&lt;/p&gt;
&lt;p&gt;Do you use Visual Studio?? If so try to write the code and see what visual studio suggest you went you type dataRow. and try to find the list of items inside the row. It should be named something like Items or anything refering to data.&lt;/p&gt;</description></item><item><title>Re: How do I bind a list box to an existing dataset?</title><link>https://www.infopathdev.com:443/forums/thread/55581.aspx</link><pubDate>Thu, 03 Jun 2010 18:17:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55581</guid><dc:creator>rbemiller</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55581.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55581</wfw:commentRss><description>&lt;p&gt;Okay, thanks.&amp;nbsp; I&amp;#39;m on the right track now...but still getting some errors.&amp;nbsp; See my comments to the right of the code.&lt;/p&gt;
&lt;p&gt;The xml file is called PatientData.xml and I created a datasource called PatientData that references the xml file.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;RemoveItems(&amp;quot;PatientData&amp;quot;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (DataRow dataRow in patientTable.Rows)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string PatientID = dataRow.Item[patientId].toString(); // here and on the next line I&amp;#39;m getting an error at the .Item part of dataRow.Item[...&amp;nbsp; the error: System.data.datarow doesn&amp;#39;t contain a definion for Item&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string PatientLName = dataRow.Item[patientLastName].toString();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AddItem(PatientID, PatientLName, PatientData); // and here I get the error: the name PatientData does not exist in the current context&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/p&gt;
&lt;p&gt;... then...&lt;/p&gt;
&lt;p&gt;private void RemoveItems(string dataConnection)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XPathNavigator DOM = DataSources[dataConnection].CreateNavigator();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XPathNavigator group1 = DOM.SelectSingleNode(&amp;quot;//options&amp;quot;, NamespaceManager); while (group1.MoveToFirstChild())&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group1.DeleteSelf();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void AddItem(string itemId, string itemName, string dataConnection)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XPathNavigator DOM = DataSources[dataConnection].CreateNavigator();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XPathNavigator DOM2 = DataSources[&amp;quot;PatientData&amp;quot;].CreateNavigator();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XPathNavigator group1 = DOM.SelectSingleNode(&amp;quot;//options&amp;quot;, NamespaceManager);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XPathNavigator field1 = DOM2.SelectSingleNode(&amp;quot;//options/option&amp;quot;, NamespaceManager);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XPathNavigator newNode = field1.Clone();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newNode.SelectSingleNode(&amp;quot;value&amp;quot;).SetValue(itemId);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newNode.SelectSingleNode(&amp;quot;displayname&amp;quot;).SetValue(itemName);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group1.AppendChild(newNode);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How do I bind a list box to an existing dataset?</title><link>https://www.infopathdev.com:443/forums/thread/55579.aspx</link><pubDate>Thu, 03 Jun 2010 17:35:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55579</guid><dc:creator>mgarant</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55579.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55579</wfw:commentRss><description>&lt;p&gt;You just need to go through all the data inside your dataset with a foreach loop and then populate your list with the AddItems function.&lt;/p&gt;&lt;font face="Arial" size="2"&gt;
&lt;p&gt;&lt;br /&gt;&lt;font color="#0000ff"&gt;foreach&lt;/font&gt; (DataRow dataRow &lt;font color="#0000ff"&gt;in&lt;/font&gt; patientTable.Rows)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; approver =&amp;nbsp;dataRow.Item[&amp;lt;the ID of the data you want to recover&amp;gt;].toString();&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; username = dataRow.Item[&amp;lt;the ID of the data you want to recover&amp;gt;].toString();&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AddItems(approver, username, &amp;lt;dataconnection&amp;gt;);&lt;/p&gt;
&lt;p&gt;} &lt;/font&gt;&lt;/p&gt;</description></item><item><title>Re: How do I bind a list box to an existing dataset?</title><link>https://www.infopathdev.com:443/forums/thread/55577.aspx</link><pubDate>Thu, 03 Jun 2010 16:06:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55577</guid><dc:creator>rbemiller</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55577.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=55577</wfw:commentRss><description>&lt;p&gt;Okay, I&amp;#39;ve finally been able to get back to this and I&amp;#39;m having trouble.&amp;nbsp; I have created the empty xml file (PatientData.xml), now I need to populate&amp;nbsp;it with my dataset.&amp;nbsp; It looks like in this example this is&amp;nbsp;getting its data from a sharepoint list, but my datasource is a SQL Stored Procedure.&amp;nbsp; I&amp;#39;m not sure how to make it work for my needs.&amp;nbsp; Any help is appreciated.&amp;nbsp; Thanks!&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the code block where I need to do this:&lt;/p&gt;
&lt;p&gt;...&lt;br /&gt;//Make call to SP&lt;br /&gt;adpt = new SqlDataAdapter(cmd);&lt;br /&gt;DataTable patientTable = new DataTable();&lt;br /&gt;adpt.Fill(patientTable);&lt;/p&gt;
&lt;p&gt;//Make sure not more than one patient&lt;br /&gt;if (patientTable.Rows.Count &amp;gt; 1)&lt;br /&gt;{&lt;br /&gt;// here&amp;#39;s where I need to populate the xml for the secondary datasource, and then &lt;br /&gt;}&lt;/p&gt;</description></item></channel></rss>