Hot answers tagged

45 votes
Accepted

REST API OData Filter on Boolean not Working

Try using 1 for true, 0 for false. I was able to replicate your problem in SPO, but using 1/0 worked fine: /_api/web/lists/getbytitle('BtProjects')/items?$filter=Active eq 1
user avatar
  • 5,690
34 votes
Accepted

Rest API - $filter multiple values

As far as I know, you can not use &. You have to use and or or inside the filter. So try using something like that: /_api/web/lists/getbytitle('Students')/items?$select=Title,ZIP&$filter=((...
user avatar
  • 3,167
29 votes
Accepted

Getting document name using REST (not title) while filtering document library

How to retrieve document name using SharePoint REST Since FileRef contains file name, you could utilize the following query to return document names: Endpoint: /_api/web/lists/getByTitle('<list ...
user avatar
26 votes
Accepted

REST with $filter for List Items in Sharepoint 2013

It does not seem possible to filter list items using FileSystemObjectType property in SharePoint 2013 REST. Option 1 But you could utilize the following REST query to return folders and associated ...
user avatar
17 votes

Sharepoint Designer 2013, XSLT List View Options ribbon option is not showing

I can't really provide a sensible answer to why this is happening (I can confirm I'm experiencing the same weird behavior. I'm sure this is related to the fact that they cut out the designer part ...
user avatar
  • 4,787
13 votes
Accepted

View filter settings: how to implement [TODAY] - 6 months

Have you tried using [today]-180?
user avatar
  • 1,305
13 votes

Getting document name using REST (not title) while filtering document library

FileLeafRef: /_api/web/lists/getByTitle('list')/items?$select=FileLeafRef File Name: /_api/web/lists/getByTitle('<list title>')/items?$select=File/Name&$expand=File Also, for querying a ...
user avatar
9 votes
Accepted

Filter view by current year

In the Filter settings of a View you can only use [Today] as is, you can do simple +- calculations but you can not use Functions. Remember: Do not add spaces in your View Filter calculations: [Today]-...
user avatar
8 votes
Accepted

SharePoint Online - Filter Category missing when adding web parts

You need to activate SharePoint Server Enterprise Site collection features(the one at Site collection level). Go to site settings > Site collection features and activate it.
user avatar
  • 30.2k
8 votes
Accepted

Filter Created in SP REST API

SharePoint REST API endpoints take ISO formatted date string for filtering. Try using below query for filtering on Date Field: To check greater than 2018/10/05: https://[tentat]/sites/[site]/...
user avatar
  • 27.7k
7 votes

REST with $filter for List Items in Sharepoint 2013

To return files use: _api/web/lists/getbytitle('Documents')/items?$filter=startswith(ContentTypeId, '0x0101') To return folders use: _api/web/lists/getbytitle('Documents')/items?$filter=startswith(...
user avatar
7 votes

How does SharePoint handle AND / OR view filtering?

Actually, at least on SharePoint 2007, when you're using the GUI, your filters are going to be applied and grouped in the order they were entered, ignoring the "AND before OR" rule. So, in your case: ...
user avatar
7 votes
Accepted

Workflow Task List - View Filtered By Assigned To = [Me] not working for SPGroups

If you have a SharePoint task list where the task is assigned to a SharePoint group, you may notice that the My Task list does not show tasks even if you are a member of the group of which the task is ...
user avatar
  • 56.7k
6 votes

The field 'Author' of type 'User' cannot be used in the query filter expression

You are missing ID in expand. The query should look like: _api/Web/Lists(guid'id')/items?$select=Id,Author/ID&$expand=Author/ID&$filter=(Author/ID eq 21)
user avatar
6 votes

How to make a filtered lookup field

Re the problem raised by lwbecker2, so long as you have an additional lookup column that is based on the full lookup list (ie not the 'filtered' column) then you will be able to still see the original ...
user avatar
  • 346
6 votes

Checked null with dateTime in REST API SharePoint

You can filter out list items with null columns in SharePoint 2016 (definitely after feature pack 1) using REST. This filter syntax works: $filter=DateField eq null
user avatar
6 votes

Filter current month in list

You need to add two calculated columns that will work out the start and the end of the month. (This example uses [Due Date] but you can use any date/time column) "Start of Month" =DATE(YEAR([Due ...
user avatar
  • 1,030
6 votes

How do I use REST $filter with a "Hyperlink or Picture" type column?

It is a limitation in SharePoint 2013 REST filter. You need to use CAML query along with REST. url: "/_api/web/lists/getbytitle('Sponsors')/getitems" method: "POST", body: "{ 'query' : {'__metadata':...
user avatar
  • 28.2k
6 votes

SharePoint REST filter items with multiselect field as null

I guess the REST filter does not support Null filtering. The current implementation of REST does not support null values for filtering on list item queries. But as this is a desirable feature, ...
user avatar
5 votes
Accepted

Filtering List using CAML query and Binding it to dropdown in C#

To query any person or group field against logged in user you can use **<UserID/>** tag in Value. if (!Page.IsPostBack) { using (SPSite mySite = new ...
user avatar
  • 8,769
5 votes

REST API OData Filter on Boolean not Working

I thought I had already tried Active ne false but I guess I had not. That seems to work. It looks like the eq filter is broken for booleans, though.
user avatar
5 votes
Accepted

What are All Possible Variables for a List View Filter?

There are no other options as such. but you can use calculated columns as an alternate solution which will have most of the excel based features.
user avatar
  • 2,176
5 votes
Accepted

SharePoint List View Filter display 1 week

You should modify your filter to be [Today]-7 , see the details below: This should work for you.
user avatar
5 votes
Accepted

How to create a view thats filter a group or person type field

You have to use person/group field is equal to [Me], not contains. Even if the person/group field contains multiple users, it will still filter correctly when using is equal to [Me].
user avatar
5 votes
Accepted

SharePoint Rest API URL to filter records from list

Something along the lines of this: /_api/Web/Lists/getbytitle('Users')/items?$filter=Age ge 50 and Age le 100
user avatar
5 votes

SharePoint 2013 REST API - Is it possible to filter list by rich text column?

Apologies for previously erroneous and misleading answer This is known issue. You cant filter data on rich text fields using $filter. It is present on 2013 On Premise and SharePoint online as well. ...
user avatar
  • 30.2k
5 votes

Filter Hyperlink field url using SharePoint REST API

This is the limitation of REST API Filter that it cannot filter the Hyperlink fields. So whats the workaround? You can use CAML with REST to achieve what you want. The CAML query will be like: <...
user avatar
4 votes

Filter list view with url parameter. Strange behavior in Internet Explorer (SharePoint 2013)

The new page added in layouts folder "inplview.aspx". When paging, sorting or filtering happens there is an AJAX call to the inplview.aspx and it returns a JSON based result set. That is the rows of ...
user avatar
4 votes
Accepted

"Show filter choices" link instead of actual values in a list column filter

As indicated in the comment above, when the list has over 500 items for performance reasons some fields will not display the available values and display "Show Filter Choices" instead. If you wish ...
user avatar
  • 1,305
4 votes

REST with $filter for List Items in Sharepoint 2013

I'm working with DocSets and they are a "folder" type. I'm using url: webURL + "/_api/web/lists/getbytitle('" + listName + "')/items?$filter=FSObjType eq 1" and that is working just fine for me. ...
user avatar
  • 2,940

Only top scored, non community-wiki answers of a minimum length are eligible