Where are form layouts saved?

Steven G_
Tera Expert

I have challenges from time to time with form layouts, Does anyone know where they are saved within the instance? thank you

1 ACCEPTED SOLUTION

edwajs
ServiceNow Employee
ServiceNow Employee

Hi Steve,



When you make changes to the Form Layout, you are supposed to get one or more sys_update_xml records generated, and the payload(s) should have all of the following:


a)   sys_ui_view


b)   sys_ui_form   *if you have multiple sections


c)   sys_ui_form_section   *if you have multiple sections (tabs)


d)   sys_ui_section


e)   sys_ui_element



When I have needed to fix this for customers, I find all the necessary records in the correct instance, and just XML Export them, and then do an Import XML on the target instance.   And you need to do a cache flush afterwards (cache.do) for the changes to take effect.



Ed


View solution in original post

7 REPLIES 7

Nia McCash
Mega Sage
Mega Sage

In System UI > Forms, you can check the form sections that are available for a particular view.   Drilldown further into each section to see the fields in each section.


Thank you Nia. it has the form section but i am actually looking for the form layout with all the elements that I have on one instance. I deleted some old views and it messed my form layout on my sub instances.


edwajs
ServiceNow Employee
ServiceNow Employee

Hi Steve,



Form layouts are saved in several tables in the instance.



Every table with only a general section will have a sys_ui_section record generated as soon as you attempt to view the form, if it does not exist.   The sys_ui_section will be created in the Default view (the sys_ui_view record where the name is empty and the Title is Default view).



Once the system creates the sys_ui_section record for the form layout, it will then look at the sys_dictionary records for the table and add certain fields to this section.   If you look in the sys_ui_section record, there is a related list for Section Elements (sys_ui_element records) and all of the objects on the form (separators, formatters, fields, etc.) are specified in their own sys_ui_element record.



If you have added additional sections (tabs) to the form layout, there is more complexity, because you will have an addition sys_ui_section record with sys_ui_element records for each section.   However, you also have a sys_ui_form record, and it also has a Form Sections related list, but these are sys_ui_form_section records, and are a many-to-many relationship record to tie the sys_ui_form to the associated sys_ui_section records.



Ed Wajs


Technical Support Developer


Hi Ed,



Is there a way to export the form layout and move it to my other instance? as of now I have been rebuilding them manually. Just interested if there is an efficient way to do it.