<?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: Setting the field value of the Current Node (repeating section)</title><link>https://www.infopathdev.com:443/forums/thread/106423.aspx</link><pubDate>Tue, 03 May 2016 09:39:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:106423</guid><dc:creator>Swapnil</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/106423.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=106423</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hey Jimmy,Your post is life saving man.Though my requirement was little different,but your work helped me alot.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Thanks buddy&lt;/b&gt;. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Setting the field value of the Current Node (repeating section)</title><link>https://www.infopathdev.com:443/forums/thread/41772.aspx</link><pubDate>Fri, 15 May 2009 16:38:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:41772</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/41772.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=41772</wfw:commentRss><description>&lt;p&gt;If I understand the original post in this thread, you want to set the value of a field in the selected row of the master/detail section, correct?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;If so, please check out the attached template.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;The trick here is that I am using a special formula in a rule&amp;nbsp;on the button&amp;nbsp;to store the current row number in a hidden&amp;nbsp;field:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&amp;nbsp;xdXDocument:GetNamedNodeProperty(/my:myFields/my:group1, &amp;quot;CTRL1_5&amp;quot;, 1)&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This formula will change slightly depending on your setup.&amp;nbsp; Generally the &amp;quot;/my:myFields/my:group1&amp;quot; part corresponds to the parent of the repeating node in the master/detail section and the &amp;quot;CTRL1_5&amp;quot; part is the master/detail section&amp;#39;s ViewContext id (you can find this by opening the master/detail&amp;#39;s controls and going to the advanced tab).&lt;/p&gt;
&lt;p&gt;Then I use the trick from Hilary&amp;#39;s link to set the value of a field in just one row, but this time it&amp;#39;s just a little trickier:&lt;/p&gt;&lt;font size="2"&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&amp;lt;xsf:assignmentAction targetField=&amp;quot;my:group1/my:group2&lt;u&gt;[position() = /my:myFields/my:group1/@my:currentRow]&lt;/u&gt;/my:field3&amp;quot; expression=&amp;quot;&amp;amp;quot;Yay!&amp;amp;quot;&amp;quot;&amp;gt;&amp;lt;/xsf:assignmentAction&amp;gt;&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The underlined part tells the rule to just set the value in the row whose row number is equal to the value in /my:myFields/my:group1/@my:currentRow, and since the previous rule has just stored the current row number in that field, this means that only the field in the selected row gets set.&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Setting the field value of the Current Node (repeating section)</title><link>https://www.infopathdev.com:443/forums/thread/41763.aspx</link><pubDate>Fri, 15 May 2009 12:55:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:41763</guid><dc:creator>InfopathNewbieRJ20</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/41763.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=41763</wfw:commentRss><description>&lt;p&gt;I have tried that and it worked well, but It only applied to the first row.&amp;nbsp; The field that is setting the repeating row value is coming from another repeating table using Webservice as a query.&amp;nbsp; I am using the rules in the button to take that field value from&amp;nbsp;repeating table&amp;nbsp;and set it in a master/Detail repeating table.&amp;nbsp; Is there something extra that needs to added if another row is generated?&amp;nbsp; It is not always the case that there will be more than one row.&amp;nbsp;&amp;nbsp;I am really hoping to stay away from code and I am using IP2003.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Setting the field value of the Current Node (repeating section)</title><link>https://www.infopathdev.com:443/forums/thread/41754.aspx</link><pubDate>Fri, 15 May 2009 01:08:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:41754</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/41754.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=41754</wfw:commentRss><description>&lt;p&gt;Hi --&lt;/p&gt;
&lt;p&gt;There is a post by Jimmy Rishe in &lt;a href="http://www.infopathdev.com/forums/p/9316/33499.aspx#33499"&gt;this&lt;/a&gt; thread that I think explains what you want to do -- specify a filter on the target field for a rule. I use this technique when I need to and I really think it is slick...&lt;/p&gt;</description></item><item><title>Setting the field value of the Current Node (repeating section)</title><link>https://www.infopathdev.com:443/forums/thread/41670.aspx</link><pubDate>Wed, 13 May 2009 19:36:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:41670</guid><dc:creator>DanRegalia</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/41670.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=41670</wfw:commentRss><description>&lt;p&gt;Hey all,&lt;/p&gt;
&lt;p&gt;I have run into a brick wall here... While i have overcome many of my previous issues, I&amp;#39;ve done pretty good at figuring out Infopath....&lt;/p&gt;
&lt;p&gt;...except this.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I have a Repeating Section (Detail) which syncs to the Repeating Table (master).&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Lets say I have 3 fields (e1, e2, e3)&amp;nbsp;in the master table, with 2 rows of data.&amp;nbsp;&amp;nbsp; We will call this repeating section &amp;#39;MyStuff&amp;#39;&lt;br /&gt;|=====|=====|====|&amp;nbsp;&amp;nbsp; (1)&amp;nbsp;&amp;nbsp;&amp;nbsp; (master view)&lt;br /&gt;|=====|=====|====|&amp;nbsp;&amp;nbsp; (2)&amp;nbsp;&amp;nbsp;&amp;nbsp; (master view)&lt;br /&gt;&amp;nbsp;&amp;nbsp; e1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e3&lt;/p&gt;
&lt;p&gt;Now, I have another section that is a repeating table called &amp;#39;MyOtherStuff&amp;#39; with just fields of data&lt;/p&gt;
&lt;p&gt;|=====|=====|====|btn|&amp;nbsp;&amp;nbsp; (1)&lt;br /&gt;|=====|=====|====|btn|&amp;nbsp;&amp;nbsp; (2)&lt;br /&gt;|=====|=====|====|btn|&amp;nbsp;&amp;nbsp; (3)&lt;br /&gt;|=====|=====|====|btn|&amp;nbsp;&amp;nbsp; (4)&lt;br /&gt;&amp;nbsp;&amp;nbsp; d1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; d2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; d3&lt;/p&gt;
&lt;p&gt;&amp;nbsp;So, how would i grab the value of say row 3 value d1 and put that into row 2 field e2&lt;/p&gt;
&lt;p&gt;So far, i have put a rule on the&amp;nbsp;&amp;#39;btn&amp;#39; in &amp;#39;myOtherStuff&amp;#39; which pulls the value:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; current()/my:d2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and I can set any field to that value.&amp;nbsp;(say field1 under the root node)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Figure 1 is my Master, I have not listed the Details view.. but say i had a field in my Details view that i wanted to set the value from r3/d2 to&lt;/p&gt;
&lt;p&gt;When i&amp;nbsp;execute the rule , it sets every e2 to the value to r3/d2, instead of just the 1 cell.&lt;/p&gt;
&lt;p&gt;Thanks for the help, and I hope i explained this completely.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;~Doc&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>