- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2023 07:05 AM
1) I have to create a new list view. as blow
name
serial umber
ip address etc
As i have 100 classes in CMDB i want this new list view as default view for entire CMDB classes, is there any way that i can configure at one place and it cascade to all 100 CMDB classes.
2) As per above requirement the list view should have Name as Descending order by default.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2023 06:31 AM
If your goal is to reset the columns that are displayed in the list view by default, you will need to go to the sys_ui_list table and look for the entries that match the Table and View you want to modify, and then look in the sys_ui_list_element table which will contain the current fields that are part of that list view, and make the necessary modifications or deletions.
A few things to consider before you take this on...
This controls only the default layout. It does not modify the personalized layout. If you truly wanted to reset the personalized layouts, then you would need to delete the entries that have the User populated. This would be very heavy-handed, so I'm not recommending you do that, just explaining how it's done. More to the point: my recommendation is not to mess around with the personalized layouts at all, and only look at the default layouts, if anything. Users probably had a reason to set it up the way they did, even if you might disagree with that reason. Simply advise users that you've updated the UI with new layouts and tell them how to reset their list to column defaults.
Also, note that the CMDB has a very deep hierarchy of classes, and many of these classes have important attributes not found on the parent class. Out of box, there are pre-existing list layouts for several subclasses, which allows that class to display those important attributes. In theory if you wanted to have a standard list layout for all CI classes this implies that you only want the most basic common attributes to be displayed, and you do not want class-specific attributes to be displayed. That goes against what I would consider a positive user experience, but is it doable? Yes. If you were to delete the sys_ui_list elements for all of the CI tables except the base CI class (cmdb_ci) itself, and then modify the list elements for that class, then I believe every other CI class should automatically inherit those settings until they are modified (or until a list layout entry is created for that class). Note that I haven't tried this myself, but I believe that's how it will work. You'll want to test this out on a PDI to be sure.
Finally, I should add that ServiceNow handles list layouts and form layouts rather dynamically, and that means each instance will look different from the other instance based on what users actually do on those instances. This will make it virtually impossible to guarantee that whatever modifications you do in a lower environment will have the expected result when you promote the update set to an upper environment. So really, if you wanted to do this, you would have to take some extra steps like Fix Scripts to ensure that the list layouts you want -- and only those list layouts -- are enabled.
So hopefully you are getting the main message here, that this kind of configuration is likely going to be much more complex than you intend, and may not have a positive effect on end user experience. So I would approach this with caution if you choose to undertake it at all. And test everything, thoroughly!
The opinions expressed here are the opinions of the author, and are not endorsed by ServiceNow or any other employer, company, or entity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2023 06:31 AM
If your goal is to reset the columns that are displayed in the list view by default, you will need to go to the sys_ui_list table and look for the entries that match the Table and View you want to modify, and then look in the sys_ui_list_element table which will contain the current fields that are part of that list view, and make the necessary modifications or deletions.
A few things to consider before you take this on...
This controls only the default layout. It does not modify the personalized layout. If you truly wanted to reset the personalized layouts, then you would need to delete the entries that have the User populated. This would be very heavy-handed, so I'm not recommending you do that, just explaining how it's done. More to the point: my recommendation is not to mess around with the personalized layouts at all, and only look at the default layouts, if anything. Users probably had a reason to set it up the way they did, even if you might disagree with that reason. Simply advise users that you've updated the UI with new layouts and tell them how to reset their list to column defaults.
Also, note that the CMDB has a very deep hierarchy of classes, and many of these classes have important attributes not found on the parent class. Out of box, there are pre-existing list layouts for several subclasses, which allows that class to display those important attributes. In theory if you wanted to have a standard list layout for all CI classes this implies that you only want the most basic common attributes to be displayed, and you do not want class-specific attributes to be displayed. That goes against what I would consider a positive user experience, but is it doable? Yes. If you were to delete the sys_ui_list elements for all of the CI tables except the base CI class (cmdb_ci) itself, and then modify the list elements for that class, then I believe every other CI class should automatically inherit those settings until they are modified (or until a list layout entry is created for that class). Note that I haven't tried this myself, but I believe that's how it will work. You'll want to test this out on a PDI to be sure.
Finally, I should add that ServiceNow handles list layouts and form layouts rather dynamically, and that means each instance will look different from the other instance based on what users actually do on those instances. This will make it virtually impossible to guarantee that whatever modifications you do in a lower environment will have the expected result when you promote the update set to an upper environment. So really, if you wanted to do this, you would have to take some extra steps like Fix Scripts to ensure that the list layouts you want -- and only those list layouts -- are enabled.
So hopefully you are getting the main message here, that this kind of configuration is likely going to be much more complex than you intend, and may not have a positive effect on end user experience. So I would approach this with caution if you choose to undertake it at all. And test everything, thoroughly!
The opinions expressed here are the opinions of the author, and are not endorsed by ServiceNow or any other employer, company, or entity.