The aim of this solution is to demonstrate how to create a reusable column that you can assign to multiple lists and libraries.
Reusing columns is useful if you want to establish a consistent definition across lists and libraries. You can share the definition across multiple lists and libraries so that you don’t have to recreate the column settings each time. A significant additional benefit is that when items are added to a reusable column they discoverable through search (the magic only happens after it has been populated). Reusable columns are called site columns in SharePoint. Site columns can use any of the available column types, including managed metadata, but be careful if you are using them as the source in a lookup function as you can only use either a single line of text, number or date and time as the source!
This solution works for both lists and libraries but it is limited to the scope of the site i.e. a site column in one site collection cannot be used to augment a list or library in another site collection unless they are published by a SharePoint Administrator as part of a tenant wide content type.
For this solution I’ll use the example of where we have number of projects nested under a master project and each one needs a list that contains a definition of the project.
As there are a number of projects we need to ensure that the information being captured is consistent. Each site will contain a list to capture the following Project details:
- Project number
The steps in this solution are:
- Create site columns for each field
- Create a list
- Attach the site columns to the list
- Modify the list view
Those of you who are familiar with SharePoint might notice that the solution does not include the use content types. Using content types to optimise reuse and search queries is the natural conclusion to the reuse story. I felt that by including a section on content types would make this solution overly long and it is not always necessary to use a content type e.g. where you need to add a searchable column to a single list or library and are happy to add it to an existing content type.
The methods in this solution can be applied whenever you need reusable content in your SharePoint site. You’ll need the design permission level or higher to implement the solution. If you are creating columns for reuse throughout your SharePoint environment you will need permissions to work with content type hub.
Site columns are created from the site settings page. The site columns item is located under the “Web designer galleries” heading.
Cog > Site settings > Site columns
Site columns are organised into groups which makes it easier to find them when it comes to reusing them. We will create our columns in a new group which we will define when we create the first column.
It is good practice to use short names (lower camel case) and omit spaces when defining site columns, lists, libraries, or sites as SharePoint will use the name as it’s internal name. The internal name is fixed from the time of creation and cannot be edited. If the internal name is long and or contains spaces, you might run into difficulties when trying to reference or rename it. For example, if you create a site column with the name “DC Project technology” the internal would be “DC%5Fx0020%5FProject%5Fx0020%5Ftechnology” ! It is possible to rename site columns, lists, libraries, or sites after creation to use spaces, long names etc. The act of renaming preserves the internal name and applies a display name as a mask. This means you could repurpose a column or rename it without changing any wiring that depends on it.
For this solution we will create 4 columns and once created rename them:
I’ve assumed that the Project number will be a whole number. If it is a combination of letters and numbers, then you’ll need to use the “single line of text” column type. You’ll notice that a column called “Title” is missing. Every list includes a title column by default and in this solution we will use that to hold the Project Title. In other solutions you might not use the title column. If that is the case, then do not delete it! Remove the requirement for it to be completed and consider hiding it in views. Be wary if you hide it as users will lose access to the ellipses … right click menu for each item.
As mentioned earlier, when we create the first column we will also create a group. The group is a visual aid and so you do not need to worry about an internal name for it.
We start the process by selecting Create column which is located immediately below the page title. I’ll step through the detail of creating the first column which is then repeated for the subsequent columns.
Column 1 – Project number
1. Enter the internal name prjnum as the column name
2. Select Number as the type of information
I’ve assumed that the Project number will be whole number. If it is a combination of letters and numbers then you’ll need to use the “single line of text” column type.
When you select Number the page will reload changing the options available lower down on the page. You’ll see the same reload behaviour if you pick a different type of column.
It’s also worth noting at this point that certain column types cannot be converted to a different type once created. For example: single line of text, multiple lines of text, choice, number, currency and yes/no can only be changed to one of the other listed types e.g. single to multi line and not to a (then) unlisted type like Lookup. Also certain column types like yes/no do not work with lookup queries.
3. Select New group and enter Project
4. Add some helper text to the Description field
You’ll notice that I have left “Require that this column contains information” set to No. By setting this option to Yes it is possible to enforce the use of unique numbers in the Project number column but SharePoint will strictly enforce the uniqueness which means mistakes are really hard to undo. I’ve found a more user friendly approach is to guide people to use one row in the list per project.
5. Set the Number of decimal places to 0
The remainder of the options can be left as their default settings.
Selecting OK creates the new column and assigns it to the Project group.
The final step is to rename the site column to use its display name. The column can renamed by clicking on the column name, editing the column name, scrolling to the bottom of the page and selecting OK to save it. SharePoint will then return you to the site columns page
Before (note the reduced list of types of information)
When you select OK you might be presented with a warning message which is fine to accept by selecting OK.
Selecting OK will save the column and SharePoint will return you to the site columns page.
If you return to edit mode, by locating the column in the list and selecting it, you will see that the value for field name (or internal name) is reported in the address bar:
The next steps are to repeat the process for the remaining columns (remembering to create them with their internal names first) and assign them to the existing Project group rather than creating a new one.
Column 2 – Project description
I opted to use plain text for this column as I felt additional features like hyperlinks where unnecessary.
Column 3 – Project principal
There are options for items using the “People or groups” type of information. Several like Name (with Presence) come with additional data that introduces unnecessary complications for this solution so I opted to use simpler the Name choice.
Column 4 – Project manager
As for the Project principal, I opted for name only.
The next step is create the list to hold the Project details.
With the site columns created the next step is to create the list that will ultimately hold the project information. You can have multiple instances of the list throughout the site collection (and it’s sub sites). If you plan to have a large number of lists then I recommend using content types to further optimise the deployment. There are several locations in a site from which you can create a list – the screen shot shows just one of them.
Cog > Add an app
From the gallery we need a Custom list
When naming a list for the first time it is good practice to give the list a short name and then rename to use a display name.
Select Create and after SharePoint has created the list it will take you to the site contents page.
With the list created it is now possible to rename it so it uses a display name. The list name can be changed by accessing the list settings. Select the … alongside the list name and then Settings
From the settings page we need List name, description and navigation which is the first item under the “General settings” heading.
Apart from the changing the name it is a good idea to add this list to the “Quick launch”.
Select OK to save and SharePoint will return you to the settings page.
Versioning is not enabled by default for lists. It is a good idea to use versioning on this type of list so changes can be tracked. Once you have saved the changes to the list name you will be returned to the settings page. From the settings page we now need Versioning settings which is the second item under the “General settings” heading.
To add versioning, it is only necessary to change the “Create a version each time you edit an item in this list” to Yes. If you need changes to this list to be authorised, then you could consider enabling Content approval (but be prepared for the friction this option will generate) and change the Draft item security. We do not need to worry about discarding versions or item visibility.
Select OK to save and SharePoint will return you to the settings page. The next step is to add the site columns to the list.
With the list configured it is now time to add the site columns to the list. Hopefully you are still on the list settings page (if not now is the time to find your way back to it!). From the settings page we need Add from existing site columns which is located in the “Columns” section.
From this page you can add any available site column. We can refine the list of available columns by selecting the Project group from the “Select site columns from” drop down.
Now a tip is to add the columns in the order you want them to be displayed in the list (do not worry if you do not do this as you can reorder them at any time). This order will be the default column order and we’ll tweak it in the final step to include the Project title. For our list we need to add all four columns and you can add them either one-by-one by selecting each one and then Add > or selecting all of them (pick the first column, press and hold shift, pick the last column) and then Add >.
Select OK to add the columns and SharePoint will return you to the settings page. The final step is to modify the list view to present the columns in a logical order.
With the list configured and columns added it is now time to modify the list view to present the columns in a logical order. Hopefully you are still on the list settings page (if not now is the time to find your way back to it!). From the settings page we need Column ordering which is located in the “Columns” section.
We are changing the order in the list Settings as this is the baseline order presented in the New Item form. It controls the top-down presentation whilst the settings in a particular view affect the left to right presentation. We will still create views and reorder them but this helps as it speeds up the editing process and encourages logical relationships (which is good for the user experience e.g. the Project Number will normally appear above the Title in any form the Manager will always be below the Principal once we have set them).
As I had previously added the columns in order, I only need to move the Title column to after the Project number.
To move a column simply change the position number in the drop down alongside it. SharePoint will then renumber the columns based on the move. In my case I changed the Project number from position 2 to 1. The result was that SharePoint changed the Title position to 2 and with the remainder unchanged.
Select OK to save the change and SharePoint will return you to the Settings page.
The top down column ordering is respected in the New Item form.
Whilst we have changed the column ordering it is not reflected in the list view.
The column ordering controls top down presentation. The list view controls left to right presentation. The final step in this solution is to edit the All Items view (which is the out of the box default view). As you can see this view show all columns we need but in the wrong order. The view can be configured from several locations including the Ribbon (in the classic list view), Command Bar (in the modern list view) and the list settings. In the list settings select the view name to access its configuration.
Whichever route you take to access the list view, you’ll end up here.
The list is now configured and ready for use.
That’s it nothing more to do but add content. I hope this solution has given you an insight into the configuration and use of reusable columns.