<?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: get current row of repeating table in code</title><link>https://www.infopathdev.com:443/forums/thread/14665.aspx</link><pubDate>Thu, 15 Jun 2006 22:18:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14665</guid><dc:creator>Carolyn</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14665.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14665</wfw:commentRss><description>&lt;blockquote id="quote"&gt;&lt;font size="1" face="Verdana, Arial, Helvetica" id="quote"&gt;quote:&lt;hr height="1" noshade id="quote"&gt;&lt;i&gt;Originally posted by madhuri&lt;/i&gt;&lt;br /&gt;Following link has info to get the current row in repeating table, Hope you find it useful!&lt;br /&gt;&lt;hr height="1" noshade id="quote"&gt;&lt;/font id="quote"&gt;&lt;/blockquote id="quote"&gt;&lt;br /&gt;&lt;br /&gt;Thanks, but I have been through a lot of these threads and still can't seem to make it work. I will post specific code examples and hope that someone can tell me what I am doing wrong. I won't be able to do that until later.&lt;br /&gt;&lt;br /&gt;I truly appreciate your help.&lt;br /&gt;&lt;br /&gt;Posted later (6/17/2006)&lt;br /&gt;After much trial and error (especially error) I got it to work. I am going to post exactly what I did.&lt;br /&gt;&lt;br /&gt;I have a repeating table. I have a combo box in the table, and I wish a running sum (SumA) to be filled when the combo box value is changed. In my simple example, I want Amount to go into SumA.&lt;br /&gt;&lt;br /&gt;The repeating table should look something like this:&lt;br /&gt;&lt;br /&gt;Amount   SumA  SumB   A or B?(dropdown)&lt;br /&gt;2         2     0        A&lt;br /&gt;3         0     3        B&lt;br /&gt;&lt;br /&gt;I am working in VB.net.&lt;br /&gt;&lt;br /&gt;I wrote a event handler OnAfterChange for the dropdown box. In this event handler is the following code:&lt;br /&gt;&lt;br /&gt;            Dim strAmt As String&lt;br /&gt;            strAmt = e.Site.selectSingleNode("../my:Amount").text&lt;br /&gt;            e.Site.selectSingleNode("../my:SumA").text = strAmt&lt;br /&gt;&lt;br /&gt;I still need to convert to numbers and write code to zero out boxes if the drop-down is changed. I also need the code for the "B" choice. This code snip is the essence of the solution to my problem. The rest is doable.</description></item><item><title>Re: get current row of repeating table in code</title><link>https://www.infopathdev.com:443/forums/thread/14664.aspx</link><pubDate>Thu, 15 Jun 2006 06:41:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14664</guid><dc:creator>madhuri</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14664.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14664</wfw:commentRss><description>Hi&lt;br /&gt;&lt;br /&gt;Following link has info to get the current row in repeating table, Hope you find it useful!&lt;br /&gt;&lt;br /&lt;a target="_blank" href=http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1252&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1252&lt;/a&gt;&lt;br /&gt;</description></item><item><title>get current row of repeating table in code</title><link>https://www.infopathdev.com:443/forums/thread/12899.aspx</link><pubDate>Wed, 14 Jun 2006 23:39:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12899</guid><dc:creator>Carolyn</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12899.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12899</wfw:commentRss><description>I am using VB.Net code with InfoPath SP2. &lt;br /&gt;&lt;br /&gt;I have a repeating table. I wish to click a button in a given row of the repeating table and insert a value in one of repeating table row text boxes. (Alternatively, change the value in a drop-down with a AfterChange event.)&lt;br /&gt;&lt;br /&gt;I had a tough time figuring out how to make it enter code in any except the first line. That is done with adding a [x] (where x is an integer) in the selectSingleNode query string.&lt;br /&gt;&lt;br /&gt;Fine, dandy.&lt;br /&gt;&lt;br /&gt;Here is my example that works. It puts a 52 into the SumA field in the second repeating row.&lt;br /&gt;&lt;br /&gt;'(following is one line in code)&lt;br /&gt;thisXDocument.DOM.selectSingleNode("/my:myFields/my:Expenses[2]/@my:SumA").text = "52"&lt;br /&gt;&lt;br /&gt;What I cannot figure out is how to, in code, get the current row. How do I know that if I click a button (or change a drop-down list value) what is the current row of the repeating table so the number will go into SumA of that row?&lt;br /&gt;&lt;br /&gt;TIA</description></item></channel></rss>