Is it possible to have multiple list views but one form view?

ashwanikumar
Tera Expert

Hi All,

I want to create different views for different modules to show list of records but only one form view.

Is it possible in servicenow?

Thanks,

Guru

1 ACCEPTED SOLUTION

mofostraub
Giga Contributor

Ashwani Kumar wrote:



Hi All,



I want to create different views for different modules to show list of records but only one form view.


Is it possible in servicenow?



Thanks,


Guru



To answer your question, yes it is possible. We have used this approach a few times in our system but it does have some unusual behavior to keep tabs on. The logic is something like this:



If no records exist in all sys_ui tables for a given view - ServiceNow will render the 'default' view when a form is requested. The solution is to ensure that no View specific records exist in each of these system tables:



  • sys_ui_form
  • sys_ui_section
  • sys_ui_element


This can easily create problems though if you forget and use Personalize Form / Form Designer to generate a custom view. If this happens you will have to repeat the process mentioned above and then clear/invlidate cache for the instance.



Best of luck,


View solution in original post

2 REPLIES 2

Michael Fry1
Kilo Patron

The problem is, views are on the table, not Lists or Forms. You could force a view using a view rule, but because the role view_changes is contained in the itil role, they could easily change the forced view to another.


mofostraub
Giga Contributor

Ashwani Kumar wrote:



Hi All,



I want to create different views for different modules to show list of records but only one form view.


Is it possible in servicenow?



Thanks,


Guru



To answer your question, yes it is possible. We have used this approach a few times in our system but it does have some unusual behavior to keep tabs on. The logic is something like this:



If no records exist in all sys_ui tables for a given view - ServiceNow will render the 'default' view when a form is requested. The solution is to ensure that no View specific records exist in each of these system tables:



  • sys_ui_form
  • sys_ui_section
  • sys_ui_element


This can easily create problems though if you forget and use Personalize Form / Form Designer to generate a custom view. If this happens you will have to repeat the process mentioned above and then clear/invlidate cache for the instance.



Best of luck,