How to Create Custom List Templates in SharePoint

WME Article - How to Create Custom List Templates in SharePoint

You can create a complete SharePoint site template and share it with users.

There is also a way to create a dedicated template only for Microsoft Lists. This time it will be available not only from SharePoint sites but also from Teams and Microsoft Lists itself.

This supports all modern features available in Lists such as view and column formatting. Let’s go and create a custom template.

List Templates in SharePoint

 

In the post, Custom SharePoint Sites templates – How To, I showed you how to create a template using site scripts.

In this post, I will use the same concept to create templates for Microsoft Lists.

Microsoft Lists integrate seamlessly with other Microsoft 365 services, such as SharePoint and Teams, enhancing collaboration and data sharing across the organization.

Lists are also an essential element in personal productivity and can be used to track tasks, store information, or plan activities.

There are 14 ready-to-use templates created by Microsoft. You can use them to create a list on a SharePoint site, inside a Teams channel, or on your personal list.

How to Create Custom List Templates in SharePoint - Pic1

You can extend this list by creating custom templates and sharing them with your users.

Those templates will be visible in the From your Organization tab. This feature gives you control over list structures and look and feel. Users get templates tailored to their needs and can use them within a few seconds.

List Template Structure in SharePoint

 

Custom Lists templates use the same concepts as site templates.

  • Site script – a JSON file that defines a structure and configuration options applied to a list.
  • List design – a package for site scripts.
  • Template – a list design with a name, color, icon, and an image that is visible to users from a Lists creation wizard.

 

Two ways to create a custom list template in SharePoint

 

Create a template from scratch

 

This way requires manual work and a good understanding of JSON reference available for Microsoft Lists.

To test your custom template you must implement it to Microsoft 365 and create a new list. If you create JSON-based formatting it could be really painful to do it this way.

How to Create Custom List Templates in SharePoint-Pic2

Use the existing list and save it as a template

You can create a base list with all columns, options, and views. You can test the list to be sure that it contains all required columns, you can also add JSON-based formatting to columns, views, and even forms.

When it’s ready you can export a site script from your list and then use it to create a new template.

This way is faster, and you don’t need to play with JSON at all.

How to Create Custom List Templates in SharePoint-Pic-3

Let’s Create a SharePoint List Template

I will use the easier approach and I will use a list to export its definition and then use it to create a new template.

  1. Create a List with all required columns.You can do it in a Teams channel, on a SharePoint site, or using your personal List.
  2. Connect to SharePoint Online using PowerShell

$SPOAdminSite = https://tenant_name-admin.sharepoint.com

Define the URL to your SharePoint Admin Center

Connect-SPOService $SPOAdminSite

Connect to the SharePoint Online

  1. Get a Site Script from the existing list

$listURL = https://tenant_name.sharepoint.com/sites/test_site/Lists/base-list

Define the existing list URL

$extracted = Get-SPOSiteScriptFromList -ListUrl $listURL

Extract the Site Script

  1. Create a new Site Script

Add-SPOSiteScript -Title “Team blog posts” -Description “Template for Team blog posts” -Content $extracted

Copy the ID from the output and use it in the next command

How to Create Custom List Templates in SharePoint-Pic4

  1. Create a new List Design

Add-SPOListDesign -Title “Team blog posts” -Description “Template for Team blog posts” -SiteScripts “268a0b4d-43ed-49ca-b98f-3f6b5c08572f” -ListColor Orange -ListIcon Rocket -ThumbnailUrl “https://tenant_name.sharepoint.com/sites/test_site/Documents/thumbnail-image.png”

Parameters:

  • Title – title visible for users
  • Description – Description of the template
  • SiteScripts – ID of the Site Script
  • ListColor – default List color, you can select from the list
  • ListIcon – default List icon, you can select from the list
  • ThumbnailUrl – URL to the thumbnail image

Using the SharePoint List Template

1.  Open a Microsoft Lists page and start creating a new List

Open the From your Organization tab and select the new template.

How to Create Custom List Templates in SharePoint-Pic5

2.  Confirm the selection and create a new list using the Use Template button

How to Create Custom List Templates in SharePoint-Pic6

3.  Enter the title and confirm using the Create button

You can also change the default color and icon.

How to Create Custom List Templates in SharePoint-Pic7

4.  Use your new List! 

How to Create Custom List Templates in SharePoint-Pic8

By default, custom templates are available for every SharePoint user. You can limit this option using PowerShell.

Get-SPOListDesign

Get the ID of your custom template.

Grant-SPOSiteDesignRights -Identity eca07d4f-8811-4e56-b4f3-3fc80b8a5d34 -Principals “user@contoso.sharepoint.com” -Rights View

This command enables the templated with a specific ID for a user or a group specified in the Principal’s parameter.

JSON Formatting Options for SharePoint Templates

Microsoft Lists can be enhanced by JSON-based formatting. You can use it to create custom column formatting, custom view formatting, and even custom form formatting.

If you are not familiar with this feature, please check the GitHub repository. There are hundreds of ready-to-use examples for columns, views, and forms.

Can you use JSON formatting in your custom templates? Yes, you CAN! All those formatting options are supported by custom templates.

If you create such formatting in your base list and then follow the procedure explained in this post, then it will be automatically saved in the template.

Column formatting sample

Custom formatting in column Severity created from a template.

How to Create Custom List Templates in SharePoint-Pic9

View formatting sample

Fully customized view created from a template.

How to Create Custom List Templates in SharePoint-Pic10

Form formatting sample

Custom header formatting created from a template.

How to Create Custom List Templates in SharePoint-Pic11

Wrapping it Up:

By creating custom list templates with specific structures, configurations, and formatting, business users can optimize list functionalities for maximum productivity.

Templates can be used from a SharePoint site, from a Teams channel, or directly from the Microsoft Lists service portal.

The entire process is straightforward, and you can use the existing list to create your custom template.

Custom JSON-based formatting support is a great enhancement and allows you to create advanced templates with a modern UX.

 

Share:

Facebook
Twitter
LinkedIn
Picture of Marcin Siewnicki

Marcin Siewnicki

Contact Us

=
On Key

More Posts

WME Cybersecurity Briefings No. 020
Cyber Security

WME Security Briefing 26 July 2024

Pro-Houthi Group Targets Yemen Aid Organizations with Android Spyware Overview A suspected pro-Houthi group, OilAlpha, is targeting humanitarian organizations in Yemen with advanced Android spyware. The operation is associated with the activity cluster codenamed OilAlpha. It

Read More »
WME Cybersecurity Briefings No. 019
Cyber Security

WME Security Briefing 23 July 2024

Samba File Shares Targeted by DarkGate Malware in Recent Cyber Offensive Overview Recent investigations by Palo Alto Networks uncover a brief but significant cyberattack campaign utilizing DarkGate malware. This malicious software exploited Samba file shares to

Read More »
WME Cybersecurity Briefings No. 018
Cyber Security

WME Security Briefing 15 July 2024

OVHcloud Mitigates Record-Breaking 840 Million PPS DDoS Attack Overview In April 2024, OVHcloud, a top French cloud computing firm, successfully stopped a massive DDoS attack. The attack hit a record-breaking rate of 840 million packets per second

Read More »
E-Commerce Security - Solutions for Online Retailers
Azure

E-commerce Security – Solutions for Online Retailers

Today’s hyper-charged e-commerce landscape demands top-notch cybersecurity measures. Cybersecurity for this bustling sector isn’t just about ticking a technical box; it’s the cornerstone of building trust. As businesses and consumers flock to the online space, the

Read More »
Be assured of everything

Get WME Services

Stay ahead of the competition with our Professional IT offerings.

=