Introduction
This article is the 19th part of my SharePoint series. Here are my previous articles.
- Learn SharePoint In Series - Part One - Introduction
- Learn SharePoint In Series - Part Two - Web Application
- Learn SharePoint In Series - Part Three - Site Collections
- Learn SharePoint In Series - Part Four - Subsites
- Learn SharePoint In Series – Part Five – SharePoint Lists
- Learn SharePoint In Series - Part Six - Power Of Versioning
- Learn SharePoint In Series - Part Seven - Lists Advanced Settings
- Learn SharePoint In Series - Part Eight - Validation Settings in List Settings
- Learn SharePoint In Series - Part Nine - Audience Targeting
- Learn SharePoint In Series - Part Ten - Rating Settings
- Learn SharePoint In Series - Part Eleven - Form Settings in List Settings
- Learn SharePoint In Series - Part Twelve- Save list as template in List Setting
- Learn SharePoint In Series - Part Thirteen- Permission Settings in List Settings
- Learn SharePoint In Series - Part Fourteen- Enterprise Metadata and Keywords
- Learn SharePoint In Series - Part Fifteen - Retention Policy Under Information Management
- Learn SharePoint In Series - Part Sixteen - RSS Settings in List Setting
- Learn SharePoint In Series - Part Seventeen - List Columns in SharePoint
- Learn SharePoint In Series - Part Eighteen - Multiple Lines Of Text Column Type in SharePoint
In the previous article, I have explained everything about Multiple lines of text columns type in SharePoint lists. We have seen the different behaviour of columns in List and Library. Now, in this article, let’s cover two more important column types available in SharePoint - Choice, and Number. We will be exploring these column types in details.
In this article, I am going to cover following topics in details,
- Background
- Introduction to Number column types
- Introduction to Choice column types
- Summary
Background
Until now, we have seen that if we want to store less data and plain text, in that case, we should use a "Single line of text" column type, and when we have to store large data and rich data, then we have to use "Multiple lines of text" column type. Now, consider a scenario where we have to store the salary or age.
The salary and the age data will be less and they also require plain text but can we use Single Line of text for storing this data? Yes, we can make use of Single lines of text column to store the salary and age, but we also know that age and salary are always in numeric form. They do not include any textual character in this.
So, using a Single line of text column for storing age and salary will not result in a fruitful decision. So, SharePoint allows a column type called Number that allows only numeric data to store. When user will try to save text character in Number field, SharePoint will validate and throws an error and the item will be not saved until and unless the user has input the correct numeric values.
Also sometimes we have to enter some predefined text into the input box such as department, we know that department will be having some fixed sort of values like HR, Sales, Marketing etc.
So using Single line of text for storing department may lead to error data as a human makes mistakes while typing the words, someone can type Sales as Salse, then this will make error-prone data. So if we already have some predefined set of data from which user can select the data, then, in that case, we use Radio Button, Checkboxes, and dropdowns. SharePoint provides all of these types in single column type known as Choice. Now let’s see in details about these columns types in this article.
Introduction to the Number column
Number column type in SharePoint will only allow storing the numeric data. Numeric data can also contain positive, negative, decimal, exponential data. So -1, 1, 1.1, 1e can be stored into Numeric data type column. Other than these values everything will be invalid. For example, d12, 12d etc will be invalid data for this column. In order to create the column you can refer Learn SharePoint In Series - Part Seventeen - List Columns in SharePoint. Just select Number while creating columns. There are several properties available in Number column types. For reference see below image.
All other properties are common and available all column types and that are already discussed in Learn SharePoint In Series - Part Eighteen - Multiple Lines Of Text Column Type in SharePoint
Introduction to Choice Column
Choice column allows a user to select values from predefined values. The choice column can be used to create drop-down control, radio button control, and checkbox controls. It also allows a user to enter the value manually but for this, you need to configure the column to accept that. This column type can be used to take input for category, department, city, gender, hobbies and many more. There are several unique properties are available along with the common properties. The unique properties are shown in the below image.
Specify that your own value will be added in every type of render control if you have checked “Allow ‘Fill-in’ choices” to Yes.
Summary
So in this article, we have explored every aspect of Choice column type and Number column types available in SharePoint. We have also seen the properties available with each of the column types in details with scenario based example. If you have any question regarding this concept then please feel free to ask in the comment section. I will update my article and include the answer to your question.
In the next article, I am going to cover Currency and Yes/No column types available in SharePoint.