SharePoint - Additional List Functionality
SharePoint provides many functionality for lists. It provides storage for list data, the ability to customize the list schema, and the ability to view, add, edit, and delete list items, etc. There are many more features available like creating views on list data, simple validation of both field and list level, approving content, managing item versions, etc.
Let's start working with Views on the list data. Here we are back in the list of authors, and as you can see, we have only added four items. With only four items, it is not difficult to gather the information we need from its data.
As the number of items increasese, say from 4 to 50 to 100, to maybe 500, it becomes more and more difficult to take a look at the list and quickly get the information we need. To solve this problem, SharePoint lets you create multiple views on the lists, so that we can filter out information that we don't need, such as -
- We can sort the values of the field.
- We can consolidate the information.
- We can get totals.
- We may also have different ways of presenting information.
For most lists, when you create them, you get a View by default. It's called Show All Items and this is the view we saw in the example above.
Now let's see how we can create custom views. As for the creation of the list schema, SharePoint offers us severals ways of creating views. One way is to start with an existing view and change the sorting and filtering of different columns. We can get the data as you want it and then save it in a new view.
You will notice that if we go to the other column headers, most of them give us a little drop -down menu which we can access as shown below for the -head Salary / Rate.
Go to other column header - Bio. It doesn 't have a list drop-down because it contains several lines of text. The other columns have this option. This gives us the possibility to sort the information, or to filter it.
Let 's create a filter here that only displays the information. employees.
Once added this filter, note that there is a small icon in the column header that indicates that these field values have been filtered out. Let's sort them in descending order.
So we now have a new view of the data, that is to say the view in descending order.
Now filtering and output ng is not kept. Therefore, we need to save the view in descending order for the future.
If we just go back to the list of authors, we'll see All Items . If we want to have a view that only concerns Employés , sorted by Salary / Descending rate, click on the SAVE THIS VIEW option.
We'll call this display the Employees view. Select from the options provided if this view should be available for all users or only for me. Click on Save.
Now we have the two different views, the All Items view and the Employees view, we can switch between these views using the links at the top of the List view as shown in the screenshot below.
We will add simple validation rules to the fields and elements of a SharePo int list., when we created the list of authors, we added validation rules using the properties of the different types of fields.
Click on New item in the list of authors. Now click on Save .
When you click on Save you will get two errors. Indeed, we have indicated that the Name and Salary / Rate fields are mandatory.
Enter name and salary / rate as Aamir Jameel and 1500 respectively. Click Save .
As you can see, we still have an issue with Salary / Rate, because when we created the field, we indicatedthat its value should be between 0 and 1000, and 1500 does not satisfy requirement. Click on Cancel.
Go to the List tab of the ribbon, then click List Settings . Click on Name . As you can see in the screenshot below, this is a required field,
Now go back, click on Salary / Rate and scroll to the bottom. You will see that this is also a mandatory field.
Here we also set the valid value range. So, everything is fine if the field type has these properties but what do you do if it doesn 't? well we can add an simple custom validation. So if we scroll down you can see that there is an area for column validation. Let's develop that. Here we can specify a formula and then give a message if the value entered by the user does not satisfy this formula.
If you are not familiar with building formula s in SharePoint, there is a link that helps you to do that.
Now the validation we want to add is that if you are not an employee then your salary / rate indicates your hourly rate and we want to say the maximum rate value is $ 50.00. So here the validation dependsboth the value of the Employee field and the Salary / Rate field. Therefore, instead of adding validation to either of these fields, we are going to add it to the element and then the way we indicate the validation of the element is to access the parameters of the list.
Click on Validation Parameters and set the formula as shown below.
So the condition is going to be quite simple, firstly, are you an employee? So if you are an employee, we have already set the valid range of salary values between 0 and 1000. Therefore, only True is returned. If you are not an employee, we will vcheck if the salary / rate is less than or equal to 50.
If this formula returns True, then the item is considered valid. If it returns false, it is not valid. Finally, we add the error message "The maximum rate for a contributor is 50 USD ".
This completes the validation parameters. Click on Save.
Now go back to the list of authors and add a new item. We'll name this Test, check the Employee box (as we're testing for an employee), enter Salary / Rate as 800 and click Save.
The data has been saved. There was no error. Now let's enter different conditions. Go to the list of authors. We'll name this as Test 2.
Now don't check the Employee box because we now suppose the person is a contributor. Enter the salary / rate is 800, then click save.
You will see an error message. Therefore, let's change the Salary / Rate to a valid value .
Enter 40 in the Salary / Rate field.
You will see that the data is saved correctly and updated in the list as shown in the following screenshot.
We are going to look at e list relationshipst search fields. We will create a new list to contain course information.
Step 1 - Go to Site content → 'add an application ' → Custom list .
Step 2 - Specify the course list, then click Create. Open the course list. There is only one column called Title, which will represent the title of the course.
Step 3 - Create a second column, which will contain the author 's name Go to LIST on the ribbon. Click Create Column.
Step 4 - Name this column as Author . We can just have a single line of text where the user enters the author name. However, we already have the author names in the author list, so instead we will present the user with a drop-down list, where they can select the author. hor aut. Therefore, instead of creating a single line text field, we'll create a lookup field.
Step 5 - Then we need to specify which field from which list we would show the user. SharePoint has set the appropriate values by default, but if we want to edit the list we can select it from the drop down list. When it's done, click OK.
Step 6 - This course is SharePoint tutorials and you can see we have a drop down list for the author.
List data storage
List data is stored in rows and columns. For each content database , there is a table that stores the data for the lists. You can link the lists together, build relational integrity, and validate.
People quite often assume that many capabilities in a database Relational data exists with lists and a set of lists almost becomes like a relational database, but it doesn't.
You deYou can think of lists more like a set of Excel worksheets where you can have one worksheet linked to another worksheet, and you can apply validation on columns or cells through a simple form. Therefore, a list set in SharePoint is not like a relational database.