Single Dashboard embedding - Controls Settings
Introduction
The Controls Settings is used to override the default filters' value when your users view the dashboard via embed link.
General structure of Controls Settings code
Holistics Controls Setting syntax includes: filter name, hidden, default value, and modifier. It has the following form:
filters = {
"filter_uname": {
"hidden": false,
"default_condition": {
"operator": "expected_operator",
"values": [
"expected_value"
],
"modifier": null
}
},
}
Explanations:
- filter_uname: define which filter you want to override in the embedded dashboard. We have auto-generated the filter name in our sample code.
- values: the value you want to auto-apply in the embedded dashboard
- hidden: has a boolean type, by setting it to
true
, the filter will be hidden in the embedded dashboard (but the default value has already been applied). This option will make your dashboard nicer and cleaner. - modifier (optional): only available for some of the operators in the Date filter (for example, next, last X days/months/years.
How to add Controls Setting
Controls Setting is a useful functionality to override the default filter values and hide existing filters for your embedded dashboards.
If you want to enforce data access restriction so that your embedded viewers cannot view unauthorized data, use Permission Settings instead of Controls Settings.
Please read more about the distinction between the two settings in the Security documentation page.
Let's say you want your embedded dashboard by default to present data in the last 6 months:

To make your dashboard nicer, you can change the hidden
property to true
.
The sample code is shown below:
filters = {
"order_date": {
"hidden": true,
"default_condition": {
"operator": "matches",
"values": ["last 6 months"],
"modifier": null
}
},
}