<?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: current() confusion</title><link>https://www.infopathdev.com:443/forums/thread/26292.aspx</link><pubDate>Fri, 08 Feb 2008 00:51:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26292</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26292.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=26292</wfw:commentRss><description>&lt;p&gt;Are you using rules? In a repeating table, current() will either be pointing to your row or to the field, depending on how you have things set up.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure whether &lt;u&gt;my:Repeating&lt;/u&gt; is the actual repeating row or the container and &lt;u&gt;my:ITR &lt;/u&gt;is the repeating row.&lt;/p&gt;
&lt;p&gt;You can try one of the following (assumes current() = the row):&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;xdXDocument:GetDOM(&amp;quot;Income&amp;quot;)/dfs:myFields/dfs:dataFields/d:Income/@BAS_Related[../@Income_Item = current()/my:ITR/my:Label]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;xdXDocument:GetDOM(&amp;quot;Income&amp;quot;)/dfs:myFields/dfs:dataFields/d:Income/@BAS_Related[../@Income_Item = current()/my:Label]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If those don&amp;#39;t work, try one of these (assumes current() = the field):&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;xdXDocument:GetDOM(&amp;quot;Income&amp;quot;)/dfs:myFields/dfs:dataFields/d:Income/@BAS_Related[../@Income_Item = current()/../my:ITR/my:Label]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;xdXDocument:GetDOM(&amp;quot;Income&amp;quot;)/dfs:myFields/dfs:dataFields/d:Income/@BAS_Related[../@Income_Item = current()/../my:Label]&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>current() confusion</title><link>https://www.infopathdev.com:443/forums/thread/26206.aspx</link><pubDate>Tue, 05 Feb 2008 05:23:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26206</guid><dc:creator>ijd10365</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26206.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=26206</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I have a repeating table where I&amp;nbsp;want to populate a field via a secondary data source based on a selection in a drop down list.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;The code below works but comes with the problem that subsequant rows are connnected to the first rows data. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;xdXDocument:GetDOM(&amp;quot;Income&amp;quot;)/dfs:myFields/dfs:dataFields/d:Income/@BAS_Related[../@Income_Item = xdXDocument:get-DOM()/my:myFields/my:Repeating/my:ITR/my:Label]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I understand that I have to use the current() function but I can&amp;#39;t seem to get the syntax right. I have tried all variations of where to put current() into the path without luck. I have also tried including&amp;nbsp; /../ into the path as well with the same result.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Any suggestions greatly appreciated.&lt;/p&gt;
&lt;p&gt;Iain&lt;/p&gt;</description></item></channel></rss>