SharePoint uses lists as the primary way to store information that end users such as you or I create. Almost all of the information in SharePoint is stored in some type of list.
This recipe shows how to create a new list from scratch. For illustrative purposes, we will use this list to store details of the products from our company's product line. This list will contain the following columns to store the product information:
- Title
- Code Name
- Product Line
- Date Released
- Notes
Getting ready
You will need either an Edit, Design, or Full Control permission on the site where you'd like to create the list.
How to do it...
To create a new SharePoint list, follow these steps:
- Browse to the Site contents page for the site where you'd like to create the list.
- Click the New menu and then click List.
- Provide a descriptive name for the list so that others can identify the nature of the information that it stores. We are going to use Products List as the name for our list:
You can additionally create a list From Excel. You can select an excel file from one of the libraries in the site or upload a new file to create a list using the columns and data from the files. You can read more about this capability in the following support article: https://m365book.page.link/CreateList-FromExcel
- We will leave the Show in site navigation box checked. This will result in the list to be shown on the left-hand side navigation menu for the site.
- We will then click the Create button, toward the bottom of the screen, to create the list.
- This will create the new list and show us the newly created list in the browser.
- You will notice that the list already has a Title column created for us. We can now add the remaining columns to our list.
- To add the Code Name column, click on the Add column option and select Single line of text. Then, enter Code Name as the column name, optionally provide an appropriate description for the column, and click the Save button.
- To add the Product Line column, click on the Add column option and select Choice as the column type. Then, enterProduct Line as the column name. EnterComputers & Tablets,Gaming, andHome Theater in three separate lines in theChoices field. Then, click the Save button, as shown in the following screenshot:
- To add the Date Released column, click on the Add column option and select Date as the column type. Then, enterDate Released as the column name and click the Save button.
- To add the Notes column, click on the Add column option and select Multiple lines of text as the column type. Then, enterNotes as the column name, optionally enter a description, and click theSave button.
- When a new list is created in SharePoint, it creates a few additional columns that are not shown to the users by default. The Modified and Modified By columns are two such columns that get created with the list. We are going to add them back to the view of the list so that we can track who added the items to the list and when.
- Click the Add column option and then Show/hide columns. Then, select the Modified and Modified By columns, as shown in the following screenshot:
- This is what your list will look like in the end if you followed the preceding steps:
Congratulations! You just learned how to create a custom list and added new columns to it.
How it works...
In its simplest form, a list in SharePoint isa table-like container for information, similar to an Excel spreadsheet or a database table. It lets you store a collection of data in a way that enables you and your co-workers to organize and share information flexibly. Just like a spreadsheet or a database table, it lets you add and manage columns so that you can store and display different types of data such as text, number, date, and currency. You can also specify various column properties, such as setting a default or calculated value for your column, and making it required. The properties you can specify for a column also vary, depending on the type of column. The Adding a column recipe in Chapter 4, Working with Lists and Libraries in SharePoint Online, discusses list columns in greater detail.
In addition to the ability to define columns, a SharePoint list also lets you create views for it. List views enable you to filter, sort, group, and format the data in a list so you can easily highlight the information that's the most important to your audience.
Content in lists exists in the form of list items. Items in a list can include file attachments, people, and links. Furthermore, SharePoint provides pre-created forms that you can use to add or update the information in lists. You can also create your own customized forms to add or edit information in lists. You can use tools such as Microsoft Power Apps to create mobile-friendly forms and apps around this data. Additionally, you can configure email alerts for when list items are added, updated, or deleted. We will look at alerts as part of the Adding alerts recipe in Chapter 4, Working with Lists and Libraries in SharePoint Online.
Finally, SharePoint lets you create a blank list from scratch and also provides a set of pre-built list types. Examples of such lists include Tasks, Announcements, Contacts, Links, and Issue Tracking. We will discuss these pre-built lists and other advanced list capabilities in more detail in Chapter 4, Working with Lists and Libraries in SharePoint Online.
Deleting a list
You can delete a list by browsing to the List settings page. Please refer to the How it works... section of the Viewing and changing list settings recipe in Chapter 4, Working with Lists and Libraries in SharePoint Online, for more information about browsing to the List settings page and deleting a list.
See also
- Chapter 4, Working with Lists and Libraries in SharePoint Online