Requirement: Create a list from an existing list in SharePoint Online.
SharePoint Online: Create a List from an Existing List
Creating a list similar to the existing list structure is a common requirement in SharePoint. Creating a list from an existing list in Sharepoint Online can be a great way to quickly create a new one without manually creating all of the items in the list. It also allows you to easily make changes to an existing list without having to recreate the entire list.
We used the “Site list as Template” approach in previous versions of SharePoint and in the Classic experience of the SharePoint Online site. Now, in modern sites, this approach is not supported. The article provides step-by-step instructions on how to create a new list based on the columns of an existing list.
The modern SharePoint Online sites provide a nifty way to create a list from existing lists. Here is how:
- Go to Site Contents Page (Click on “Settings” gear >> Choose “Site Contents”), click on the “New” menu and choose List.
- This opens a new list creation page which provides an option to create a new list from the existing list. Not just a list from the same site, but you can select different site collections even!
- Provide a name to your new list, select the source list to clone, and click on the “Create” button on the bottom to copy the existing list structure in SharePoint Online.
The new list will now appear in the list of existing lists on your Sharepoint site. You can now edit the new list as you would any other list. For example, you can add new items to the list, change the list settings, and even delete items from the list.
Unlike the “Save List as Template” approach, this method uses the “Site Script” method to get the list schema and create a new list. With this approach, All fields, Views, formatting, and content types will be copied from the source list into the new list you create. It also maintains the lookup column relationships by creating parent lists.
Please note, We don’t have the option to copy a list with its content in this approach. Also, Document Library and Discussion Board list types are not supported as of today. Moreover, creating a new list with this approach discards most of the list settings and permissions on the source list.
Use the Add-PnPList command to create a new list. Specify the required parameters such as Title, TemplateType, and Url. E.g., Add-PnPList -Title “Your List Title” -TemplateType GenericList -Url “Lists/YourListUrl”. More here: PowerShell to Create a List in SharePoint Online
To copy a list with content in SharePoint Online, use the “Save List as Template” method. Alternatively, you can use PowerShell to copy a list with content in SharePoint Online. More info: How to Copy a List in SharePoint Online?
Removing all the users and groups from the list permissions except for yourself is one option, But it doesn’t prevent site collection admins and site owners from accessing it. You can use PowerShell to hide a list! Here is how: Hide a List in SharePoint Online using PowerShell