Docs
Using the conditional
Another powerful widget in the Blockbax platform is the conditional. The conditional widget allows you to create a container whose content will be shown or hidden based on a configured condition. To use the conditional, navigate to a subject dashboard and add a panel, a conditional requires the context of a subject because the defined conditions will be stored in properties. For the example below, we have two sensors with a property named “Has Outdoor temperature sensor”, one of the subjects has populated this value with ‘TRUE’ and the other ‘FALSE’. The goal of this How-to is to create a conditional that shows the contents when the property value is ‘TRUE’ and hidden otherwise.
- Navigate to your Subjects, and select a subject. In our Example we will navigate to the subject T-001A.
- Enter the Subject “Edit” mode
- Let’s add a panel
- Select the “Conditional” widget type and press “Next step”
- Select the property and property value that you would like to use to determine the visibility of the Conditional; in our case, we will use the “Has Outdoor Temperature Sensor” property. Click “Add panel” to continue.
- Resize and move the panel to your desired position and add a panel in the conditional widget
- Add a new panel to your Conditional. We will add a Line chart with “Measurements” as the data to display
- Select your metric, in our case we will display a linechart of the Outdoor temperature when the conditions are met.
- Select “Render measurement statistics below chart” and press “Add panel”
- Our newly created has been added to the dashboard, be sure to press “Save” to not lose any changes for now
- The conditional has been configured. As you can see above, the property “has Outdoor Temperature Sensor” is set to “True” for this subject, and thus we are able to see the content of the conditional.
- Go to our other Subject by clicking on the dropdown in the breadcrumb
- Below is a screenshot of a subject where the value of “has Outdoor Temperature Sensor” is false, and thus you are able to see that the conditional content is hidden.
- If you would edit the subject by pressing the “Cog wheel” it will show the hidden panel.
Congratulations, you have just configured a conditional to display, or hide, content based on the defined condition(s). Have a look below at a Blockbaxer navigating between two subjects, one where the condition is met, and the other where the condition is not met.













