cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Blox Card that Jumps to a Specific Widget in a Dashboard?

tbwoodt
7 - Data Storage
7 - Data Storage

I am new to Blox, the dashboards that have been built were done with the standard Sisense elements not Blox. I would like to build blox cards that have a jump-to button that jumps to their corresponding widget that is in the dashboard that has already been built (trying to avoid having to recreate the wheel) Is that something that can be done?

2 REPLIES 2

harikm007
13 - Data Warehouse
13 - Data Warehouse

Hi @tbwoodt ,

Try this:

Create a blox with below script (replace widgetid with your widgetID):

{
    "style": "",
    "script": "",
    "title": "",
    "showCarousel": true,
    "body": [
        {
            "spacing": "medium",
            "type": "Container",
            "items": [
                {
                    "type": "ActionSet",
                    "actions": [
                        {
                            "type": "ScrollToWidget",
                            "title": "Scroll To Widget",
                            "data": {
                                "widgetid": "6298e884a45683002ea8234"
                            }
                        }
                    ]
                }
            ]
        }
    ],
    "actions": []
}

 

Create an Action 'ScrollToWidget' in Blox with below script:

var widgetId = payload.data.widgetid;

document.querySelector(`widget[widgetid="${widgetId}"]`).scrollIntoView({
    behavior: 'smooth'
});

 (Here is how to create an action in Blox: https://documentation.sisense.com/docs/creating-custom-actions)

-Hari

Thanks for your solution! I actually figured out how to do it a different way, I used the standard jump to dashboard script and added the widget id in the path for ex "https:xxxxx/dashboard/xxxxx/widgets/xxxxxx".