<?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: Trouble: Expression Box with current() on a SQL connection</title><link>https://www.infopathdev.com:443/forums/thread/23586.aspx</link><pubDate>Tue, 09 Oct 2007 23:23:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23586</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23586.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=23586</wfw:commentRss><description>&lt;p&gt;Galford, glad you got it working!!&lt;/p&gt;
&lt;p&gt;Adam--thanks so much for interjecting and helping out here! Great job!&lt;/p&gt;</description></item><item><title>Re: Trouble: Expression Box with current() on a SQL connection</title><link>https://www.infopathdev.com:443/forums/thread/23571.aspx</link><pubDate>Tue, 09 Oct 2007 18:58:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23571</guid><dc:creator>adamrharding</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23571.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=23571</wfw:commentRss><description>Good news

Glad to have helped</description></item><item><title>Re: Trouble: Expression Box with current() on a SQL connection</title><link>https://www.infopathdev.com:443/forums/thread/23568.aspx</link><pubDate>Tue, 09 Oct 2007 16:31:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23568</guid><dc:creator>Galford</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23568.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=23568</wfw:commentRss><description>&lt;p&gt;Hi thanks for your comments:&lt;/p&gt;
&lt;p&gt;After some trials with your idea I finally found that I was referencing the PersonalInfo / Department field from the Secondary Source. Now that I tried the Main it worked! &lt;/p&gt;
&lt;p&gt;This is what I have on my Expression Box now:&lt;/p&gt;
&lt;p&gt;xdXDocument:GetDOM(&amp;quot;Departments&amp;quot;)/dfs:myFields/dfs:dataFields/d:Departments/@DepartmentName[../@DepartmentId = xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/d:PersonalInfo/@Department]&lt;/p&gt;
&lt;p&gt;Thanks a lot!&lt;/p&gt;</description></item><item><title>Re: Trouble: Expression Box with current() on a SQL connection</title><link>https://www.infopathdev.com:443/forums/thread/23565.aspx</link><pubDate>Tue, 09 Oct 2007 14:54:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23565</guid><dc:creator>adamrharding</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23565.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=23565</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;This is a subsequent post to the one at the bottom of the form but now I ahve worked it through your statement doesn&amp;#39;t reference the fields on the form in any way which is why it came up blank.&amp;nbsp; See my answer at the bottom of the posts.&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;</description></item><item><title>Re: Trouble: Expression Box with current() on a SQL connection</title><link>https://www.infopathdev.com:443/forums/thread/23564.aspx</link><pubDate>Tue, 09 Oct 2007 14:52:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23564</guid><dc:creator>adamrharding</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23564.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=23564</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I think what you are trying to do is link the Employee ID from PersonalInfo to the Department ID then use the department to link to the DepartmentID to tell the expression box what department the employee is in.&amp;nbsp; If it were me so I could debug accurately I would have field on the form called DEP (in test, hidden in production) that displayed the @Department field on the form from PersonalInfo.&lt;/p&gt;
&lt;p&gt;Then set the default value of the expression box = DepartmentName where DepartmentID (Departments)&amp;nbsp;is equal to DEP (On Form), no need for the current function unless this is all part of a repeating table.&amp;nbsp; I think the issue you were having was where you were trying to do a three step link in only two steps.&lt;/p&gt;
&lt;p&gt;Going from Employee ID to Department to DepartmentID to DepartmentName&lt;/p&gt;
&lt;p&gt;By adding in the extra field you break it down into two two-step processes which InfoPath should have no problem with.&lt;/p&gt;
&lt;p&gt;I hope this helps&lt;/p&gt;</description></item><item><title>Re: Trouble: Expression Box with current() on a SQL connection</title><link>https://www.infopathdev.com:443/forums/thread/23563.aspx</link><pubDate>Tue, 09 Oct 2007 14:34:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23563</guid><dc:creator>Galford</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23563.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=23563</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m trying to compare the DepartmentId (from Departments) with the Department field (from PersonalInfo). That is because I run the query and want to show the department of the employee that resulted from the search.That also why I used the current() function.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Trouble: Expression Box with current() on a SQL connection</title><link>https://www.infopathdev.com:443/forums/thread/23539.aspx</link><pubDate>Mon, 08 Oct 2007 23:32:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23539</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23539.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=23539</wfw:commentRss><description>&lt;p&gt;current() is always so much fun to debug!&lt;/p&gt;
&lt;p&gt;One thing that looks suspicious to me (not knowing your whole set of DOMs, etc):&lt;/p&gt;
&lt;p&gt;[../@DepartmentId = ../d:PersonalInfo/@Department&lt;/p&gt;
&lt;p&gt;You are comparing the @DepartmentId on the same row as d:PersonlInfo&lt;/p&gt;
&lt;p&gt;Not that that&amp;#39;s necessarily wrong.... but it stands out as a possible issue.&lt;/p&gt;</description></item><item><title>Trouble: Expression Box with current() on a SQL connection</title><link>https://www.infopathdev.com:443/forums/thread/23532.aspx</link><pubDate>Mon, 08 Oct 2007 20:57:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23532</guid><dc:creator>Galford</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/23532.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=23532</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m kind of newbie on this InfoPath stuff. I have a secondary data connection (Departments) on a form based on a SQL data source. I have a button that run a query on the database based on the employee_num. I have a table (Personal_Info) with all the employees data on it. The Department field on this table are integers. I have another table (Department) on which the name of the department is related to an integer. &lt;/p&gt;
&lt;p&gt;What I want to do is to run&amp;nbsp;a query based on the employee_num and have an expression box that display the department of that current employee using the relation between the 2 tables Personal_Info and Department. This is the Xpath that I use on the expression box&lt;/p&gt;
&lt;p&gt;&amp;nbsp;xdXDocument:GetDOM(&amp;quot;Departments&amp;quot;)/dfs:myFields/dfs:dataFields/d:Departments/@DepartmentName[../@DepartmentId = ../d:PersonalInfo/@Department[. = current()]]&lt;/p&gt;
&lt;p&gt;The problem is that the expression box came out empty.&lt;/p&gt;
&lt;p&gt;Can someone help me with this? &lt;/p&gt;</description></item></channel></rss>