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-17-2025 06:37 AM
Am getting the data, the below script is in client script. how can i pass that product value in URL to redirect to next page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 07:00 AM
what is the name of your mandatory parameter on that page where you want to redirect?
also does the product variable contains the value that this page needs as mandatory parameter?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 07:05 AM
Name of the mandatory parameter: product;
Yes it contains the value as shown in below image
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 07:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 08:22 AM
I have added your script in client script as shown below, when i try to save it the page is loading and not saving.