This topic describes how to use a query control to query data based on a text field.

Prerequisites

  • A dashboard is created.
  • A query control is created on the dashboard. For more information, see Create a query control.

Procedure

  1. Select the created dashboard. It contains the following chart and query control.Dashboard to be edited
  2. Click the New filter icon in the query control. In the Query condition setting dialog box that appears, configure the following parameters:
    1. Set the query condition name to Order query.
    2. Select Line chart and the order_level field to associate with the query control.
    3. Set Display type to one of the following values:
      • Drop-down list (formally enumerated filter)

        When Display type is set to Drop-down list (formally enumerated filter), you can set Option value source to Automatic parsing, Single data set, or Enter manually. Option value source indicates the source of available values of the query condition field.
        • When Option value source is set to Automatic parsing, the values of the query field are automatically parsed. Up to 1,000 values can be displayed.
        • When Option value source is set to Single data set, you can select a dataset in the workspace of the current dashboard. We recommend that you select the dataset of the associated chart. The relationships between the associated field, Query Value Field, and Query name field are as follows:Field description
          • The associated field is the field you want to associate with the query control in the chart.
          • Query Value Field is the field in the source dataset that is used to match the associated field.
          • Query name field is the field in the source dataset that is used to filter data. This field is displayed in the query control.
          • Query name field is the same as Query Value Field by default. After you specify Query Value Field, Query name field is automatically set. If the two values are inconsistent, you must manually specify the same value for the two fields.
        • When Option value source is set to Enter manually, click the Enter manually icon. In the manual input dialog box that appears, specify Query value and show name.
          Note
          • If it is the first time that you manually enter the values and Query value and show name are consistent, you only need to specify Query value. After you click OK, show name is automatically set.
          • If it is the first time that you manually enter the values and Query value and show name are inconsistent, you must manually specify both values.
          • If it is not the first time you manually enter the values, you must manually enter the new query value and the show name. If you enter only the query value, the following error message is displayed.Error message
      • Text input box (formally conditional filter)

        When Display type is set to Text input box (formally conditional filter), Conditional form can be set to Single condition, Or condition, or And condition. In this example, Conditional form is set to Or condition.Text input box (formally conditional filter)
      • Tree drop

        When Display type is set to Tree drop (formally cascading query), fields from both the current dataset and another dataset can be selected. Display form can be set to Tree display or Tiled display. Follow these steps to configure Tree display:
        1. Select a dataset and click Start configuration.
        2. In the Tree structure design dialog box, specify Query Value Field and Display name field for each level.
          Note
          • The value of Display name field is the same as that of Query Value Field by default. If the values are inconsistent, you must manually specify the same value for the two fields.
          • Up to four levels are supported.
        3. Click OK.
        After the configuration is complete, you can view the query levels in the left-side navigation pane of the Query condition setting dialog box. You can click the Hide icon to show or hide query levels and click the Hide icon to hide this filter in the query control, but the configurations are retained.Configurations
        Note Quick association is enabled by default. This feature automatically selects associated charts and fields in the same dataset for sub-levels of a tree structure. Click Association chart in the tree structure or the sub-level name in the left-side navigation pane to associate the sub-level with charts and fields in another dataset.Associate chartsFor example, after you click Association chart next to the second level area, associated fields of Line chart 1 and Line Chart 2 that are created based on the same dataset are automatically selected. However, the associated field of Vertical car chart that is created based on another dataset must be manually entered.
  3. Click OK.
  4. In the query control, click Inquire. The chart to which the query control applies is updated. The following figure shows the query results when Display type is set to Tree drop.Text query results