<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Filtering and retrieving sharepoint list data</title><link>https://www.infopathdev.com:443/forums/thread/55462.aspx</link><pubDate>Mon, 31 May 2010 13:55:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55462</guid><dc:creator>arcad</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55462.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55462</wfw:commentRss><description>&lt;p&gt;I am trying to set conditions when filtering. I am using the string-length function to determine if strings exist or not (FilterModel and FilterManufacturer are 2 drop downs). However, i am getting an &amp;quot;expression must evaluate to a node-set&amp;quot; error. Is there another way to&amp;nbsp;determine the existence of a string&amp;nbsp;when filtering? Thanks in advance!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; secDSNav = DataSources[&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;SP_Data&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;].CreateNavigator();&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; FilterModel = MainDataSource.CreateNavigator().SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/my:myFields/my:Car/my:Car_Model&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).Value;&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; FilterManufacturer = MainDataSource.CreateNavigator().SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/my:myFields/my:Car/my:Car_Manufacturer&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).Value;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XPathNodeIterator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; rows = secDSNav.Select(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/dfs:myFields/dfs:dataFields/dfs:group[(@Cat = &amp;#39;Car&amp;#39; and @Car_Model = &amp;#39;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; + FilterModel + &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&amp;#39; and @Car_Manufacturer = &amp;#39;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; + FilterManufacturer + &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&amp;#39;) or (@Cat = &amp;#39;Car&amp;#39; and @Car_Manufacturer = &amp;#39;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; + FilterManufacturer + &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&amp;#39; and string-length(&amp;#39;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; + FilterModel + &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&amp;#39;) = 0) or (@Cat = &amp;#39;Car&amp;#39; and string-length(&amp;#39;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; + FilterManufacturer + &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&amp;#39;) = 0 and string-length(&amp;#39;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; + FilterModel + &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&amp;#39;) = 0 )]&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager);&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Filtering and retrieving sharepoint list data</title><link>https://www.infopathdev.com:443/forums/thread/55384.aspx</link><pubDate>Thu, 27 May 2010 17:23:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55384</guid><dc:creator>arcad</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55384.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55384</wfw:commentRss><description>&lt;p&gt;Thanks a lot! My syntax was wrong.&lt;/p&gt;</description></item><item><title>Re: Filtering and retrieving sharepoint list data</title><link>https://www.infopathdev.com:443/forums/thread/55381.aspx</link><pubDate>Thu, 27 May 2010 16:39:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55381</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55381.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55381</wfw:commentRss><description>&lt;p&gt;When you use the variable test, your XPath looks like this, right?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/dfs:myFields/dfs:dataFields/dfs:SPData[@Car_Model_SP = &amp;#39;&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; + test +&lt;/font&gt; &lt;font color="#a31515" size="2"&gt;&amp;quot;&amp;#39;]&amp;quot;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Filtering and retrieving sharepoint list data</title><link>https://www.infopathdev.com:443/forums/thread/55372.aspx</link><pubDate>Thu, 27 May 2010 15:32:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55372</guid><dc:creator>arcad</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55372.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55372</wfw:commentRss><description>&lt;font size="2"&gt;
&lt;p&gt;Hello all,&lt;/p&gt;
&lt;p&gt;I am trying to retrieve specific rows from sharepoint only&amp;nbsp;when a specific value in infopath equals a specific value in SharePoint. &lt;/p&gt;
&lt;p&gt;Here is a piece of code&lt;/font&gt;&lt;/p&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; secDSNav = DataSources[&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;SharePoint Data&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;].CreateNavigator();&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; test = MainDataSource.CreateNavigator().SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/my:myFields/my:Car/my:Car_Model&amp;quot;_IP&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).Value;&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// Retrieve the rows of the secondary data source&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XPathNodeIterator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; rows = secDSNav.Select(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/dfs:myFields/dfs:dataFields/dfs:SPData[@Car_Model_SP = &amp;#39;test&amp;#39;]&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager);&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;It works fine if i change the&lt;font color="#a31515"&gt;[@Car_Model = &amp;#39;test&amp;#39;]&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;,&amp;nbsp; by a real value that exists in the list, e.g &lt;font color="#a31515"&gt;[@Car_Model = &amp;#39;bmw&amp;#39;]&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;,&amp;nbsp;&amp;nbsp;&lt;/font&gt; but I cant filter using the variable test.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Do you have any ideas?&lt;/p&gt;
&lt;p&gt;Thanks&lt;font size="2"&gt;&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>