<?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: Trying to filter with XPath</title><link>https://www.infopathdev.com:443/forums/thread/57811.aspx</link><pubDate>Mon, 09 Aug 2010 19:11:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57811</guid><dc:creator>Potemkine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57811.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=57811</wfw:commentRss><description>&lt;p&gt;You&amp;#39;re Welcome Pinback :)&lt;/p&gt;</description></item><item><title>Re: Trying to filter with XPath</title><link>https://www.infopathdev.com:443/forums/thread/57810.aspx</link><pubDate>Mon, 09 Aug 2010 19:07:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57810</guid><dc:creator>Pinback</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57810.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=57810</wfw:commentRss><description>&lt;p&gt;BINGO! :)&lt;/p&gt;
&lt;p&gt;You did it, Potemkine! Thanks so much! :) :)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Pinback&lt;/p&gt;</description></item><item><title>Re: Trying to filter with XPath</title><link>https://www.infopathdev.com:443/forums/thread/57809.aspx</link><pubDate>Mon, 09 Aug 2010 19:02:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57809</guid><dc:creator>Potemkine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57809.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=57809</wfw:commentRss><description>&lt;p&gt;Hi, if &amp;nbsp;Facility is an attribute try this :&lt;/p&gt;
&lt;p&gt;NI = DOM.Select(&amp;quot;/dfs:myFields/dfs:dataFields/dfs:&amp;quot;My_Secondary_DataSource&amp;quot;[&lt;strong&gt;@&lt;/strong&gt;Facility=&amp;#39;Mary&amp;#39;]&amp;quot;, Me.NamespaceManager)&lt;/p&gt;</description></item><item><title>Re: Trying to filter with XPath</title><link>https://www.infopathdev.com:443/forums/thread/57808.aspx</link><pubDate>Mon, 09 Aug 2010 18:51:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57808</guid><dc:creator>Pinback</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57808.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=57808</wfw:commentRss><description>&lt;p&gt;Hello Potemkine :)&lt;/p&gt;
&lt;p&gt;When I try:&lt;/p&gt;
&lt;p&gt;NI = DOM.Select(&amp;quot;/dfs:myFields/dfs:dataFields/dfs:&amp;quot;My_Secondary_DataSource&amp;quot;[Facility=&amp;#39;Mary&amp;#39;]&amp;quot;, Me.NamespaceManager)&lt;/p&gt;
&lt;p&gt;it reads the code, but the following line:&lt;/p&gt;
&lt;p&gt;MsgBox(NI.Count)&lt;/p&gt;
&lt;p&gt;returns a value of 0 despite the fact there are 4 instance of Mary in &amp;quot;My_Secondary_DataSource&amp;quot;.&lt;/p&gt;</description></item><item><title>Re: Trying to filter with XPath</title><link>https://www.infopathdev.com:443/forums/thread/57807.aspx</link><pubDate>Mon, 09 Aug 2010 18:43:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57807</guid><dc:creator>Potemkine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57807.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=57807</wfw:commentRss><description>&lt;p&gt;Hi, Pinback and if you try:&lt;/p&gt;
&lt;p&gt;NI = DOM.Select(&amp;quot;/dfs:myFields/dfs:dataFields/dfs:My_Secondary_DataSource&amp;quot;, me.NameSpaceManager)&lt;/p&gt;</description></item><item><title>Trying to filter with XPath</title><link>https://www.infopathdev.com:443/forums/thread/57806.aspx</link><pubDate>Mon, 09 Aug 2010 18:24:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57806</guid><dc:creator>Pinback</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57806.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=57806</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am attempting to set up a filter using xPath and a Secondary DataSource (no filter applied as of yet). &lt;/p&gt;
&lt;p&gt;Dim DOM As Xml.XPath.XPathNavigator&lt;br /&gt;Dim NI As System.Xml.XPath.XPathNodeIterator&lt;br /&gt;Dim expr As XPathExpression&lt;/p&gt;
&lt;p&gt;DOM = Me.DataSources(&amp;quot;My_Secondary_DataSource&amp;quot;).CreateNavigator&lt;br /&gt;expr = DOM.Compile(&amp;quot;/dfs:myFields/dfs:dataFields/dfs:My_Secondary_DataSource&amp;quot;)&lt;br /&gt;NI = DOM.Select(expr)&lt;/p&gt;
&lt;p&gt;On the last line of code, I receive the error &amp;quot;Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.&amp;quot;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;If I change the last line of code to &amp;quot;NI = DOM.Select(expr, me.NameSpaceManager)&amp;quot;, I get an error stating &amp;quot;Error&amp;nbsp;8&amp;nbsp;Value of type &amp;#39;System.Xml.XPath.XPathExpression&amp;#39; cannot be converted to &amp;#39;String&amp;#39;&amp;quot;.&lt;/p&gt;
&lt;p&gt;Any thoughts on how to fix this error?&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;Pinback&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>