<?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: problem with current() in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/31065.aspx</link><pubDate>Thu, 31 Jul 2008 12:26:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31065</guid><dc:creator>GazM</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31065.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=31065</wfw:commentRss><description>&lt;p&gt;Tom&lt;/p&gt;
&lt;p&gt;If you haven&amp;#39;t already found a solution to this problem, try this one&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/blogs/matt/archive/2006/04/18/Automatically-Populate-Fields-from-a-Drop_2D00_Down-Selection.aspx"&gt;http://www.infopathdev.com/blogs/matt/archive/2006/04/18/Automatically-Populate-Fields-from-a-Drop_2D00_Down-Selection.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It worked for me.&lt;/p&gt;
&lt;p&gt;Gary&lt;/p&gt;</description></item><item><title>Re: problem with current() in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/20643.aspx</link><pubDate>Tue, 12 Jun 2007 16:39:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20643</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20643.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20643</wfw:commentRss><description>&lt;p&gt;Your correct XPath entirely depends upon exactly what &lt;strong&gt;current()&lt;/strong&gt; evaluates to. For example, if &lt;strong&gt;current()&lt;/strong&gt; evaluates to &lt;strong&gt;my:group2&lt;/strong&gt;, then &lt;strong&gt;current()/my:ddlTeamName&lt;/strong&gt; makes sense. However, if &lt;strong&gt;current()&lt;/strong&gt; evaluates to &lt;strong&gt;my:group2/my:SomeOtherField&lt;/strong&gt;, then you would need to use a relative XPath to get back to the one you want, like this: &lt;strong&gt;current()/../my:ddlTeamName&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;You need to know what current() evaluates to in order to use it properly.&lt;/p&gt;</description></item><item><title>problem with current() in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/20596.aspx</link><pubDate>Mon, 11 Jun 2007 17:29:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20596</guid><dc:creator>Tom_Regan</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20596.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20596</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m using InfoPath 2003 SP2.&amp;nbsp;&lt;/p&gt;&lt;p&gt;I have a repeating table in an InfoPath form.&amp;nbsp; When an item is selected in a drop-down (ddlTeamname)&amp;nbsp;I want to automatically populate a textbox.&amp;nbsp; The dropdown is filled by a secondary data source called &amp;quot;Contacts&amp;quot;.&lt;/p&gt;&lt;p&gt;This does not work; it&amp;nbsp;fills the textbox with the first element in the data source, no matter what is selected in ddlTeamname:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;xdXDocument:GetDOM(&amp;quot;Contacts&amp;quot;)/dfs:myFields/dfs:dataFields/dfs:Contacts/@E-mail_Address[../@Full_Name = xdXDocument:get-DOM()/my:myFields/my:group1/my:group2/my:ddlTeamName]&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;From reading several posts on the site, I understand that I need to substitute &amp;quot;current()&amp;quot; for the call to &amp;quot;get-DOM&amp;quot; to get the value selected in the dropdown ddlTeamName.&amp;nbsp; But, when I try using current() (like below) I get nothing in the textbox:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;xdXDocument:GetDOM(&amp;quot;Contacts&amp;quot;)/dfs:myFields/dfs:dataFields/dfs:Contacts/@E-mail_Address[../@Full_Name = current()/my:myFields/my:group1/my:group2/my:ddlTeamName]&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;I&amp;#39;ve tried every possible path after current() (taking away each level one-by-one, until I&amp;#39;m calling &amp;quot;&lt;strong&gt;current()/my:ddlTeamname&lt;/strong&gt;&amp;quot;, but my textbox never fills.&lt;/p&gt;&lt;p&gt;Can anyone tell me what I&amp;#39;m doing wrong?&lt;/p&gt;</description></item></channel></rss>