<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: another listbox problem ;-)</title><link>https://www.infopathdev.com:443/forums/thread/13689.aspx</link><pubDate>Sat, 01 Oct 2005 08:13:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13689</guid><dc:creator>mephisto</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13689.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13689</wfw:commentRss><description>hello MFaus,&lt;br /&gt;&lt;br /&gt;thx for your answer! now i get the right id to query the sql-database!!! in my infopath-form the value and display-name was the same .... now i have the id as value ;-)&lt;br /&gt;&lt;br /&gt;thx very much&lt;br /&gt;&lt;br /&gt;mephisto</description></item><item><title>Re: another listbox problem ;-)</title><link>https://www.infopathdev.com:443/forums/thread/13688.aspx</link><pubDate>Fri, 30 Sep 2005 14:29:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13688</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13688.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13688</wfw:commentRss><description>1) Double-click on your listbox in design mode and at the bottom where you have connected the list to a SQL database, you can choose what field you want to be the "Value" and what field you want to be the "Display Name". When you call selectSingleNode("...").text it will return the value of the field that you chose for "Value", not "Display Name". "Display Name" is simply what the user sees when they drop down the menu. Make sure that the "Display Name" is textual, but the MAIN thing that you need to do is make the "Value" field correspond with you "id" from your database.&lt;br /&gt;&lt;br /&gt;2) After you have done this, things will be a lot easier and you can query your database from within your code to gather all the information you could want. Your query statement would look like this: &lt;pre&gt;"SELECT * FROM _table_ WHERE id = \"" + parseInt(thisXDocument.DOM.selectSingleNode("my:myFields/my:Car").text) + "\""&lt;/pre&gt;Of course, your code will be different depending on what language you're using (not exactly sure on yours), but you should get the gist of it.&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;Matt Faus&lt;br /&gt;</description></item><item><title>another listbox problem ;-)</title><link>https://www.infopathdev.com:443/forums/thread/12595.aspx</link><pubDate>Fri, 30 Sep 2005 07:05:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12595</guid><dc:creator>mephisto</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12595.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12595</wfw:commentRss><description>hello,&lt;br /&gt;&lt;br /&gt;i fill my listbox with a dataconnection to a sql-server. the listbox shows e.g. all cars available for rent. any entry gets a id as value from the sql-table. now i want to use the choosen entry in my c# code. i do not need the car, i need the value (id) of that. i tryed to get this by thisXDocument.DOM.selectSingleNode("my:myFields/my:Car").text but this don`t gets the id. how can i get the value?&lt;br /&gt;&lt;br /&gt;thx&lt;br /&gt;mephisto</description></item></channel></rss>