How to Display a Selected ServiceNow Report Dynamically Based on a Dropdown Selection?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
We have a requirement to create a dropdown containing a list of all available reports in ServiceNow. When a user selects a report from the dropdown, only the selected report should be displayed to the user.
The selected report can be displayed either:
- On the same page dynamically, or
- On a separate page, depending on the most feasible and OOTB-supported approach.
Could you please advise on the recommended approach to achieve this requirement? Specifically:
- Is this achievable using OOTB ServiceNow functionality without using UI Builder?
- If yes, what would be the recommended component/configuration to create the report dropdown and dynamically display the selected report?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
For the "same page, dynamic" experience you're describing, the standard non-UI-Builder technique is a Content Block on a Classic Homepage or Dashboard. This is a native ServiceNow Reporting/Dashboard capability (not UI Builder, not a custom Service Portal widget) that lets you place a small Jelly-based block next to your report widgets.
The pattern looks like this:
- A g:evaluate block in the Content Block queries the sys_report table to pull all report names/sys_ids the user has access to, and renders them as <option> entries in a <select> dropdown.
- An onchange JavaScript handler on that dropdown either (a) publishes the selected report's sys_id via the Dashboard Message Handler so a Report widget on the same dashboard "follows" it and re-renders, or (b) dynamically swaps an iframe src pointing to the report's render URL.
There are working community examples of exactly this pattern, one shows a dropdown built via g:evaluate + GlideRecord populating a <select>, with an onchange function that calls back via GlideAjax to refresh the displayed content area, which is essentially the same technique you'd apply to reports instead of incidents. Another community thread confirms the Dashboard Message Handler / Interactive Filter mechanism is the intended OOTB way to make one control drive what a report widget displays on the same page.
https://www.servicenow.com/community/platform-analytics-forum/help-with-dynamic-content-block-for-da...
Mark this Helpful/Correct if solves your query.