Hidden Field Types: Week of Month

Now that we know about the existence of Hidden Field Types in Servicenow, it is time to inspect one of them: Week of Month

In this post, we will see how to create a new Week of Month field, how it looks in a form and some of its properties.

Creating a Week of Month field

The quickest way is to use the following URL (substitute <instance_name> by the name of the instance):

https://<instance_name>.service-now.com/sys_dictionary.do?sys_id=-1&sysparm_query=internal_type=week_of_month

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.

Week of Month: Dictionary Entry

Week of Month in a form

The new field is displayed as a select box.

Week of Month displayed in a Form

Values and Validation

Week of Month extends Integer.

Week of Month: Field class

It stores the number of the selected week.

Week of Month Validation

These are the values for each of the options:

  • 1 = First
  • 2 = Second
  • 3 = Third
  • 4 = Fourth
  • 5 = Fifth
  • 6 = Sixth

If we manipulate the value of the field, it will ignore all characters except for the digits between 1 and 6

Internationalisation

Week of Month field includes out of the box translations.

This is how it looks in Spanish:

Week of Month in Spanish

Service Portal

Unfortunately, the field type Week of Month is not displayed properly in Service Portal.

Week of Month in the Service Portal