Multiple forms with same form section

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2013 09:16 PM
Any reason I can't use one form section with multiple forms? With all of the extended CMDB tables, I figure there are several sections that will be the same across multiple forms, and would be nice just to update that section once and have all forms using that section pick up the changes.
I can see how to do it, and have developed a background script to add that section to all my forms, just curious if that would break something I'm not thinking about.
Or is there a better way that I'm not considering?
Thanks!
Jeremy
- 5,770 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2013 07:31 AM
No, the only real problem with doing it is that there's no way through the UI to do it easily. But as long as you have a good handle on the related record structure, and the script to do it, go for it. Maybe test in a test instance first 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2015 08:29 PM
Would love to know your solution Jeremy. I'm setting up CMDB right now and am looking at needing to replicate a section across all the Server types.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2015 07:33 PM
It's a combination of building forms via the Form Layout and editing the Form/Form Sections directly.
Build up your shared sections on the highest level table in common (eg cmdb_ci_server).
Now go into the Forms table, and find the record for another server type (ie cmdb_ci_server_linux) using the same view (probably Default view). In that record, you'll see the form sections in use. Here you can either add new section or modify an existing one to point to the shared section. Either way, you'll edit the m2m table for Form -> Form Section. Click the magnifying glass next to sys_ui_section. Find the corresponding section from the cmdb_ci_server table and add it. Now they'll both use the same section, and future updates to the shared form section take effect everywhere.
If you have a lot of sections/tables to link, you can also script it. Just a matter of getting the sys_id of the form section you want to share, and updating the m2m table sys_ui_form_section for each form <--> section accordingly.
Let me know if I need to better explain that.
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2015 03:05 PM
Got it, thanks.