- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 01-26-2018 12:40 PM
Have you ever struggled with the task of documenting the layout and content of the forms used in your ServiceNow instance? Did you find it time consuming and really boring? Wouldn't it be great if you could just pull out a list of every layout of every view of every form in you instance — instantly? Well, you can… by using a database view.
Follow these steps to create the Database View needed.
Create a database view
To start with you need a new database view.
- Select System UI/Database View in the Navigator
- Click New
- Enter the following information
- Name: u_forms_documentation
- Label: Forms Documentation
- Description: Database View to collect layout of forms
- Save
Add Tables to database view
Then you need to add tables to the view.
- In the View Tables section click New
- Enter the following information:
- Table: Form Section [sys_ui_section]
- Variable prefix: Section
- Order: 100
- Click Submit
Add another table.
- In the View Tables section click New
- Enter the following information:
- Table: Section Element [sys_ui_element]
- Variable prefix: Section
- Order: 200
- Click Submit
The database view should now contain 2 tables and look like this:
Add fields from tables
The fields to be display in the database view needs to be defined for each table.
- Click the sys_ui_section table
- In the View Fields section click New
- Select the following fields and click submit for each field and then repeat for the next.
- table
- view
- caption
- sys_id
- Click update to close the View Table for sys_ui_section.
- Click the sys_ui_element table
- In the View Fields section click New
- Select the following fields and click submit for each field and then repeat for the next.
- element
- position
- type
- sys_ui_section
Do not close this view.
Map tables by adding Clause
The two tables in the Database View needs to be mapped together using a Where Clause.
- Open the sys_ui_element view table if you closed it
- Add the following statement
- Where Clause: element_sys_ui_section = section_sys_id
- Click update to close view
- Click update
Adjust list view
In order to have the Database View present the data properly in a useful manner the list view needs to be adjusted.
- Open the newly created Database view
- Click the "Try it" related link on the form
- Use the Cogwheel to personalize the list
- Add the columns in the following order
- Table
- View
- Caption
- Element
- Postion
- Type
- Click OK
Use the Database View
The Database View is now ready to instantly display a summary of the layouts of your forms. The columns represent the following information.
- Table: The table used by the form
- View: The View the layout represents
- Caption: The name of the sections on the form
- Element: The fields, formatters, separators of the form
- Position: The position of the element within a section
- Type: The type of element
The Database View benefits from grouping and filtering.
Filter a specific table to show forms for this table and then group the Views to separate the layouts for each View.
- 2,167 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks for a great guide
im also thinking abut how to add policy information that would impact the visibility of sections
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
perfect guide to follow,
but for view sys_id in all list ( incident ; users; my categories; my items etc)
sysID (section_sys_id) is not present in :configure>list layout (avaiable list of fields)
sysID (section_sys_id) is not present in :configure>form layout (avaiable list of fields)
I don't remember how, but in istanbul, I was done in few steps.