Generate a report using a JavaScript
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 03:58 PM
Hi,
Can we create a report in ServiceNow using a JavaScript.?
I used to do a similar task by creating an intermediate table. JavaScript populates the table and build a report to extract data.
Can we get rid of the middleman which is creating the table?
Thanks, Donald Jayawardena
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 08:24 PM
@Donald Jayaward Yes we can create reports in ServiceNow using JavaScript.
You can load the JavaScript library to build the report for example d3.js in UI Script. And the add the UI Script as dependency in a Service Portal widget. And in the widget on server side you can query the target table on which you want report and construct the object that the JavaScript library (d3.js) needs to build the report. And feed the object in the client side.
Please mark as correct answer if this solves your issue.
ServiceNow Community Rising Star, Class of 2023