How to open a dashboard with BloX without opening a new page [Linux]
If you’d like to add clickable buttons or images to a BloX widget that link to another dashboard, our default setting opens the dashboard in a new tab. However, this method allows you to navigate to the dashboard while remaining in the same browser window. Applicable for Sisense on-prem and cloud, all versions. Tested on version L2025.4
Step-by-step Guide
1. Please create a new dashboard and add a BloX widget to it.
2. In the widget settings, select Actions, then choose Create Action. Add a custom action with your preferred name (preferably camel-cased) and the title “Go to Dashboard.” Set the type to “CustomRedirect” and use the following code.
var target = payload.params.targetUrl;
window.location.href = target;
3. Update the code in your BloX widget with the version provided below. Be sure to customize the targetUrl value to match the dashboard URL you wish to use for redirection.
{
"type": "Container",
"actions": [
{
"type": "CustomRedirect",
"title": "Go to Dashboard",
"params": {
"targetUrl": "http://your-sisense-url/app/main/dashboards/your-dashboard-id?h=false" // after ? you put any parameters you want or need
}
}
]
}
4. Confirm the BloX creation, then you should have a result similar to this:
5. When you click the "Go to Dashboard" button, you'll be taken directly to your preferred dashboard in the same browser window, differently from the behavior we have using Action.OpenUrl. This approach can be used for both Native and Embedded Sisense experiences, allowing you to set up customized navigation and redirect flows. Please note: unlike the standard Sisense left panel navigation, which keeps your page view unchanged, this method refreshes the window to present the most up-to-date data. If you prefer an in-page navigation similar to the left panel for any custom development with embedding, we recommend using EmbedSDK. The dashboard.open function allows you to load a new dashboard within the same frame without refreshing the entire page.
References/Related Content
The BloX reference guide can be accessed here:
https://docs.sisense.com/main/SisenseLinux/sisense-blox-reference.htm
And specific documentation about custom actions creation here:
https://docs.sisense.com/main/SisenseLinux/creating-custom-actions.htm
Conclusion
By following these steps, you can create custom navigation between dashboards or pages within your Native or Embedded Sisense application using BloX widgets, all while staying in the same window.
Disclaimer: This post outlines a potential custom workaround for a specific use case or provides instructions regarding a specific task. The solution may not work in all scenarios or Sisense versions, so we strongly recommend testing it in your environment before deployment. If you need further assistance with this, please let us know.