cancel
Showing results for 
Search instead for 
Did you mean: 

How do I add a conditional button to a BloX widget?

irismaessen
10 - ETL
10 - ETL

I'm slowly, through a lot of trial and error and a lot of help from you kind folks here in the Sisense Community, starting to get some kind of a grip on BloX.

How to work with Conditional formatting or styling however (without resorting to external javascript!) still defeats me, however.

What I want to do: Depending on a value from a panel, I want to either display one button (which opens a JTD), or another (which opens a different JTD). 

I understand that I can define the condition like this:

"conditions": [
{
"minRange": "-Infinity",
"maxRange": 0,
"hide": false,
},
{
"minRange": 1,
"maxRange": "Infinity",
"hide": true,
}
]

and then include the attribute class:condition_container in the action (I think? maybe it needs to be in an actual *Container*?). But how do I pass the value of my panel to the action? Unlike with a text value or even an image, I'm not *displaying* this panel value anywhere.

And if I define my conditions this way, I think I'd just be hiding one button based on a value being greater/smaller than 0. But I would also like to hide/show another button in exactly the opposite behaviour. Do I need to define another set of conditions? Or just specify another formula to get the opposite result?
0 REPLIES 0