<?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: Traversing through rows in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/44113.aspx</link><pubDate>Fri, 10 Jul 2009 09:40:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44113</guid><dc:creator>GazM</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44113.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=44113</wfw:commentRss><description>&lt;p&gt;Doh!&lt;/p&gt;
&lt;p&gt;Fixed this one myself. Previous code was trying to pick the field rather than the row.&lt;/p&gt;
&lt;p&gt;This works:&lt;/p&gt;
&lt;p&gt;Dim oComment&lt;/p&gt;
&lt;p&gt;Dim oLastRow&lt;/p&gt;
&lt;p&gt;Set oLastRow = XDocument.DOM.selectSingleNode(&amp;quot;//my:myFields/my:Approval/my:Response[last()]&amp;quot;)&lt;/p&gt;
&lt;p&gt;Set oComment = oLastRow.selectSingleNode(&amp;quot;my:Comment&amp;quot;)&lt;/p&gt;
&lt;p&gt;Gary&lt;/p&gt;</description></item><item><title>Re: Traversing through rows in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/44033.aspx</link><pubDate>Thu, 09 Jul 2009 13:06:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44033</guid><dc:creator>GazM</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44033.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=44033</wfw:commentRss><description>&lt;p&gt;Jimmy&lt;/p&gt;
&lt;p&gt;I have tried the last() method (as mentioned earlier in this thread) to pick up the last row in my repeating table but it doesn&amp;#39;t seem to work. It is picking up the first row of the table every time.&lt;/p&gt;
&lt;p&gt;Dim oComment&lt;/p&gt;
&lt;p&gt;&amp;#39;creates value for Comment&lt;/p&gt;
&lt;p&gt;Set oComment = XDocument.DOM.selectSingleNode(&amp;quot;//my:myFields/my:Approval/my:Response/my:Comment[last()]&amp;quot;)&lt;/p&gt;
&lt;p&gt;The code is used to extract the text from my:Comment and insert it into an automated email response triggered from a button control. I am using IP2003 SP1&lt;/p&gt;
&lt;p&gt;Gary&lt;/p&gt;</description></item><item><title>Re: Traversing through rows in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/36825.aspx</link><pubDate>Fri, 09 Jan 2009 04:24:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36825</guid><dc:creator>savita</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36825.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36825</wfw:commentRss><description>&lt;p&gt;Hey Jimmy, you are correct. The columns inflow_assigned_to, inflow_assigned_date, inflow_assigned_by and reassigned are siblings. I did as you suggested.&amp;nbsp;And now the&amp;nbsp;code actually works!!! Here is how it looks after the changes:&lt;/p&gt;
&lt;p&gt;If IgnoreInsertsValue() = &amp;quot;false&amp;quot; and eventObj.Operation = &amp;quot;Insert&amp;quot; Then&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;assigning for the first time&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (eventObj.OldValue = &amp;quot;&amp;quot;) and (eventObj.NewValue &amp;lt;&amp;gt; &amp;quot;&amp;quot;) then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; eventObj.Site.selectSingleNode(&amp;quot;../@inflow_assigned_date&amp;quot;) =&amp;nbsp;now2_ISO_Date(now())&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;eventObj.Site.selectSingleNode(&amp;quot;../@inflow_assigned_by&amp;quot;) =&amp;nbsp;m_user_id&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;reassigning&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;if (eventObj.OldValue &amp;lt;&amp;gt; &amp;quot;&amp;quot;) then&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;set reassigned flag&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;eventObj.Site.selectSingleNode(&amp;quot;../@reassigned&amp;quot;) = &amp;quot;Y&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End if&lt;br /&gt;&amp;nbsp;&lt;br /&gt;End if&lt;/p&gt;
&lt;p&gt;It took me some time to really understand the xDocument, DOM, eventObj etc. Thanks a LOT for all your help, especially when not much help is available for the combination (IP2003 and VBScript) I am using. &lt;/p&gt;</description></item><item><title>Re: Traversing through rows in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/36586.aspx</link><pubDate>Mon, 05 Jan 2009 17:16:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36586</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36586.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36586</wfw:commentRss><description>&lt;p&gt;I think you need to be assigning to the text() property of the nodes, as in:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;eventObj.Site.selectSingleNode(&amp;quot;inflow_assigned_date&amp;quot;)&lt;strong&gt;.text()&lt;/strong&gt; = now()&lt;br /&gt;eventObj.Site.selectSingleNode(&amp;quot;inflow_assigned_by&amp;quot;)&lt;strong&gt;.text() &lt;/strong&gt;= m_user_id&lt;br /&gt;eventObj.Site.selectSingleNode(&amp;quot;reassigned&amp;quot;)&lt;strong&gt;.text()&lt;/strong&gt; = &amp;quot;Y&amp;quot;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Also, are those nodes children of inflow_assigned_to?&amp;nbsp; If not, I would think you would need to move up one node in the DOM tree to get to them:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;eventObj.Site.selectSingleNode(&amp;quot;&lt;strong&gt;&lt;font color="#ff0000"&gt;../&lt;/font&gt;&lt;/strong&gt;inflow_assigned_date&amp;quot;).text() = now()&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Re: Traversing through rows in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/36584.aspx</link><pubDate>Mon, 05 Jan 2009 16:53:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36584</guid><dc:creator>savita</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36584.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36584</wfw:commentRss><description>&lt;p&gt;Hi Jimmy. Thanks for your suggestions. Got to learn a few things. Today, I tried what you&amp;nbsp;suggested. My code in the&amp;nbsp;OnAfterChange event of inflow_assigned_to field now looks like below:&lt;/p&gt;
&lt;p&gt;Sub msoxd__q_inflow_entry_inflow_assigned_to_attr_OnAfterChange(eventObj)&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If eventObj.IsUndoRedo Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; An undo or redo operation has occurred and the DOM is read-only.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Exit Sub&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;Row modified&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If IgnoreInsertsValue() = &amp;quot;false&amp;quot; and eventObj.Operation = &amp;quot;Insert&amp;quot; Then&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;assigning for the first time&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (eventObj.OldValue = &amp;quot;&amp;quot;) and (eventObj.NewValue &amp;lt;&amp;gt; &amp;quot;&amp;quot;) then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; eventObj.Site.selectSingleNode(&amp;quot;inflow_assigned_date&amp;quot;) = now()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;eventObj.Site.selectSingleNode(&amp;quot;inflow_assigned_by&amp;quot;) =&amp;nbsp;m_user_id&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox(&amp;quot;assigning for the first time&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;reassigning&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;if (eventObj.OldValue &amp;lt;&amp;gt; &amp;quot;&amp;quot;) then&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;set reassigned flag&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;eventObj.Site.selectSingleNode(&amp;quot;reassigned&amp;quot;) = &amp;quot;Y&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox(&amp;quot;reassigning&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;End if&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;End if&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;p&gt;Unfortunately, three lines stated below throw error as &amp;quot;Object doesn&amp;#39;t support this property or method.&amp;quot;&lt;/p&gt;
&lt;p&gt;eventObj.Site.selectSingleNode(&amp;quot;inflow_assigned_date&amp;quot;) = now()&lt;br /&gt;eventObj.Site.selectSingleNode(&amp;quot;inflow_assigned_by&amp;quot;) = m_user_id&lt;br /&gt;eventObj.Site.selectSingleNode(&amp;quot;reassigned&amp;quot;) = &amp;quot;Y&amp;quot;&lt;/p&gt;
&lt;p&gt;Is it because the Site property is read only? Then how do I set values for other fields in the same line?&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Traversing through rows in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/36506.aspx</link><pubDate>Fri, 02 Jan 2009 15:50:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36506</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36506.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36506</wfw:commentRss><description>&lt;p&gt;You can track changes to the assignedTo field by placing an OnAfterChange event handler on that node, but there is a bit of a catch because from the event handler&amp;#39;s perspective a row insertion looks exactly like a user&amp;#39;s value modification so we have to be a little tricky.&amp;nbsp; I suggest the following.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Add a new node my:ignoreInserts to your main data source, and make it a boolean value.&amp;nbsp; Whenever you query your secondary data source from a rule, set this node&amp;#39;s value to &lt;em&gt;true&lt;/em&gt; right before the query, and to &lt;em&gt;false&lt;/em&gt; right after.&amp;nbsp; Your form&amp;#39;s event handlers can check this value to know whether a change to a node was due to a query/row insertion, or due to a user modification.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;Also add these two subroutines and one function to your VBScript code:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Sub IgnoreInserts &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:ignoreInserts&amp;quot;).text() = &amp;quot;true&amp;quot; &lt;br /&gt;End Sub &lt;br /&gt;Sub DoneIgnoringInserts&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:ignoreInserts&amp;quot;).text() = &amp;quot;false&amp;quot; &lt;br /&gt;End Sub &lt;br /&gt;Function IgnoreInsertsValue()&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IgnoreInsertsValue = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:ignoreInserts&amp;quot;).NodeTypedValue &lt;br /&gt;End Function &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Call the first subroutine before adding a row to the table to set my:ignoreInserts to true, and call the second one after adding the row to set it back to false, so inserting a row would look something like this&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;IgnoreInserts&amp;nbsp;&amp;nbsp; &amp;#39;Set my:ignoreInserts to true&lt;br /&gt;XDocument.View.ExecuteAction &amp;quot;xCollection::insert&amp;quot;, &amp;quot;group2_1&amp;quot;&lt;br /&gt;&amp;#39;Make any changes you need to make to the new row&lt;br /&gt;DoneIgnoringInserts&amp;nbsp; &amp;#39;Restore my:ignoreInserts to false&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Then all you&amp;#39;ve got left to do is write the OnAfterChange event handler.&amp;nbsp; In the event handler, you will need some conditional code to check the value of my:ignoreInserts&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If IgnoreInsertsValue() = &amp;quot;false&amp;quot; and eventObj.Operation = &amp;quot;Insert&amp;quot; Then &lt;br /&gt;&amp;#39; insert the code you want to perform here&lt;br /&gt;&amp;#39;eventObj.OldValue holds the previous value of the field &lt;br /&gt;&amp;#39;eventObj.NewValue holds the new value of the field &lt;br /&gt;&amp;#39;you can access the element to which this attribute belongs using eventObj.Site.selectSingleNode(&amp;quot;..&amp;quot;) &lt;br /&gt;End if &lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Re: Traversing through rows in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/36503.aspx</link><pubDate>Fri, 02 Jan 2009 14:19:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36503</guid><dc:creator>savita</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36503.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36503</wfw:commentRss><description>&lt;p&gt;Hi Jimmy. Thanks for your help. Let me explain what i am trying to do in detail. We have telexes coming in from all over the world in another system. The telexes have to be taken care of within the stipulated turn time. We call it inflow. Someone needs to keep track of all the inflow. That user&amp;nbsp;should be able to add new inflow to the table, assign inflow to user while adding, reassign pending inflow to some other user, all in one screen.&amp;nbsp;I retrieve all the rows (or inflow/telex records)&amp;nbsp;which are still pending. I need to capture the date/time when the inflow was added to the system, date/time when inflow was assigned and whether it was reassigned.&lt;/p&gt;
&lt;p&gt;My repeating table on the form looks like below with multiple rows retrieved from database.&lt;/p&gt;
&lt;p&gt;
&lt;table class="xdRepeatingTable msoUcTable" style="TABLE-LAYOUT:fixed;WIDTH:863px;BORDER-TOP-STYLE:none;BORDER-RIGHT-STYLE:none;BORDER-LEFT-STYLE:none;BORDER-COLLAPSE:collapse;WORD-WRAP:break-word;BORDER-BOTTOM-STYLE:none;" class="xdRepeatingTable msoUcTable"&gt;










&lt;tr&gt;
&lt;td class=""&gt;
&lt;div align="center"&gt;&lt;font face="Tahoma"&gt;Sr.No.&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td class=""&gt;
&lt;div align="center"&gt;&lt;font face="Tahoma"&gt;Week&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td class=""&gt;
&lt;div align="center"&gt;&lt;font face="Tahoma"&gt;Inflow Date&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td class=""&gt;
&lt;div align="center"&gt;&lt;font face="Tahoma"&gt;Request Id&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td class=""&gt;
&lt;div align="center"&gt;&lt;font face="Tahoma"&gt;Deal Source&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td class=""&gt;
&lt;div align="center"&gt;&lt;font face="Tahoma"&gt;Inflow Assigned Date&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td class=""&gt;
&lt;div align="center"&gt;&lt;font face="Tahoma"&gt;Assigned To&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td class=""&gt;
&lt;div align="center"&gt;&lt;font face="Tahoma"&gt;Out Of Queue&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;User not only adds to the repeating table but also makes updates. I need to capture the current row no so that&amp;nbsp;I can put my code in the OnAfterChange event of inflow_assigned_to field to check whether update was done in that row. How can I achieve such functionality using VBScript? Unfortunately we are using IP2003 and not IP2007.&lt;/p&gt;
&lt;p&gt;May be I had not described my problem with enough details in the previous posts. I&amp;#39;d be absolutely &lt;font face="Times New Roman" size="3"&gt;relieved if someone suggests a&amp;nbsp;&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt;solution. Thanks in advance.&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Re: Traversing through rows in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/36501.aspx</link><pubDate>Fri, 02 Jan 2009 14:07:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36501</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36501.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36501</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;In your code check once the XPath of your field. XPath should be correct otherwise it won&amp;#39;t work.&lt;/p&gt;
&lt;p&gt;node.selectSingleNode(&amp;quot;XPath of your field&amp;quot;)&lt;/p&gt;
&lt;p&gt;If you are using InfoPath 2007 then,&lt;/p&gt;
&lt;p&gt;node.selectSingleNode(&amp;quot;XPath of your field&amp;quot;, this.NamespaceManager)&lt;/p&gt;</description></item><item><title>Re: Traversing through rows in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/36496.aspx</link><pubDate>Fri, 02 Jan 2009 13:34:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36496</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36496.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36496</wfw:commentRss><description>&lt;p&gt;With regard to your second question (deleting rows), you can place a button in the repeating table that will handle deletion.&amp;nbsp; The button&amp;#39;s event handler will look something like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Sub CTRL5_5_OnClick(eventObj) &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;#39; Write your code here &lt;br /&gt;End Sub&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;eventObj.Source is a reference to the node in the repeating group corresponding to the row of the table where the button was clicked. So in your example:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;eventObj.Source.selectSingleNode(&amp;quot;@inflow_entered_by&amp;quot;)&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;would select the &lt;em&gt;inflow_entered_by&lt;/em&gt; attribute in the row where the button was clicked.&lt;/p&gt;
&lt;p&gt;Once you have set whatever values you need and made whatever checks you need to perform, you can use this to remove the row where the button was clicked:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;XDocument.View.ExecuteAction &amp;quot;xCollection::remove&amp;quot;, &amp;quot;q_inflow_entry_1&amp;quot;&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Re: Traversing through rows in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/36494.aspx</link><pubDate>Fri, 02 Jan 2009 06:26:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36494</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36494.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36494</wfw:commentRss><description>&lt;p&gt;When you insert a new row into the table, the row is added to the end of the table, right?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;If so, you should be able to use&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;XDocument.DOM.selectSingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/d:q_inflow_entry[last()]&amp;quot;)&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;to access the last row.&lt;/p&gt;</description></item><item><title>Re: Traversing through rows in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/36491.aspx</link><pubDate>Fri, 02 Jan 2009 04:56:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36491</guid><dc:creator>savita</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36491.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36491</wfw:commentRss><description>&lt;p&gt;Hi, I think I have searched this forum for days to get an answer to my problem. I went&amp;nbsp;through most of the posts in which looping through a repeating table&amp;nbsp;was discussed, checked position() function.&amp;nbsp;I have checked the link &lt;a href="http://www.infopathdev.com/forums/p/5091/19631.aspx#19631"&gt;http://www.infopathdev.com/forums/p/5091/19631.aspx#19631&lt;/a&gt;&amp;nbsp;and tried to use node.selectSingleNode in VBScript but it doesn&amp;#39;t work. I am sure it must be very simple and I am missing out on something.&amp;nbsp;I am&amp;nbsp;going nuts trying&amp;nbsp;to find a way out.&amp;nbsp;Someone please help. Many thanks &amp;amp; regards.&lt;/p&gt;</description></item><item><title>Re: Traversing through rows in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/36488.aspx</link><pubDate>Thu, 01 Jan 2009 10:43:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36488</guid><dc:creator>savita</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36488.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36488</wfw:commentRss><description>&lt;p&gt;Hi Shiva. Thanks for your help and sorry I was so late to reply on this one. I went through the links you specified and some other links. I am using VBScript.&lt;/p&gt;
&lt;p&gt;My code looks like:&lt;/p&gt;
&lt;p&gt;Sub msoxd__q_inflow_entry_inflow_assigned_to_attr_OnAfterChange(eventObj)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;if (eventObj.OldValue &amp;lt;&amp;gt; &amp;quot;&amp;quot;) then&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dim userRowNode&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; userRowNode = XDocument.DOM.selectSingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/d:q_inflow_entry&amp;quot;)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; userRowNode.selectSingleNode(&amp;quot;reassigned&amp;quot;).text() = &amp;quot;Y&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; end if&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;p&gt;But I get a runtime &amp;nbsp;error&amp;nbsp;&amp;#39;Object doesn&amp;#39;t support this property or method&amp;#39;. &amp;nbsp;I tried &lt;/p&gt;
&lt;p&gt;dim userRowNode as XMLDOMNode&lt;/p&gt;
&lt;p&gt;This is also not supported. Can you help? Most of the code on this site that I would like to use is in Jscript. Did not see as many examples in VBScript.&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;have tried to use XDocument.DOM.selectSingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/d:q_inflow_entry[position() = 15]/@reassigned&amp;quot;).text() = &amp;quot;Y&amp;quot;&lt;/p&gt;
&lt;p&gt;But&amp;nbsp;I need to&amp;nbsp;know the position of the current&amp;nbsp;row. I cannot hard code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Traversing through rows in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/36300.aspx</link><pubDate>Mon, 29 Dec 2008 06:17:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36300</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36300.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36300</wfw:commentRss><description>&lt;p&gt;Hello Welcome to the Forums,&lt;/p&gt;
&lt;p&gt;Check out this links,&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/forums/p/10103/35833.aspx#35833"&gt;http://www.infopathdev.com/forums/p/10103/35833.aspx#35833&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/forums/p/8776/31670.aspx#31670"&gt;http://www.infopathdev.com/forums/p/8776/31670.aspx#31670&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Traversing through rows in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/36295.aspx</link><pubDate>Sun, 28 Dec 2008 11:56:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36295</guid><dc:creator>savita</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36295.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36295</wfw:commentRss><description>&lt;p&gt;Hi,&lt;br /&gt;I am using Infopath 2003 SP2 and prg language is VBScript.&lt;br /&gt;I have an access table q_inflow_entry and the data source looks like this: /dfs:myFields/dfs:dataFields/d:q_inflow_entry/&lt;br /&gt;My repeating table control retrieves list of records which have been assigned to a user but not yet processed. I need to let the user add records to the same control.&lt;br /&gt;I am using XDocument.View.ExecuteAction &amp;quot;xCollection::insert&amp;quot;, &amp;quot;q_inflow_entry_1&amp;quot; to add a new row to a repeating table. How can I set values of fields like inflow_entered_by, inflow_entered_date programmatically as soon as the user inserts a new row? I tried using the following: &lt;/p&gt;
&lt;p&gt;XDocument.DOM.selectSingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/d:q_inflow_entry/@ inflow_entered_by &amp;quot;).text()=&amp;quot;UOM002&amp;quot;&lt;br /&gt;But the above statement updates value of field inflow_entered_by in the first row in the repeating table. Can someone&amp;nbsp;please help? I also need code to let the user delete a row because there are a few checks to be performed before a delete. My main problem is that I am not able to figure out how to find the row in which user is making a change. Need more info on XDocument.&lt;br /&gt;&amp;nbsp;&lt;br /&gt;Thanks a mil in advance!!!&lt;/p&gt;</description></item></channel></rss>