As the number of sites being used in SharePoint grows within an organization, it is often required to create lists with the same structure that are used in a different sites or site collections.
In the classic experience, and in earlier versions of SharePoint, we used to save the list as a template (from List Settings page) which saved the list metadata and column information into a .stp file which was later uploaded to the List Template Gallery and used for creating lists using the .stp file.
This approach doesn’t work on the modern experience and here is the Modern approach for the traditional Save as List Template feature.
The modern experience in SharePoint Online now has the new feature to either create a list from an existing list or from an excel. From the Site Contents Page, when we click on the New menu and choose List, we will see the list creation panel.
This has the option to create a list from an existing list. Once we choose that, the panel then shows sections to choose the Site (sub-site) or a different Site Collection where the list is present. And then, we can choose the list as a source.
Once we select, SharePoint then creates a new list on the current site based on the structure of the chosen list.
What has changed compared to ‘Save list as template’
Following are the major differences between ‘Save list as template’ and the modern Create from existing list options,
List Package
The ‘Save as template’ option imports all the information about the list structure, columns, content types, views into a .stp file. This file has to be copied to the List Template Gallery of the site collection where we want to create the list.
In the modern approach, there is no import file which gets created. The ‘Create from existing list’ feature uses Site Scripts to define the list structure which includes the fields, content types, dependent assets, etc. This site script is then executed directly in the destination site where the list gets creates. So, there are additional packages created when using the modern approach.
Lookup Columns
When we have lookup columns in a list, the ‘Save as template’ option doesn’t include the lookup list that is used for the column. The lookup list should be saved as another template and should be manually created.
When using the ‘Create from existing list’ in the modern site, the parent lists for the lookup columns are automatically created and the lookup columns are retained with the relationships intact.
Include Content
With the Save list as a template, we were able to include the content (list items) in the .stp file. And when creating the new list the list items are also copied to the new list.
With the ‘Create from existing list’ option there is no setting to copy the content/list items. One has to use a CSOM/REST/PnP PowerShell to copy the list items to the new list.
Other Differences
The ‘Create from existing list’ also copies the list and view formatting of the modern list experience, which is really useful.
While the list templates can still be used in the modern sites (Site Content -> New –> App -> Choose the custom list template), they need the Custom Scripts to be enabled on the modern site. The new ‘Create from existing list’ option works without any dependency on the Custom Scripts setting of the site, as this works based on the SiteScripts feature of SharePoint Online.
Summary
Both the approaches have their pros and cons, but ‘Create from existing list’ looks more powerful and easy to use as it works on top of SiteScripts architecture of the modern site.