.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SharePoint List Query Filter

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :Sql Server

I am writting an SSRS report where I am querying a SharePoint list and trying to filter the data through the CAML query.  In BIDS, the query returns data, but the filter where clause doesn't seem to be getting recognized as I get all of the data back.  The where clause does seems to work in the U2U CAML Query Builder tool.

Can anyone please give advice as to why my where clause isn't working?


   <Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems">
         <Parameter Name="listName">
                   <DefaultValue>Subscribe - Sales by Product Group - Wheel</DefaultValue>

View Complete Post

More Related Resource Links

How to join two sharepoint list in c# by CAML query?

Hii All,
   I am using wss 3.0 and i have one site and site has 4 to 5 lists. lists are interconnected with lookup column and same column. I need to display some column fron one list and some from another.. i need to join that lists by where condition like project =project..

So how can i join??

Thank You

Filter items with a date column with parameters start date and end date on a sharepoint list?

If I have alist with a view that has the columns Title, Status and Status Date and the view has some items. How Can I add a filter with two parameters, start date and end date, to only show records with status date equal to or greater than parameter start date and status date is less than or equal to parameter end date? This is a sharepoint online site and I can't create and deploy custom code, can use SPD though. Do I need to use SPD or is this something I can do in the list settings? Thanks in advance.   Edit: I had a look here http://www.endusersharepoint.com/2009/09/29/sharepoint-date-filter-filtering-a-list-by-greater-than-or-equal-to-date/ but I don't have the Date Filter web part.

Cross list query for two sharepoint lists and a join between the fields

Hello All, I have a requirement where i need to query the data from two  sharepoint lists  on a same site by doing a join between those lists and get the result into datatable.I am doing this using sharepoint object model.Is there any possibility to do this. Any pointers in the right direction are greatly appreciated. Thank you Smith   smith

Query Sharepoint list, rich text columns returning HTML tags

Hi! So I have an issue that maybe someone of you have encountered as well. I am querying a Sharepoint list and creating a report from the data collected from this list. This all works fine except that one of the columns in this list is of the type "Multiple lines of text" and also supports "rich text" with different fonts, sizes and so on. This has the effect that the text returned from this column is wrapped in HTML tags that specifies how the text should be formatted. Naturally I do not want this HTML code to appear in my report so for now I have used custom code to do a string.replace and replaced for example <div></div> and <br> with "". However, this column also has url references to documents and these links shows up like this "/servername/site/subsite/Gemensamma%20dokument/Mwh.docx">http://servername/site/subsite/Gemensamma%20dokument/Mwh.docx There is some sort of double reference to the document that I guess like the HTML tags are embedded in the answer from the rich text column and this is not so easy to do a string replace on because the url varies with the different document and document names. My question really is if anyone of you have done a similar report that I am doing, and have encountered this fenomen with this sharepoint column and how you did to solve this? I have tried to creat

How can I filter a Sharepoint 2007 libarry list based on current user login?


Hi all.

I would like to know how I can filter a SharePoint library list based on current user login.

Suppose I have created the followings:

1) A SharePoint form library containing bunch of uploaded InfoPath form data.

2) The InfoPath form template contains a promoted text field called "TargetUser" to store user domain login (ex: DOMAIN\JOE) and every InfoPath form file in the library has a valid domain name stored in the "TargetUser" field.

I have created a custom view for the form library and would like to filter this view so only items whose "TargetUser" field matches current user's login ID are displayed.

I went to Edit View page to customize the view and tried to use the [Me] function but I got a "Filter value is not a valid text string" message instead when clicking OK. Apparently [Me] returns a Person/Group data type and the filter cannot compare its value to that of "TargetUser".

