<?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: Problems with Repeating Section</title><link>https://www.infopathdev.com:443/forums/thread/2150.aspx</link><pubDate>Fri, 07 Apr 2006 00:05:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2150</guid><dc:creator>trimba</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2150.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2150</wfw:commentRss><description>Ok there is another problem ...&lt;br /&gt;&lt;br /&gt;It works fine until I publish it to sharepoint list. The NullException catch and results message box "ERROR" pop up. So, there must be a problem with the XPath of the field.&lt;br /&gt;&lt;br /&gt;This XPath field is annoying yeah ...&lt;br /&gt;&lt;br /&gt;Anyone has experienced the same problem ?&lt;br /&gt;&lt;br /&gt;Thank you&lt;br /&gt;Regards&lt;br /&gt;Tjen</description></item><item><title>Re: Problems with Repeating Section</title><link>https://www.infopathdev.com:443/forums/thread/2149.aspx</link><pubDate>Thu, 06 Apr 2006 23:42:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2149</guid><dc:creator>trimba</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2149.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2149</wfw:commentRss><description>Thanks guys ... At Last I did it... &lt;br /&gt;The NullException is because the Field XPath Reference is not correct. And the other thing you need to catch Insert Repeating Section Operation as well. Otherwise, the event function will run twice.&lt;br /&gt;&lt;br /&gt;Anw I'm still wondering what's the difference between Site and Source ?&lt;br /&gt;&lt;br /&gt;Here is my code in case anyone need it&lt;br /&gt;        &lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;InfoPathEventHandler(MatchPath:="/my:myFields/my:grpPointsToNote/my:rtxtPointsToNote/@my:blCompleted", EventType:=InfoPathEventType.OnAfterChange)&amp;gt; _&lt;br /&gt;Public Sub blCompleted_attr_OnAfterChange(ByVal e As DataDOMEvent)&lt;br /&gt;   ' Write code here to restore the global state.&lt;br /&gt;&lt;br /&gt;   If (e.IsUndoRedo) Then&lt;br /&gt;      Return&lt;br /&gt;   End If&lt;br /&gt;&lt;br /&gt;   Dim node As IXMLDOMNode&lt;br /&gt;   Try&lt;br /&gt;      If (e.Operation = "Insert") Then&lt;br /&gt;      Else&lt;br /&gt;         node= e.Site.selectSingleNode("../@my:tbAssignTo")&lt;br /&gt;         node.text = System.Environment.UserName&lt;br /&gt;      End If&lt;br /&gt;   Catch ex As Exception&lt;br /&gt;      thisXDocument.UI.Alert("ERROR")&lt;br /&gt;   End Try&lt;br /&gt;End Sub&lt;br /&gt;&lt;/pre&gt;</description></item><item><title>Re: Problems with Repeating Section</title><link>https://www.infopathdev.com:443/forums/thread/2148.aspx</link><pubDate>Thu, 06 Apr 2006 22:45:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2148</guid><dc:creator>trimba</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2148.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2148</wfw:commentRss><description>Hi guys,&lt;br /&gt;&lt;br /&gt;Thank you for your fast reply ... My first question will be What's the different between Site and Source ?&lt;br /&gt;&lt;br /&gt;Sorry not to mention it, I create the event using VS2005. So which one will be suitable for me ?&lt;br /&gt;&lt;br /&gt;The other thing, when I try the code. I've got NullReferenceException in&lt;br /&gt;&lt;br /&gt;xmlNode.text = System.Environment.username&lt;br /&gt;&lt;br /&gt;Thank you ...&lt;br /&gt;Regards&lt;br /&gt;Tjen</description></item><item><title>Re: Problems with Repeating Section</title><link>https://www.infopathdev.com:443/forums/thread/2147.aspx</link><pubDate>Thu, 06 Apr 2006 13:52:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2147</guid><dc:creator>Abhishek</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2147.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2147</wfw:commentRss><description>Hi Trimba,&lt;br /&gt;So u want to update Attribute1 when u check Attribute2(checkbox) in the same row.&lt;br /&gt;&lt;br /&gt;Use eventObj.Source.selectSingleNode("attributename")instead of &lt;br /&gt;thisXDocument.DOM.selectSingleNode("/my:myFields/my:grpPointsToNote/my:rtxtPointsToNote/@my:tbAssignTo")&lt;br /&gt;&lt;br /&gt;Using eventObj.Source lets u access the fields in the current row where the event has occured.&lt;br /&gt;&lt;br /&gt;One important point to note is that when u use eventObj.Source, u have to specify only the field name and not the full XPath of the field.&lt;br /&gt;What Maslov has said above is for C#.What u have to use is eventObj.Source&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Abhishek&lt;br /&gt;</description></item><item><title>Re: Problems with Repeating Section</title><link>https://www.infopathdev.com:443/forums/thread/2146.aspx</link><pubDate>Thu, 06 Apr 2006 13:41:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2146</guid><dc:creator>maslov</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2146.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2146</wfw:commentRss><description>Hello Tjen;&lt;br /&gt;&lt;br /&gt;XPath expression you use always selects the first record in the XML-tree.&lt;br /&gt;&lt;br /&gt;To select the current record, your should use something like this:&lt;br /&gt;&lt;br /&gt;xmlNode = e.Site.selectSingleNode("../@my:tbAssignTo")&lt;br /&gt;xmlNode.text = System.Environment.UserName&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Maxim</description></item><item><title>Re: Problems with Repeating Section</title><link>https://www.infopathdev.com:443/forums/thread/2145.aspx</link><pubDate>Thu, 06 Apr 2006 08:59:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2145</guid><dc:creator>trimba</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2145.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2145</wfw:commentRss><description>Oh stupid me ... Where is the question ? :P&lt;br /&gt;&lt;br /&gt;Ok the problem is the event function that I've created above only works for first record on repeating section only. If I insert new item, then I check attributeTwo ... the attributeOne for second,third,... record does not get updated.&lt;br /&gt;&lt;br /&gt;Anyone have any idea how to solve it ? &lt;br /&gt;&lt;br /&gt;Thank you very much ...&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Tjen</description></item><item><title>Problems with Repeating Section</title><link>https://www.infopathdev.com:443/forums/thread/1236.aspx</link><pubDate>Thu, 06 Apr 2006 07:46:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:1236</guid><dc:creator>trimba</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/1236.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=1236</wfw:commentRss><description>Hi guys,&lt;br /&gt;&lt;br /&gt;Ok, I'm very new with InfoPath and this problem really makes me frustrating already. At this moment on my Main data source, it looks like:&lt;br /&gt;&lt;br /&gt;myFields&lt;br /&gt;+grpOne&lt;br /&gt;++elementOne(rich text)&lt;br /&gt;+++attributeOne(text)&lt;br /&gt;+++attributeTwo(boolean)&lt;br /&gt;&lt;br /&gt;I drag grpOne as my Repeating Section, and my objective is when I check attributeTwo, the attributeOne will display username.&lt;br /&gt;&lt;br /&gt;I create OnAfterChange event for attribute two and it looks something like this:&lt;br /&gt;        &amp;lt;InfoPathEventHandler(MatchPath:="/my:myFields/my:grpPointsToNote/my:rtxtPointsToNote/@my:blCompleted", EventType:=InfoPathEventType.OnAfterChange)&amp;gt; _&lt;br /&gt;Public Sub blCompleted_attr_OnAfterChange(ByVal e As DataDOMEvent)&lt;br /&gt;   &lt;br /&gt;   ' Write code here to restore the global state.&lt;br /&gt;   If (e.IsUndoRedo) Then&lt;br /&gt;   ' An undo or redo operation has occurred and the DOM is read-only.&lt;br /&gt;      Return&lt;br /&gt;   End If&lt;br /&gt;&lt;br /&gt;   ' A field change has occurred and the DOM is writable. Write code here to respond to the changes.&lt;br /&gt;   Dim xmlNode As IXMLDOMNode&lt;br /&gt;   xmlNode = thisXDocument.DOM.selectSingleNode("/my:myFields/my:grpPointsToNote/my:rtxtPointsToNote/@my:tbAssignTo")&lt;br /&gt;            xmlNode.text = System.Environment.UserName&lt;br /&gt;End Sub</description></item></channel></rss>