Change what fields are visible on HR Case Creation screen based on something other than HR Service

Lyndsay Greer
Tera Expert

When creating an HR case, how can I show and hide fields based on something other than the HR Service? The Case Creation Configuration only allows me to change what fields are displayed based on what HR Service is selected. I need to show/hide fields based on other criteria, like whether the case's source(contact_type) is Phone or In-person, or whether the logged-in user is a member of a specific group. Any ideas?

1 ACCEPTED SOLUTION

Bhavesh Bijagar
Tera Guru

Hi @Lyndsay Greer 

 

There isn’t a built-in, out-of-the-box way to conditionally display fields during HR case creation without applying some level of customization.

 

While the "Case Creation Service Configuration" allows you to control which fields appear based on the selected HR Service, any deeper customization—such as dynamically altering the layout or behavior of the case creation page—requires direct changes to the "case_creation" UI Page. If you choose to go this route, follow these steps:

  • Locate the UI Page: Go to System UI > Pages and find case_creation.
  • Clone Before Editing: Always create a clone of the original page to preserve the default configuration.
  • Modify Client Scripts: Adjust the client-side logic to manage field visibility, validation, or dynamic behavior.
  • Edit HTML Layout: Customize the form layout, add or remove fields, and tailor the visual presentation as needed.

However, this approach involves significant customization and maintenance overhead, and is generally not recommended unless absolutely necessary.


Instead of customizing the UI Page, allow the case to be created using the standard case_creation page, and then use UI Policies on the HR Case form to dynamically show or hide fields based on specific conditions (e.g., HR Service, case type, or user role).

 

This method is more maintainable, upgrade-safe, and aligns with ServiceNow best practices.

View solution in original post

5 REPLIES 5

Good choice.😊