<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Getting the current row in code</title><link>https://www.infopathdev.com:443/forums/thread/11328.aspx</link><pubDate>Fri, 16 Mar 2007 20:36:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11328</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11328.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11328</wfw:commentRss><description>Actually it kind of is--if you look at the rule dialog box, it says:&lt;br /&gt;&lt;br /&gt;Condition:&lt;br /&gt;None - This rule always applies.&lt;br /&gt;&lt;br /&gt;Now, you might not understand exactly what that means right away--but I'm sure it makes total sense to you know that you've been through this!&lt;br /&gt;&lt;br /&gt;Keep up the good work!</description></item><item><title>Re: Getting the current row in code</title><link>https://www.infopathdev.com:443/forums/thread/11327.aspx</link><pubDate>Fri, 16 Mar 2007 16:44:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11327</guid><dc:creator>MylesRip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11327.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11327</wfw:commentRss><description>YEA!!  That worked!  Thanks for sticking with me on this, Greg.  Thanks for your input as well, Clay.  This should be documented somewhere...&lt;br /&gt;&lt;br /&gt;Myles</description></item><item><title>Re: Getting the current row in code</title><link>https://www.infopathdev.com:443/forums/thread/11326.aspx</link><pubDate>Fri, 16 Mar 2007 16:34:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11326</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11326.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11326</wfw:commentRss><description>That confused me the first time I saw it too. The solution is to NOT use a condition. If there is no condition present on the rule, then it DOES fire each time a value is changed.</description></item><item><title>Re: Getting the current row in code</title><link>https://www.infopathdev.com:443/forums/thread/11325.aspx</link><pubDate>Fri, 16 Mar 2007 13:16:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11325</guid><dc:creator>MylesRip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11325.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11325</wfw:commentRss><description>Thanks for your response.&lt;br /&gt;&lt;br /&gt;I looked at using a rule.  The problem with that approach is that the conditions on when to apply a rule appear to be limited to &amp;lt;some value&amp;gt; "is equal to" or "is not equal to" or "is less than" etc. &amp;lt;some other value&amp;gt;.  I would need the rule to apply whenever the value is *changed*, regardless of how it compares to some other value or whether it matches a specific pattern.  Also, I don't want to execute the rule if the value hasn't changed.  None of the rule options seem to allow for this.  &lt;br /&gt;</description></item><item><title>Re: Getting the current row in code</title><link>https://www.infopathdev.com:443/forums/thread/11324.aspx</link><pubDate>Fri, 16 Mar 2007 05:56:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11324</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11324.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11324</wfw:commentRss><description>Have you tried just using a rule on the field in your form.  When it changes it sets the value of the other form in the row?  This might be a good work around solution until you get your syntax figured out.  Since you are changing a field in the same row you do not have to use the current function.  Typically it is a syntax issue in your xpath statement.&lt;br /&gt;&lt;br /&gt;Good Luck</description></item><item><title>Re: Getting the current row in code</title><link>https://www.infopathdev.com:443/forums/thread/11323.aspx</link><pubDate>Thu, 15 Mar 2007 21:48:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11323</guid><dc:creator>MylesRip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11323.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11323</wfw:commentRss><description>Both "./" and "../" returned null references.  Current() doesn't appear to be allowed in XPath expressions.  It says it's an undefined function and asks for an XsltContext to provide a definition.  I had hoped to be able to use current() in the context of an absolute XPath.  Something along the lines of &lt;br /&gt;"/dfs:myFields/dfs:dataFields/...record[current()]/@otherattribute"&lt;br /&gt;I know there is a current() function in InfoPath, but I don't know how to get it to work in the code of an event handler.&lt;br /&gt;&lt;br /&gt;This is getting pretty frustrating - it should be simple.  This is a project with high visibility in the company and I'm at a complete standstill.  Argh!&lt;br /&gt;</description></item><item><title>Re: Getting the current row in code</title><link>https://www.infopathdev.com:443/forums/thread/11322.aspx</link><pubDate>Thu, 15 Mar 2007 21:06:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11322</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11322.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11322</wfw:commentRss><description>If your particular scenario current() is the same as ., so there's no advantage.&lt;br /&gt;&lt;br /&gt;Did your XPath use "./" or "../"? Because that makes a difference. As stated above "." is the current node whereas ".." is the parent node (even for attributes).</description></item><item><title>Re: Getting the current row in code</title><link>https://www.infopathdev.com:443/forums/thread/11321.aspx</link><pubDate>Thu, 15 Mar 2007 17:26:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11321</guid><dc:creator>MylesRip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11321.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11321</wfw:commentRss><description>The "field" that changes is actually an attribute within a node of an XmlDocument which is the datasource passed back from a web service.  This attribute is the "sender" object when the "on changed" event fires.  The other "field" that I need to update within the event handler is a different attribute of the same Xml element.  &lt;br /&gt;&lt;br /&gt;I tried "./@otherattribute" as the path for a SelectSingleNode on the datasource, but it complains of a null reference exception.  &lt;br /&gt;&lt;br /&gt;I think I'm having problems because the sender is just an attribute instead of a node.  When I examine the XmlEventArgs it says that the OldParent is null.  &lt;br /&gt;&lt;br /&gt;I wonder if using the current() function my path might work better?  I tried something like that, but it complained that it needs an XSLT context.  &lt;br /&gt;</description></item><item><title>Re: Getting the current row in code</title><link>https://www.infopathdev.com:443/forums/thread/11320.aspx</link><pubDate>Thu, 15 Mar 2007 16:54:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11320</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11320.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11320</wfw:commentRss><description>Use a relative XPath... you should already have the object for the current node from the event handler parameters. Then you can use a relative XPath like "../OtherField" to get to the other field. The .. means to go up to the parent node.</description></item><item><title>Getting the current row in code</title><link>https://www.infopathdev.com:443/forums/thread/6129.aspx</link><pubDate>Thu, 15 Mar 2007 14:59:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6129</guid><dc:creator>MylesRip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6129.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6129</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;I have a repeating table with an "on changed" event handler for one of the fields in the table.  Whenever the value changes, I want to modify the value of a different field in the same row.  How can I reference a different field of the current row?  (This needs to work in a browser-enabled form, if that makes any difference.)  Thanks in advance!&lt;br /&gt;</description></item></channel></rss>