Learn more about SQL Server tools

mssqltips logo
 

Tutorials          DBA          Dev          BI          Career          Categories          Webcasts          Whitepapers          Today's Tip          Join

Tutorials      DBA      Dev      BI      Categories      Webcasts

DBA    Dev    BI    Categories

FREE Webcast - Delivering Microsoft SQL Server High Availability on AWS
 

How To Effectively Use SharePoint List Views - Part 2 (Filtering and Sorting)


By:   |   Read Comments   |   Related Tips: > Sharepoint

Problem

SharePoint provides "Lists" to store information which is basically used in row/column formats in a tabular structure. SharePoint facilitates this with a feature known as "List Views" which allows you to target, process and display different sets of information without changing the original data stored in the list. Sometimes, you need to process operations like sorting and filtering before displaying the information to the users. For instance, you want to display employee information for a specific department sorted by their ages.

Solution

In order to achieve the above requirement, SharePoint provides features like sorting and filtering in List Views.  In this example, we will first sort the employee information by their ages and then we will filter the information for a specific department.

I have created a sample employee list which contains basic employee information like name, id, address, age and department.

To sort the view, click on the "Modify this View" at the top right near the view name, "EmployeeView" in our case.

Move to the "Sort" area and select the field you want to sort on ... like "Age" in our case. You can even select in which order (ascending/descending) you want to sort the data. For now leave it in ascending order only.

Click on "OK" and now you will be able to see that the data has been sorted in ascending order on the "Age" field in the view.

Now lets filter the data to display only information of employees who belong to the "Research & Development" department. Click on the "Modify this View" at the top right near the view name,  "EmployeeView" in our case. Move to the Filter area and setup these four things:

  • "Show items only when the following is true" should be selected
  • Appropriate metadata columns should be selected. In our case, "Department".
  • An appropriate operation should be selected like "is equal to".
  • An appropriate match value should be inserted like "Research & Development"

Click on "OK" and now you will be able to see the sorted and filtered employee information in the list view.

Next Steps
  • Create List views by implementing several combinations of filtering, sorting and others to display different sets of information.
  • Use other processes like grouping and computing columns in list views to display targeted information.
  • Check out MSSQLTips.com for great information about Microsoft SQL Server.


Last Update:


next webcast button


next tip button



About the author
MSSQLTips author Rahul Mehta Rahul Mehta is a Project Architect/Lead working at Tata Consultancy Services focusing on ECM.

View all my tips





Post a comment or let the author know this tip helped.

All comments are reviewed, so stay on subject or we may delete your comment. Note: your email address is not published. Required fields are marked with an asterisk (*).

*Name    *Email    Email me updates 


Signup for our newsletter
 I agree by submitting my data to receive communications, account updates and/or special offers about SQL Server from MSSQLTips and/or its Sponsors. I have read the privacy statement and understand I may unsubscribe at any time.



    



Learn more about SQL Server tools