Is there a way to programmatically create reports and dashboards?

Dave65
Tera Contributor

Good Day everyone,

Thank you in advance for your help.

 

As part of an application I am building, I need to be able to create reports and dashboards automatically once a user fills in a form with the necessary information. Is this possible, are there API's for this? I looked but was not able to find any API's for this.

 

Thank you again for sharing your knowledge!

 

Dave

2 REPLIES 2

Abhijit4
Mega Sage

As everything is table in ServiceNow, when you create new report, system creates entry in 'sys_record' table.

You can try inserting new record in 'sys_record' table via script which should create report.

For reference purpose you can have a look at existing record on 'sys_record' table to understand which fields you will have to populate so that report will not fail. You also need to consider related list on the table which deals with access and many other things.

Let me know if you have any further queries.

Please mark this as Correct or Helpful if it helps.

Regards,
Abhijit
Community Rising Star 2022

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP

Dave65
Tera Contributor

Abhijit

Thank you for your quick response.

Unfortunately, I do not find the "sys_record" table in any of my images, all of which are on San Diego.

I did however find the "sys_report" table. However, when I view any of the reports listed there, there is a dialog box at the top with the following message: "Please configure this report using Edit Report, and create new reports using View / Run."

This is leading me to believe that because of things that happen in the background, ServiceNow has not provided a way to create reports programmatically unless there is an API for it that I have not found referenced anywhere.

 

Thank you again for your help,

Dave