08 May 2019

SharePoint List Generator on

SharePoint icon The web site has a new section: Tools. Here we plan to publish various tools that will simplify SharePoint management and help users to develop their SharePoint systems following recommended practices. The first tool to be published is a SharePoint list generator that is free to use for all visitors.

List generator
My job as a SharePoint consultant and developer means that I must create a lot of SharePoint lists, and these lists should be built in the right way. To make that part of my work easier, I have built a tool for list generation, and today I am happy to announce that the tool has been released on

Content type
The quickest way to build a SharePoint list is to add an app, select a list template and add list columns to it. That method can work in some cases, but as soon as you want to search, move or re-use the list you run into trouble.

The recommended way to create a SharePoint list is instead to first create a content type for the list. A content type is a reusable collection of metadata that describes how a specific kind of content should be organized, for example which columns that kind of list should contain.

All SharePoint lists have the List content type by default, but by creating your own content type you can make sure that the list contains the desired content. With a custom content type, it is also easier to manage the list in a consistent way.

Site columns
The columns in the content type should be site columns. These are reusable, so that you can assign them to multiple apps. Contrary to list column values, the values in site column are automatically indexed by the SharePoint search engine.

PowerShell script PowerShell icon
I use PowerShell to build my lists, and the generator tool automatically creates the necessary code from the data you enter into the generator fields. The content type and the site columns are created automatically, and by default I also enable version history in all lists.

The list generator suggests a good internal name for each site column. It is based on the content type name and the column name and is written in CamelCase style. That will give you nice URLs, and it prevents errors if you want to automate list processes with a flow or workflow.

SharePoint Patterns and Practices
The list creation tool I have created is called PnP Generator, because I use the SharePoint Patterns and Practices (PnP) library of PowerShell commands in the script. It works with both SharePoint Online and SharePoint On-Premises.

In the demo below, I explain in detail how the PnP Generator works, and you will find the same demo plus step by step instructions on the page for the list generator tool.

Please contact me if you have suggestions on how the PnP Generator can be enhanced. I have a lot of ideas myself (as usual!), but I would like to hear from website visitors too.

By Peter Kalmström
CEO and Systems Designer Business Solutions

No comments:

Post a Comment