Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Filter component cannot show drop down properly

  1. #1
    Join Date
    May 2016
    Posts
    2

    Default Filter component cannot show drop down properly

    Hi, I am new with C-Tools and get a problem when I try to create a CDE Filter component.

    The Filter component is able to return proper parameter which is picked by other queries. The only issue is that it cannot show the contents of the dropdown list. I am using sql over sqlJndi as data source which may cause the problem? I know mdx over mondrian should be the better solution, but mdx has a such a high learning curve. Thanks!

    Name:  Screen Shot 2016-09-29 at 11.38.20 AM.png
Views: 215
Size:  13.1 KBName:  Screen Shot 2016-09-29 at 11.40.27 AM.jpg
Views: 239
Size:  14.5 KBName:  Screen Shot 2016-09-29 at 11.43.26 AM.jpg
Views: 201
Size:  7.9 KB

  2. #2
    Join Date
    Jan 2014
    Posts
    189

    Default

    The Filter Component is expecting two columns: one with the id of the item, and another with the label of the item.

    The case you are presenting is degenerate, in which the label and id have the same origin.
    There are two solutions for that:
    1) modify your query to return two columns. The first will be picked up as id, the second will be picked up as a label.

    2) configure the component to reuse the first column for label. In the advanced options, paste

    Code:
    function(){
      return {
        input: {
          indexes: {
            id: 0,
            label: 0
          }
        }
      };
    }

  3. #3
    Join Date
    May 2016
    Posts
    2

    Default

    Thank you crusso. It works like a charm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2017 Pentaho Corporation. All Rights Reserved.