Multiple forms with same form section

jeremy_gardner
Tera Expert

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

10 REPLIES 10

Hi Jeremy Gardner



Thanks for the solution...


I have reached upto adding new form section on cmdb_ci_server.


however now when I goto Forms and opened the cmdb_ci_win_server record, and in the "Form sections" related list when I clicked on edit option then I don't see my newly created form section of cmdb_ci_server.



also you have said that "Click the magnifying glass next to sys_ui_section". but that is just act as filter to choose from existing options.



Kindly help,


Thanks in advance.



Regards,


Shashank Joshi


Jeremy, thanks for the info.   I've been wondering if this was possible for a while, and just hadn't dove into it.   What I did notice however is that adding the section to forms did not create an update set record.   Is there a way to get that change into the update set?


Anyone who is looking to incorporate this should check out this Share post. It does what I was doing and best of all makes sure all changes are saved to an update set. Special thanks goes to Jonatan Jardi who came up with the code. This is all done within a background script, but works like a charm to get your form up fast.


ServiceNow frustratingly labeled two tables Form Section (sys_ui_section and sys_ui_form_section). Only one of those gets captured in update sets (sys_ui_section). If the other does not get migrated with update sets, the forms are all kinds of messed up. The UILayoutAction script include that jake.mckenna mentioned previously does add the sys_ui_form_section records to update sets, but it does not allow you to configure one form and immediately make those changes visible on other forms. It just copies the form and sections to the tables that you define.



Does anyone know what would be the ramifications of adding the update_synch attribute to the sys_ui_form_sections table? The Wiki strongly recommends against adding this attribute, but it looks like it's possible at least.



ServiceNow really needs to make this process easier.


Hi Jeremy,



I am using multi-tenant environment for our customers. we have overridden the form layout of the parent domain into our child domain by doing like this way: personalize - form layout -> add a field and saved (main section of the form)->captured changes in an update set


After moving this update set to 'test' we have noticed that the related form section of form were missed.


so we again created an update set and created all related section for particular form in respective child domain manually (personlize -form layout - section - new - added all elements - saved).


after the above step in my Form (sys_ui_form) table I can see two forms with same view in child domain.



If I deleted any form record   what will happen to my form layout?


is there any option to disable form?



what is the best practice please suggest me.



thanks in advance for your quick response