<?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: Filling up a repeating Field with Code (C#)</title><link>https://www.infopathdev.com:443/forums/thread/73799.aspx</link><pubDate>Wed, 11 Jan 2012 18:17:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73799</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73799.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=73799</wfw:commentRss><description>&lt;p&gt;My guess would be that the null reference exception is occurring when you set the value of&amp;nbsp;&amp;quot;value&amp;quot; and &amp;quot;display&amp;quot;, because SelectSingleNode is failing to select a node.&amp;nbsp;I see that SingleMember is using the &amp;quot;my&amp;quot; namespace - are &amp;quot;value&amp;quot; and &amp;quot;display&amp;quot; children of SingleMember? If they are fields, they&amp;#39;d probably also be using the &amp;quot;my&amp;quot; namespace:&lt;/p&gt;
&lt;p&gt;newMember.SelectSingleNode(&amp;quot;my:value&amp;quot;, NamespaceManager).SetValue(&amp;quot;test&amp;quot;);&lt;/p&gt;
&lt;p&gt;For example (don&amp;#39;t forget, you&amp;#39;ll need a NamespaceManager for SelectSingleNode, since the XPath has a namespace).&lt;/p&gt;</description></item><item><title>Filling up a repeating Field with Code (C#)</title><link>https://www.infopathdev.com:443/forums/thread/73797.aspx</link><pubDate>Wed, 11 Jan 2012 17:59:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73797</guid><dc:creator>XDestroy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73797.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=73797</wfw:commentRss><description>Hello everyone,

I have a problem with filling up a Drop Down List Box.

My Goal is this: I want to use code to fill up a Drop Down List Box because I want to use a Data Connection I&amp;#39;ve just created and there has to be some logic.
To use code for this task I planned to Bind the Drop Down List Box to a repeating field. I have created a Group (called &amp;quot;AllMembers&amp;quot;) and in that group is a
repeating field called &amp;quot;SingleMember&amp;quot; which is Binded/Bound (?) to the Drop Down List (sorry for my English).

I now tried to fill up the Field this way:

&lt;a href="http://imageshack.us/photo/my-images/718/11012012190257.png/" target="_blank" title="http://imageshack.us/photo/my-images/718/11012012190257.png/"&gt;&lt;img src="http://img718.imageshack.us/img718/4373/11012012190257.png" border="0" alt="" /&gt;&lt;/a&gt;

Uploaded with &lt;a href="http://imageshack.us" target="_blank" title="http://imageshack.us"&gt;ImageShack.us&lt;/a&gt; 

Unfortunately I get a nullreference Exception. Do you have any Idea what is wrong here? Maybe complete stupid way to do what I need? :-)
Thanks!!

I used this manual: http://www.bizsupportonline.net/infopath2007/programmatically-fill-populate-drop-down-list-box-infopath-2007.htm

I am using InfoPath 2010.

Regards
Christian</description></item></channel></rss>