<?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: XPath query with parameter</title><link>https://www.infopathdev.com:443/forums/thread/54950.aspx</link><pubDate>Mon, 17 May 2010 16:30:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54950</guid><dc:creator>bryanstrader</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54950.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=54950</wfw:commentRss><description>&lt;p&gt;That is exactly what I was looking for. Thanks Jimmy. I didn&amp;#39;t know &lt;strong&gt;xdXDocument:get-DOM() &lt;/strong&gt;was something that was available to me in the expression boxes.&lt;/p&gt;</description></item><item><title>Re: XPath query with parameter</title><link>https://www.infopathdev.com:443/forums/thread/54917.aspx</link><pubDate>Sat, 15 May 2010 02:40:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54917</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54917.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=54917</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;To have XPath reference the main data source when it is already in the context of another, you can use xdXDocument:get-DOM():&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&amp;nbsp; xdXDocument:GetDOM(&amp;quot;ClientInformationDC&amp;quot;)/dfs:myFields/dfs:dataFields/d:Companies[@ID
 = xdXDocument:get-DOM()/my:myFields/my:ClientInformation/my:CompanyID]/@Name&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;InfoPath will usually do this for you if you use the &lt;b&gt;Select Field... &lt;/b&gt;button, though I think sometimes it won&amp;#39;t be smart enough to figure out you&amp;#39;re going back and forth between data sources.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>XPath query with parameter</title><link>https://www.infopathdev.com:443/forums/thread/54907.aspx</link><pubDate>Fri, 14 May 2010 18:30:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54907</guid><dc:creator>bryanstrader</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54907.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=54907</wfw:commentRss><description>Here is what I am trying to do in my expression box:

Companies[@ID = 6]/@Name

However, instead of using the number 6 as my parameter for the ID, i would like to query from the main data source.



So I think it should be something like this:

xdXDocument:GetDOM(&amp;quot;ClientInformationDC&amp;quot;)/dfs:myFields/dfs:dataFields/d:Companies[@ID = my:myFields/my:ClientInformation/my:CompanyID]/@Name



Basically I have the id stored in my main data source, and need to use it to get the company name from my secondary data source. It doesn&amp;#39;t appear to like the fact that I am in a sense &amp;quot;joining&amp;quot; data sources.

It doesn&amp;#39;t seem to like the &amp;quot;my:myFields/my:ClientInformation/my:CompanyID&amp;quot; expression because I am already looking at another data source.</description></item></channel></rss>