Announcing the Global SNUG Board of Directors. Learn more here

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
servicenow_live
Tera Contributor

Generate Pivot Table from any table in UI Page

Here we are going to convert the Pivot table from the list of Incident list generated based on query present in Script Include.

(Note: to get the Script Include and UI Page code click here --> https://bit.ly/2SF68iN)

find_real_file.png

Follow the Steps to develop Pivot Table in UI Page:

1. Create Script Include to get the records

-> Navigate to System Definitions > Script Includes.
-> Click New to create New Script Include
-> Name: PivotReportValues
-> Client callable: true
-> Script:

(Note: to get the Script Include and UI Page code click here --> https://bit.ly/2SF68iN)

find_real_file.png

2. Create Script Include to get the records

-> Navigate to System UI > UI Pages.
-> Name: Pivot Table
-> HTML:

(Note: to get the Script Include and UI Page code click here --> https://bit.ly/2SF68iN)

find_real_file.png

Client Script:

(Note: to get the Script Include and UI Page code click here --> https://bit.ly/2SF68iN)

find_real_file.png

3. UI Page Output:

find_real_file.png

UI Page – Pivot table for other tables:

In Script Include modify the table name and query then push the 3 values into the array so that we can generate Pivot Table from the other tables.

find_real_file.png

Comments
Lars Egelund
ServiceNow Employee
ServiceNow Employee

How would this look like if created in service Portal widget?

Version history
Last update:
‎10-06-2020 11:38 PM
Updated by: