How to Redirect to Another Page with Selected Data from Vertical Bar Chart in ServiceNow UI Builder?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2025 09:44 PM
Hello Community,
I am working on a drill-down page in ServiceNow UI Builder that includes a vertical bar chart. The chart has the following configuration:
- X-axis: Product name
- Y-axis: Account name
I need to implement a feature where clicking on a bar (representing a product) redirects the user to another page (e.g., "View page"). The "View page" requires one mandatory parameter and three optional parameters.
My requirements are:
- When a user clicks on a product in the bar chart, the selected product name should be passed to the URL.
- The user should be redirected to the "View page" with the selected product name as a parameter.
Could you please guide me on how to:
- Pass the selected product name to the URL.
- Redirect to another page with the selected data.
Any examples or detailed steps would be greatly appreciated.
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2025 12:33 AM - edited 01-15-2025 01:15 AM
all your data related to your chart is in:
event.payload.data
or
event.payload.params
from where ever you need the data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2025 06:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2025 06:08 AM
do you know how to access data in objects?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2025 06:09 AM
yes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2025 06:14 AM
since event is coming OK you should be able to get data that you need from there, you just need to provide correct path to your data. Just expand all nested arrays and objects