<?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 Syntax for Secondary Data Source</title><link>https://www.infopathdev.com:443/forums/thread/69107.aspx</link><pubDate>Tue, 09 Aug 2011 13:00:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69107</guid><dc:creator>Erich</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69107.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=69107</wfw:commentRss><description>&lt;p&gt;Yes, what I would like is to store the value of the &amp;#39;Name&amp;#39; attribute from the secondary data source as a global variable. My problem is that it appears script is executed before rules are, so when I try to extract the &amp;#39;Name&amp;#39; attribute from a rule-calculated field, it returns an empty string since the rule has not yet been applied.&lt;/p&gt;
&lt;p&gt;Erich&lt;/p&gt;</description></item><item><title>Re: Xpath Syntax for Secondary Data Source</title><link>https://www.infopathdev.com:443/forums/thread/69101.aspx</link><pubDate>Tue, 09 Aug 2011 07:58:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69101</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69101.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=69101</wfw:commentRss><description>&lt;p&gt;This can be done fairly simply with rules and such, but in code&amp;nbsp;it&amp;#39;s not possible to have a single XPath reference two data sources.&lt;/p&gt;
&lt;p&gt;You could first get the &lt;strong&gt;my:user&lt;/strong&gt; value and concatenate it into another XPath, but the JScript syntax for accessing a 2DS is somewhat involved.&amp;nbsp; Is there some reason you can&amp;#39;t use a rule to show this alert?&lt;/p&gt;</description></item><item><title>Xpath Syntax for Secondary Data Source</title><link>https://www.infopathdev.com:443/forums/thread/69087.aspx</link><pubDate>Mon, 08 Aug 2011 20:36:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69087</guid><dc:creator>Erich</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69087.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=69087</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Here is the selectSingleNode statement producing an error (&amp;quot;Object required&amp;quot;)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;XDocument.UI.Alert(XDocument.DOM.selectSingleNode(&amp;quot;dfs:myFields/dfs:dataFields/d:BC_Verification[@BC_ID = my:myFields/my:user]/@Name&amp;quot;).text);&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Where &amp;#39;dfs&amp;#39; and &amp;#39;d&amp;#39;&amp;nbsp;are the namespaces of the secondary data source, and &amp;#39;my&amp;#39; for the primary source. &lt;/p&gt;
&lt;p&gt;BC_Verification&amp;nbsp;attributes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;BC_ID&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Name&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&amp;#39;user&amp;#39; is a pre-filled field in the form being used to filter a BC_Verification entry where BC_ID = user. Any ideas on what&amp;#39;s giving the error?&lt;/p&gt;
&lt;p&gt;Erich&lt;/p&gt;</description></item></channel></rss>