1

When you click on the column header and then you click on "Filter by", a pane opens on the right and there you can select options to filter.

I would like to know where does SharePoint store this information? When you open the page it still retains the information, unless you clear it. Is it in the user's browser or on the server?

How do they do that?

enter image description here

1 Answer 1

0

When you "Apply" the filters from filter pane, it generates new URL by adding filtered field and values.

For example:

https://contoso.sharepoint.com/sites/siteName/lists/listName/allitems.aspx?FilterField1=Month&FilterValue1=11&FilterType1=Choice 

Here "Month" is the column name and 11 after FilterValue1 is the value I selected in filter pane like:

enter image description here

7
  • can I use rest api to store my own filtering? Commented Dec 7, 2022 at 14:46
  • Where you want to use REST API and how you want to store the filtering? If you want to open the filtered list view by using URL, you can build the filtered link/URL in format given in my answer (Note: format may change based on column type & settings like single selection, multiple selection). Commented Dec 7, 2022 at 15:03
  • I am showing the list in an external application and I would like to add filtering to the list. Is it possible to store this filtering in the same way as sharepoint is doing? Save the filtering using rest api and retrieve it the same way as you mentioned above? Commented Dec 7, 2022 at 15:34
  • If you have developed external application where you are fetching data using REST APIs, you can use any public library for showing results in table format and supports filtering / searching. Commented Dec 7, 2022 at 16:49
  • Also, where you want to save the filtering options? You should be able to generate URL in above format on the fly based on user selections in your custom application. If you want to create list views with fix colum and values filtering, consider creating "views" in your list. Commented Dec 7, 2022 at 16:52

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.