Now that we know about the existence of Hidden Field Types in Servicenow, it is time to inspect one of them: Month of Year
In this post, we will see how to create a new Month of Year field, how it looks in a form and some of its properties.
Creating a Month of Year field
The quickest way is to use the following URL (substitute <instance_name> by the name of the instance):
It will open the form to create a new field with the Type already populated. You just need to select the Table and set the Column label and Column Name.
Month of Year in a form
The new field is displayed as a select box.
Values and Validation
Month of Year extends Integer.
It stores the number of the selected month.
These are the values for each of the options:
- 1 = January
- 2 = February
- 3 = March
- 4 = April
- 5 = May
- 6 = June
- 7 = July
- 8 = August
- 9 = September
- 10 = October
- 11 = November
- 12 = December
If we manipulate the value of the field, it will ignore all characters except for the digits between 1 and 12
Internationalisation
Month of Year field includes out of the box translations.
This is how it looks in Spanish:
Service Portal
Unfortunately, the field type Month of Year is not displayed properly in Service Portal.