
Viewing and changing list settings
SharePoint lets you view and change a variety of settings for your list.
In this recipe, we will use the Marketing Announcements list that we created earlier to add validation rules for the information that users can add to your list. We will add validation rules to ensure the following:
The Announcement Start Date value is greater than the current date
The Expires date entered by the users is greater than the Announcement Start Date value
Getting ready
You will need Edit, Design, or Full Control access permissions to the list for which you'd like to view or change settings.
How to do it...
Browse to the list for which you would like to view or change the settings.
Click the settings gear icon in the top-right corner.
Click List settings, as shown in the following screenshot:

On the Settings page, click the Validation settings link under General Settings.
Enter the desired validation formula in the Formula textbox. We are going to add the following formula for our example:
=AND([Announcement Start Date]>=TODAY(), [Expires]>=[Announcement Start Date])
Enter text in the User Message textbox to indicate details about the validation error. We are going to enter the following message for our example:
One or more of the following validation errors occurred:
1. The announcement start date should be greater than or equal to today's date.
2. The Expiration date should be greater than or equal to the Announcement Start Date.
Please fix these errors and try submitting the form again.
The Validation Settings screen should then look like this:

Click the Savebutton to save the changes.
Browse to your list again.
Click the New menu option to add a new item to your list.
Enter information in the list so that it satisfies the error condition. For our example, we are going to enter a past date for the Announcement Start Date field.
Click the Save button.
Notice the validation error message toward the top of the form, as shown in the following screenshot for our example:

Note that this validation also works when editing items and also in the Quick Edit view that we saw in an earlier recipe.
Congratulations! You just saw how to view and modify settings for a SharePoint list. You further saw how to set up validation for your list.
How it works...
SharePoint lets you manage your lists and libraries through various settings. We've already seen a couple of these important list settings through some of our previous recipes. Here are a few other more common list settings that we have not discussed so far:
List name, description, andnavigation: This is where you can change the title and description for your list. Note that the list URL remains the same even after you change the list name. This is where you can also specify whether or not to show the list in the site's Quick Launch (refer to the Modifying the left navigation recipe in Chapter 3, Working with Modern Sites in SharePoint Online).
Versioning settings: This allows us to control whether or not to keep a version history of the changes to the list items. We will look at versioning in greater detail in a subsequent chapter.
Advanced Settings (the more commonly used ones):
Content types: We will learn about content types in a subsequent chapter but at this point, it is sufficient to be aware that this setting is part of the list's/library's Advanced Settings.
Item-level Permissions: This setting allows you to define individual permissions for each item in the list. This setting is only applicable to lists (and not to libraries). We will discuss item-level permissions as part of the next recipe.
Attachments: Whether or not to allow attachment uploads for the lists. It is a good governance practice to consider enabling or disabling this setting every time a list is created. This setting is also available only for lists (and not document libraries).
Folders: Whether or not folder creation should be enabled for the list. Again, you should make a conscious decision as to whether or not to enable this setting for every list or library that gets created.
Search: This option defines whether or not items from this list should show up in the search results. For most use cases, you will set this option to Yes. Instead of excluding items from just the search results, you should instead update the list or item permissions if you would like to hide items from other users. Once you change the list permissions, items from this list will also not show up in search results for users that don't have access to them. If, however, you have a compelling case to not show the list items in search results but still allow users to be able to access them, you simply change this setting to No. Doing so will hide the items from this list in the search results, while still allowing them to have direct access to them when they browse to the list or access them through shared links. Please refer to the Viewing and changing list permissions recipe later in this chapter for details on how to modify list and item permissions.
ReindexList: Microsoft Search should automatically pick up new items from this list as part of the search results. Also, items that get deleted from this list should get dropped from the search results. If, however, for any reason you are not seeing appropriate items from this list in the search results, and you have waited sufficiently long enough for the search crawler to crawl and index this list, you can click the Reindex List button to completely delete and recreate the index as a way to fix the search results. Please refer to Chapter 8, Search in Microsoft 365, for more details on the different components of Microsoft Search and how it works in general.
List experience: This lets you deviate from the default list experience setting for the site. Here, you can choose to explicitly use the classic list experience or the new modern experience for your list or library. Please see the next section in this recipe for the details of the modern versus classic list experience.
Delete this list: Clicking on this link deletes the list and sends it to the Recycle Bin of that site. Deleting a list or library sends it to the recycle bin, where it stays for a couple of days until it gets moved to the second-stage recycle bin or gets permanently deleted. You can restore deleted lists or libraries, as long as they are still in the recycle bin and have not been permanently deleted. Please refer to the Viewing site contents recipe in Chapter 2, Introduction to SharePoint Online, to read more about the site recycle bin.
Workflow settings: This allows us to specify workflow settings for the lists and libraries. Workflows are being replaced by Microsoft Flow. We have covered Microsoft Flow as part of a subsequent chapter. We will discuss workflows as part of the Appendix.
Columns: This section lists the different columns for the list or library. You can click on the column names to view and change column settings.
Create column: This link allows you to create a new column for the list.
Add from existing Site Columns: Click this link to add a previously created Site Column to this list or library. We discussed Site Columns as part of the Adding a column recipe earlier in this chapter.
Column ordering: Click this link to specify or change the order of the columns as shown from top to bottom in the Details pane or the add/edit forms for this list or library.
Index columns: Specifying column indexes improves list performance when using filtered views. These are especially useful for large lists. You can use this link to specify indexes for your list or library.
Views: This section shows the views currently configured for the list or library. You can edit existing views or create new views from this section.
The following support article provides a comprehensive listing of all the settings that are available for lists in SharePoint: https://m365book.page.link/List-Settings.
There's more...
SharePoint is an ever-evolving platform. Microsoft recently introduced a more modern, flexible, and mobile-friendly user experience for SharePoint. Modern lists and libraries are part of this new experience.
Modern versus classic list and library experience
Modern lists are faster, easier to use, less SharePoint, and mobile friendly. Some of the key benefits of modern lists and libraries are as follows:
Easier to create and upload files and folders
Easily add, sort, filter, and organize columns and views
Easy access to file previews and information
A better search experiences
Easy customizations to the view display using column and list view formatting
Ability to pin important documents to the top of the screen
Ability to add files as links instead of having to copy them across sites
A responsive experience
The classic experience is now deprecated and the modern experience is the default for newly created lists or libraries. To switch to the classic list experience, click Return to classic SharePoint from the bottom-left corner of the view page of your list or library. Note that while Microsoft lets you switch to the classic list experience, it is recommended that you continue to use the enhanced modern list and library experience unless there's a compelling and well-thought-out reason not to do so.
See also
The Adding an item to a listrecipe in Chapter 2, Introduction to SharePoint Online
The Viewing site contents recipe in Chapter 2, Introduction to SharePoint Online
The Adding a column recipe in this chapter
The Creating a custom list view recipe in this chapter
The Viewing and changing list permissions recipe in this chapter
The Adding a content type to a list or library recipe in Chapter 6, Term Store and Content Types in SharePoint Online
Chapter 8, Search in Microsoft 365