Forum Discussion

irismaessen's avatar
irismaessen
Data Pipeline
01-06-2023
Solved

How to create custom action based on a BLOX dropdown filter (+Styling the filter)?

I'm currently using the Wiser Filter widget plugin to display some dropdown filters on a dashboard, but I would like to add some more involved filtering (where I potentially apply filters to two colu...
  • Alek_qbeeq's avatar
    Alek_qbeeq
    01-09-2023

    Hey Iris, 

    You can set global rules for css in the first line of blox: 

     "style": "#select_id {  width: 100%;  border: 1px solid;  border-radius: 15px;  padding: 0.25em 0.5em;  font-size: 1.25rem;  cursor: pointer; background: radial-gradient(circle, rgba(238,174,202,1) 0%, rgba(148,187,233,1) 100%);}",

    You'll get something like this: 
     

    Regarding custom action -> How do you pass members to the filter object?
    You can try this: 

    prism.activeDashboard.filters.update(
        {
            'jaql': {
                'dim': "[Brand.Brand]",                 // filter dim
                'title': "Brand",                       // filter title
                'filter': {
                    'members': [payload.data.select_id] // filterText
                },
                'explicit': true,
                'multiSelection': true,
                'datatype': 'text'
            }
    
        }, { 'save': true, 'refresh': true }
    )



    If you are intrested in some more advanced filter dropdown - where you are able to choose single or multiple items in one dropdown, add dependent filter within dropdowns, be able to control look and feel from design panel, I can suggest one of our most popular plugin
     Advanced dashboard filters 


    Best regards, 
    Alek from QBeeQ