<?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: Drop Down List 2nd value</title><link>https://www.infopathdev.com:443/forums/thread/3541.aspx</link><pubDate>Fri, 01 Dec 2006 09:21:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:3541</guid><dc:creator>Alien1983</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/3541.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=3541</wfw:commentRss><description>Thanks, I'll try with DOM :)</description></item><item><title>Re: Drop Down List 2nd value</title><link>https://www.infopathdev.com:443/forums/thread/3540.aspx</link><pubDate>Tue, 28 Nov 2006 10:37:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:3540</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/3540.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=3540</wfw:commentRss><description>Hi Aliena1983,&lt;br /&gt;&lt;br /&gt;If you manually populate the values of the dropdown there is no way to programatically access them.  The reason the NodeList that you are getting has a length of one is because you are getting the value of the current selection in the drop-down, not the list of possible values.  What you will have to do is move the possible values to a secondary DOM, or a repeating node in your main DOM.&lt;br /&gt;&lt;br /&gt;Moving the selections in the dropdown to a secondary DOM has been discussed many times on the forum.</description></item><item><title>Re: Drop Down List 2nd value</title><link>https://www.infopathdev.com:443/forums/thread/3539.aspx</link><pubDate>Mon, 27 Nov 2006 14:59:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:3539</guid><dc:creator>Alien1983</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/3539.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=3539</wfw:commentRss><description>Can someone help me/us? I noticed that there is a similar thread &lt;b&gt;Dropdown Lists&lt;/b&gt; by michael.knowles. I also need to find the max value of my list but my list consist of strings. I need to do some parse operations first and then find max, so I need a reference to any element of my list.&lt;br /&gt;&lt;br /&gt;Please help :)</description></item><item><title>Re: Drop Down List 2nd value</title><link>https://www.infopathdev.com:443/forums/thread/3538.aspx</link><pubDate>Sun, 26 Nov 2006 09:20:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:3538</guid><dc:creator>Alien1983</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/3538.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=3538</wfw:commentRss><description>Thanks for your reply&lt;br /&gt;&lt;br /&gt;The interesting thing is that length of my list = 1 but my list consist of for example 5 elements. I populate my list by manually enter values in Properties of my list. On the preview there are all elements but length still = 1. Why? :(&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Set myList = XDocument.DOM.selectNodes("/my:mojePola/my:pole1")&lt;br /&gt;Set textField = XDocument.DOM.selectSingleNode("/my:mojePola/my:pole2")&lt;br /&gt;textField.text = myList.length&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;// textField.text, gives me 1&lt;br /&gt;&lt;br /&gt;PS. The list is not repeatable, this is simple list and there are for example 5 values:&lt;br /&gt;aa, bb, cc, dd, ee</description></item><item><title>Re: Drop Down List 2nd value</title><link>https://www.infopathdev.com:443/forums/thread/3537.aspx</link><pubDate>Fri, 24 Nov 2006 18:21:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:3537</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/3537.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=3537</wfw:commentRss><description>Hi Alien Welcome to the Forums,&lt;br /&gt;&lt;br /&gt;Can you check in your list (myList) once how many nodes it returns and that is you expected answer or not. Some times it will return “/n/t” also consider as nodes. &lt;br /&gt;If ‘myList#%92 is repeated nodes it returns some length. In debug mode you can get the length of the myList using ‘myList.length#%92 and it will return integer value. &lt;br /&gt;&lt;br /&gt;If you have list of nodes in ‘myList#%92 node list, then you can write the below code to get the second node value.&lt;br /&gt;&lt;br /&gt;//Check the node length is more than zero or not&lt;br /&gt;If(myList.length &amp;gt; 0)&lt;br /&gt;{&lt;br /&gt;//Get the second node	&lt;br /&gt;IXMLDOMNode secondNode = myList[1];&lt;br /&gt;//Get the second node value&lt;br /&gt;var nodeValue = secondNode.text;&lt;br /&gt;}</description></item><item><title>Re: Drop Down List 2nd value</title><link>https://www.infopathdev.com:443/forums/thread/3536.aspx</link><pubDate>Fri, 24 Nov 2006 14:24:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:3536</guid><dc:creator>Alien1983</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/3536.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=3536</wfw:commentRss><description>Of course lista = myList, I made some translation mistakes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Dim myList As IXMLDOMNodeList&lt;br /&gt;myList = thisXDocument.DOM.selectNodes("my:myFields/my:test")&lt;br /&gt;textField.text = myList(1).text&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Generally I need a reference to n element of my list.&lt;br /&gt;&lt;br /&gt;I would be greatful if you could help.</description></item><item><title>Drop Down List 2nd value</title><link>https://www.infopathdev.com:443/forums/thread/1682.aspx</link><pubDate>Fri, 24 Nov 2006 14:17:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:1682</guid><dc:creator>Alien1983</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/1682.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=1682</wfw:commentRss><description>Hello&lt;br /&gt;&lt;br /&gt;I need to display the 2nd value of my drop down list.&lt;br /&gt;&lt;br /&gt;This displays the FIRST value of my list:&lt;br /&gt;-----------------------------------------&lt;br /&gt;&lt;pre&gt;Dim myList As IXMLDOMNode&lt;br /&gt;myList = thisXDocument.DOM.selectSingleNode("my:myFields/my:test")&lt;br /&gt;textField.text = myList.text&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This also displays the FIRST value of my list:&lt;br /&gt;-----------------------------------------&lt;br /&gt;&lt;pre&gt;Dim myList As IXMLDOMNodeList&lt;br /&gt;myList = thisXDocument.DOM.selectNodes("my:myFields/my:test")&lt;br /&gt;textField.text = lista(0).text&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;BUT.....&lt;br /&gt;&lt;br /&gt;This DOESN't displays the SECOND value of my list :(&lt;br /&gt;-----------------------------------------------------&lt;br /&gt;&lt;pre&gt;Dim myList As IXMLDOMNodeList&lt;br /&gt;myList = thisXDocument.DOM.selectNodes("my:myFields/my:test")&lt;br /&gt;textField.text = lista(1).text&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This gives me an error:&lt;br /&gt;&lt;br /&gt;System.NullReferenceException&lt;br /&gt;Object reference not set to an instance of an object.&lt;br /&gt;&lt;br /&gt;How can I display the second value of my list? Any suggestions?&lt;br /&gt;&lt;br /&gt;PS. I don't want to use XPath because I need to do some operations directly from my VB code.</description></item></channel></rss>