I tried using text functions (ex: TEXT([Me],"") hoping to extract default string value from [Me]. The filter accepts the parameter without any error but the resulting fitlered list does not display any items at all.

I have googled this subject for hours but I have not found any solution.

It would be greatly appreciated if anyone can help me t

How to hide a SharePoint List Filter?



I would like to hide the Sharepoint List Filter. I want my customers to be able to set the filter once and then hide it. Currently they can close it but that removes the filter entirely. 

In the options for the ListFilter there is an "Allows Hide" option, but "Hide" never surfaces in the UI.


SSIS SharePoint List Adapter - how to query Users & Groups?


I am using SSIS SharePoint List Adapter to load data in and out of my SharePoint Lists from within SSIS, and most of it is working fine.  However, I need to perform a lookup against the Users & Groups collection in SharePoint so I can retrieve the UserID and set the value when writing back to SharePoint.  Any help would be tremendously appreciated!


Filter SharePoint list based on ID and scope as Recursive in DataFormWebPart


The following is the code in the DataFormWebPart

<DataSources><SharePoint:SPDataSource runat="server" DataSourceMode="List" UseInternalName="true" UseServerDataFormat="true" selectcommand="&lt;View&gt;&lt;ViewFields&gt;&lt;FieldRef Name=&quot;ContentTypeId&quot;/&gt;&lt;FieldRef Name=&quot;Title&quot;/&gt;&lt;FieldRef Name=&quot;File_x0020_Type&quot;/&gt;&lt;FieldRef Name=&quot;RoutingEnabled&quot;/&gt;&lt;FieldRef Name=&quot;Category&quot;/&gt;&lt;FieldRef Name=&quot;Approach&quot;/&gt;&lt;FieldRef Name=&quot;Channel&quot;/&gt;&lt;FieldRef Name=&quot;Competency_x0020_Pillar&quot;/&gt;&lt;FieldRef Name=&quot;Contact&quot;/&gt;&lt;FieldRef Name=&quot;Cost&quot;/&gt;&lt;FieldRef Name=&quot;Cost_x0020_Description&quot;/&gt;&lt;FieldRef Name=&quot;Country&quot;/&gt;&lt;FieldRef Name=&quot;Editor_x0027_s_x0020_choice&quot;/&gt;&lt;FieldRef Name=&quot;Execution_x0020_Plan&quot;/&gt;&lt;FieldRef Name=&quot;External_x0020_Links&quot;/&gt;&lt;FieldRef Name=&quot;Issue&quot;/&gt;&lt;FieldRef Name=&quot;Lessons&quot;/&gt;&lt;FieldRef N

display sharepoint list Data into content Query Web Part


Hi i have content query web part. now i want to show the sharepoint list data into my content query part

using CQWP setting, i am able to get only one column data but not all.

pls let me know how can i get all list data in different style format 

Unable to Clear Filter on SharePoint List


Hi all,

  How on earth do we clear the radio button filter that appears along side a list webpart thats providing its row via connections to another list.

 Here is my scenario:


 List 1 : Col 1 , Col 2 , Col 3

 List 2:  Col A, Col 1, Col B

 I have Connected 'List 1' to 'List 2' with List 1 providing a row to List 2, and configured to match it by 'Col 1' . In page the filter works fine.

 But once selected the selection remains and there seems to be no way of clearing the selection .....even on refreshing the page or navigating away and returning to the page.....the filter doesnt go... any suggestions ?


 How to get an option like Clear selected Filter, or Show All ...



sharepoint List data not showing in content query web part


hi friends,

i am displaying data from sharepoint list into content query web part.

i have also mentioned column name in commonfield properties after exporting web part and save it.

but it is showing only two column name.

i have also inserted images url in sharepoint list, but i am not able to see images in CQWP.


<xsl:template name="News" match="Row[@Style='News']" mode="itemstyle">
  <xsl:param name="CurPos" />
  <xsl:param name="LastRow" />
  <xsl:variable name="SafeLinkUrl">
    <xsl:call-template name="OuterTemplate.GetSafeLink">
      <xsl:with-param name="images" select="'@images'"/>
  <xsl:variable name="SafeImageUrl">
    <xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
      <xsl:with-param name="images" select="'@images'"/>

Clear Selected Filter on SharePoint List Filter / Choice Filter Webparts


Hi All,

   I am using a 'choice filter web part' and a 'Share Point List Filter web part' on a page to filter other web parts ( Lists / Data view web parts).

   The filters are working fine, but once a filter is selected there doesn't seem to be a way of showing all contents back ( that is clearing the selected filter) . The selected filter remains even if we refresh the page !!!

 Any suggestions as on how we can have the option of 'show all' or 'clear filter' for  Choice Filter web part .


How do I filter a SharePoint list on blanks?

I have a large SharePoint list and want to create a view the shows only rows where a particular column is blank.  I know there are some special values like [Today] and [Me].  Is there one for [Blank] or [Null]?  How can this be done?

how to add report parameters to filter list data in a ssrs report for a SharePoint List



i am using SQl Server 2005 reporting services to generate reports from MOSS 2007 Lists.

I need to define a parameter in the report to filter the data repective to that parameter dynamically.

like: in moss list there are three fileds A, B and C and i want to define field A as the report parameter, whenever i select the value of field A then on "View report" value of field B and C pertaining to field A should be display in report.

I am able to add report parameters but not able to attach to the report so that filtering can work.

Please guide me with solution

SOAP Error 500 when query in Sql Server 2008 using for reporting a Sharepoint list 2007


I'm doing the reporting services for a SharePoint list, the datasource is configured as a connection with http://<Servername>/_vti_bin/lists.asmx and I add the parameters listName , rowLimit and viewName with the

Caml Query to fetch the data from Sharepoint List for a specific date.



I have a sharepoint list with one of hte columns being Created Date of Type DateTime and value allowed is OnlyDate.

The submitted date in my column is 05/18/2011. When I perform a search using the below CAML query, it does not give any results though I have two items with this date.

<Where><Eq><FieldRef Name='Date_x0020_Created' /><Value Type='DateTime'>5/18/2011</Value></Eq></Where>

I dont understand what is wrong with this query. Someone please help

Janaki Thakur

Ready made List Types provided by SharePoint

SharePoint provides some out of the box List Types. Some of the most used ready made list types that SharePoint provides currently are listed below:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend