Hidden Field Types: Days of Week

Days of Week

Now that we know about the existence of some Hidden Field Types in Servicenow, it is time to inspect some of them.

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

Creating a Days of Week 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=days_of_week

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.

Days of Week in a form

The new field is displayed as a checkbox group.

Days of Week: New record

Values and Validation

Days of Week extends String.

Days of Week: Field class

It stores a concatenation of the numbers for each selected value:

Days of Week: Values

These are the values for each of the options:

  • 1 = Monday
  • 2 = Tuesday
  • 3 = Wednesday
  • 4 = Thursday
  • 5 = Friday
  • 6 = Saturday
  • 7 = Sunday

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

Days of Week: Validation

Internationalisation

Days of Week field includes out of the box translations.

This is how it looks in Spanish:

Day of Week: Translation Spanish

 

Service Portal

Unfortunately, the field type Days Of Week is not displayed properly in Service Portal.

Days of Week: Service Portal