When you query the association of a control, for example, if you select a region for Control A, the province list in Control B contains only the provinces in the selected region for Control A. In this case, you must configure the association between Control A and Control B. You can also associate multiple filters in the same filter bar. This topic describes how to associate a query control with a conditional cascade.
Prerequisites
A dashboard is created. For more information, see Overview and Create a dashboard.
The dashboard has at least two text query widgets. For more information, see Text query widgets.
Background information
Conditional cascading is used to associate one or more query controls. Conditions in query controls support queries from the same dataset or different datasets.
If multiple query controls have different datasets as long as one query condition is different from other datasets, you must select a non-same-source configuration when you cascade the associated conditions.
If the source of the option values in multiple query conditions is the same dataset, you can select the same source configuration or non-same source configuration when you cascade the associated conditions.
NoteIf you use the same data source, it is easier to select the same source configuration, and the effect of conditional cascade is the same as that of non-source configuration.
Limits
Conditional cascade configurations support homologous configurations and non-homologous configurations:
Cascade configuration items
Supported filter types
Same Source Cascade Configuration
Drop-down list from a single dataset
Tree drop
Non-same-source cascade configuration
Drop-down list from a single dataset
You can configure a maximum of five cascade conditions for a single cascade configuration items. If there are more than five conditions, you can configure multiple cascades.
Limits
Upper-level fields can control the display of lower-level fields. However, lower-level fields do not affect upper-level fields. Fields at the same level can affect each other.
NoteHierarchy Relation: Global Controls> Query Controls in Tab> Query Controls in Chart. That is, Global Controls can be cascaded with Global Controls, Query Controls in Tab, and Query Controls in Chart. Query Controls in Tab can be cascaded with Query Controls in Tab, Query Controls in Chart, and Global Controls cannot be cascaded in reverse. Query Controls in Chart can be cascaded with Query Controls in Chart, cascading global controls and in-tab query controls cannot be reversed.
Cannot be cascaded in reverse direction: Assume that the fields contained in Control A are Region and Product Type. After you set the Cascade Product Type parameter, the Product Type parameter cannot be cascaded in reverse direction.
Different filter bars may contain the same fields. For the purpose of easy identification, you can modify the value of Control name in the Basic Settings section.
After cascading conditions are configured, if you hide query conditions that are not configured in the first-level filter, the configuration of the cascading conditions is cleared. However, if you hide the query conditions in the first-level filter, the configuration of the cascading conditions is retained.
The following results occur if you hide the first-level filter after you configure conditional cascade:
Values that can be selected from the sub-level filters are determined based on the default values specified in the first level.
For example, if the Cascading Condition parameter is set to Region Province, City, County and the default value of Region is East China, the City or District options are from the default value of Province in East China.
If you do not configure Set Filter Defaults for the first-level filter, values that can be selected from the sub-level filters are determined based on global parameters.
If you do not configure Set Filter Defaults or global parameters for the first-level filter, the first-level filter does not take effect. In this case, values that can be selected from the sub-level filters are all the valid values.
If you configure both Set Filter Defaults and global parameters for the first-level filter, values that can be selected from the sub-level filters are determined based on global parameters.
Associated Query Control
If you select Drop-down List and select A Single Dataset, you can select Same-Source Cascade or Non-Same-Source Cascade.
If you set Query Condition Type to Tree Drop-down, Same-Source Cascade is supported. You can configure the cascade relationship between the tree drop-down and the same dataset.
The following example shows how to configure the same source configuration and non-source configuration by using the Single Dataset parameter in the drop-down list as a query condition.
On the dashboard edit page, follow the instructions in the following figure to go to the Conditional Cascade page.
The Conditional Cascade Configuration dialog box appears.
Configure conditional cascade.
If the source of the option values in multiple query conditions is the same dataset, you recommend select Same Source Configuration when the associated conditions are cascaded.
If multiple query conditions are specified and the dataset of one query condition is different from the other datasets, you must select Non-same-source configuration.
Configure conditional cascading relationships (same-source configuration)
Assume that Control A is queried in a dashboard, and the contained fields are Region and Province. Control B is queried in a dashboard, and the contained fields are City and Product Category. In this case, the data of query controls A and B are both from the same dataset. You can associate the area in Control A with the city field in Control B. If you select an area in Control A, only the cities in this area appear in Control B.
On the Conditional Cascade Configuration page, click Add Same-Source Cascade Configuration or select Switch to Same-Source Cascade.
If you select Add Same-Source Cascade, you can add cascading relationships without changing the source cascading relationships.
If you select Switch to Same-Source Cascade, the original cascade relationship is changed and the operation is irreversible.
Find the field that you want to query and click the icon on the right.
Select the City field that you want to cascade with the target field.
Click Confirmation.
In this case, if you set Region to Northwest in Search Control A and select City in Search Control B, only the cities in the Northwest region appear in Search Control B.
Configure conditional cascading relationships (non-same-source configurations)
For example, the query fields specified in Filter Bar A are area and product_type, and those specified in Filter Bar B are province and product_sub-type. In this case, the data for controls A and B are from different datasets. After the area and province fields are associated, when you select an area in Filter Bar A, the province list of Filter Bar B displays only the provinces in this area.
In the Cascade configuration items section of the Conditional Cascade Configuration page, select the region of the field and click the icon on the right.
Perform the following configurations:
Select a field that you want to associate with the area field.
The drop-down list may contain multiple province fields. You must select the one in Filter Bar B.
Select an associated field.
NoteThe associated field refers to a field in a dataset. The field is associated with the area field in the filter bar. In this example, the area field in Filter Bar A is an upper-level field and the province field in Filter Bar B is a lower-level field, and the area field you selected is associated with the area field in Filter Bar A.
(Optional)
If you want to configure multiple cascade conditions for Filter Bars A and B, click Add Cascade Configuration Item and repeat steps 1 and 2.
After the configuration is complete, click Confirm and Return.
In this case, if you set Region to Northeast in Control A and Province in Control B, only provinces in the Northwest region appear in Control B.
Modify the conditional cascade configuration.
You can perform the following operations to modify the conditional cascade configuration:
Rename a cascade configuration item.
When you add a cascade configuration item, the default name is Cascade Configuration Items. You can click it to rename it.
Delete a cascade configuration item.
You can click the Delete icon in the upper-right corner of a cascade configuration item to delete it. You can also click the Delete icon in the upper-right corner of the cascade configuration item to delete it.