<?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: Changing the value of one field in my table for all rows in the table</title><link>https://www.infopathdev.com:443/forums/thread/33514.aspx</link><pubDate>Fri, 24 Oct 2008 19:25:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33514</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33514.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=33514</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m not sure why you are using code for this. Doesn&amp;#39;t a rule, like I suggested in the PM I sent you, work?&lt;/p&gt;
&lt;p&gt;If you want to use code, you&amp;#39;ll need to get the repeating node and loop through it, setting the value of the field. &lt;/p&gt;
&lt;p&gt;For example (C#, 2007 Object Model):&lt;/p&gt;
&lt;blockquote&gt;
&lt;div style="PADDING-RIGHT:0in;MARGIN-TOP:0in;PADDING-LEFT:0in;FONT-SIZE:11pt;MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;font face="Courier New"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font color="#2b91af"&gt;XPathNodeIterator&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;"&gt; nodes = MainDataSource.CreateNavigator().Select(&lt;font color="#a31515"&gt;&amp;quot;/my:myFields/my:group1/my:group2&amp;quot;&lt;/font&gt;, &lt;font color="#0000ff"&gt;this&lt;/font&gt;.NamespaceManager);&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="PADDING-RIGHT:0in;MARGIN-TOP:0in;PADDING-LEFT:0in;FONT-SIZE:11pt;MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#0000ff"&gt;foreach&lt;/font&gt; (&lt;font color="#2b91af"&gt;XPathNavigator&lt;/font&gt; node &lt;font color="#0000ff"&gt;in&lt;/font&gt; nodes)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="PADDING-RIGHT:0in;MARGIN-TOP:0in;PADDING-LEFT:0in;FONT-SIZE:11pt;MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="PADDING-RIGHT:0in;MARGIN-TOP:0in;PADDING-LEFT:0in;FONT-SIZE:11pt;MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;node.SelectSingleNode(&lt;font color="#a31515"&gt;&amp;quot;my:field3&amp;quot;&lt;/font&gt;, &lt;font color="#0000ff"&gt;this&lt;/font&gt;.NamespaceManager).SetValue(&lt;font color="#a31515"&gt;&amp;quot;yes&amp;quot;&lt;/font&gt;);&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="PADDING-RIGHT:0in;MARGIN-TOP:0in;PADDING-LEFT:0in;FONT-SIZE:11pt;MARGIN-BOTTOM:10pt;LINE-HEIGHT:115%;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;</description></item><item><title>Changing the value of one field in my table for all rows in the table</title><link>https://www.infopathdev.com:443/forums/thread/33513.aspx</link><pubDate>Fri, 24 Oct 2008 19:05:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33513</guid><dc:creator>mcalicea</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33513.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=33513</wfw:commentRss><description>&lt;p&gt;I am trying to use custom code on a button to change the value of one field in every row of my table from Yes to No.&amp;nbsp; Has anyone tried this?&lt;/p&gt;</description></item></channel></rss>