3 Replies Latest reply: Aug 3, 2015 4:16 AM by Theo Klemming RSS

    Issue with Filter Box / Action Dropdown in Datawatch

    Rakesh Ojha



      Is there any workaround/solution for handling the below requirement related with functionality of Filter Box / Action Dropdown Controller in Datawatch 12.xx or 13.xx


      We have two columns REGION and COUNTRY which are assigned as a part of filter and on the basis of selection criteria my remaining data will populate in next visualization (i.e. Table).


      Criteria for applying the filtration is  as below:

      1. “Select All”  default value should always appear at the top in each of the individual Filter object. And while checked/unchecked over the “Select All”, all values under that filter object will checked/unchecked.
      2. When we select a particular value(s) from first Filter dimension , the dependent second Filter dimension will refresh and show only  related values. eg, when we select  Asia  REGION (Filter1)  value , only Asian belonging countries will appear under COUNTRY (Filter2)


      To achieve the above said requirement, we tried with following approaches but failed to implement:


      Approach 1: Using Soft Filter (Filter Box)

          For using this approach, Criteria A will achieved. “Select All” is appearing  by default with Checked / Unchecked functionality but Failed to achieve Criteria B.

          All values are static at all and interdependent filters values are not refreshed. While Selection of value ASIA under “REGION” filter, Non-Asian values are also appearing in “COUNTRY” filter.

          Ideally, the COUNTRY filter will refresh and show only Asian countries or Vice-Versa.


      Approach 2: Using Action Dropdown [Selection mode: Multiple (Action Dropdown Setting)]

         While trying with this approach, Criteria B will fulfil but  “Select All” inbuilt functionality is not there hence, Criteria A could not achieved by this approach



      Please suggest if there is any more solution for it.




        • Re: Issue with Filter Box / Action Dropdown in Datawatch
          Theo Klemming

          Hi Rakesh


          I understand the challenge you are facing.

          The reason you are not seeing criteria B fulfilled when using approach 1 is that the Filter Box filters works in such way that it hides rows of data from display in other visualizations - but it does not really remove rows of data from the data set loaded. And the filter box is geared in such way that it always reflects the dataset in its unfiltered state.


          I can see a possible solution, which will depend on loading the data from a database so that you can make use of some logic conditions in a SQL query. It will involve a combination of a parameter set with an action drop-down, and a regular Filter box.


          1. Create a data table that uses Region as a parameter. The value of the parameter will be set with an Action Dropdown, and the values available will be all of the existing regions - and a value option like "All Regions" or similar.


          2. The data table that is parameterized for Region must use a query that looks something like this:

          IF ("All Regions" = {RegionParameter})
          SELECT * FROM YourDataTable
          SELECT * FROM YourDataTable WHERE Region = {RegionParameter}


          3. The data table used to populate the Action Dropdown with option values can be created with a query like "SELECT DISTINCT Region FROM YourDataTable" plus a static value "Select All" typed directly into the Text Connector and appended to the data from the query result using Union in Datawatch Designer.

          4. While the Action Dropdown will control the selection of Region (or All Regions), the selection of Country is now possible to handle with a regular Filter box. The options in the filter box will depend on the selection made in the Action Dropdown.

          Now, in case you cannot load your data from a SQL database, but instead from a file or URL where you cannot use a SQL statement, my recommendation is to apply an R transform where the same logic as in the SQL query is applied to the data.

          Best regards, Theo Klemming, Datawatch

            • Re: Issue with Filter Box / Action Dropdown in Datawatch
              Rakesh Ojha

              Hi Theo,

              Thanks for your kind response and I was also implemented the same approach that you exactly explained here.

              Considered REGION under Action Dropdown controller with extra “Select All” value (handled in the query with  UNION).


              Now, the major challenge here is that my user wants that Action Dropdown selection mode should always be “Multiple” (Action Dropdown Setting) so that if they like they can freely select one, multiple or even “Select All”  REGIONs. But when we click over “Select All” checkbox, all values should be Checked or Unchecked automatically depending upon the selection criteria over “Select All” box.


              This user friendly interaction is not happening at all which is very common and expected too.


              Please advice.