Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Filter Component select All value by default

  1. #1
    Join Date
    Oct 2017
    Posts
    2

    Default Filter Component select All value by default

    Hi All,

    I created CDE Dashboard and add Filter Component from Selects group
    How can I select All value by default in Filter Component when open the dashboard?

    Thanks.

  2. #2
    Join Date
    Feb 2014
    Posts
    2

    Default

    This post is a bit old, and you probably found the solution, but perhaps some else could benefit with the answer

    First in the option Advanced Settings paste this function

    Code:
    function options() {
     return { input: { root: { id: "All" } } }
    }
    And in postFetch paste this:

    Code:
    function selectAll() {
        this.dashboard.setParameter(this.parameter, ["All"]); 
    }

    Quote Originally Posted by SashaV View Post
    Hi All,

    I created CDE Dashboard and add Filter Component from Selects group
    How can I select All value by default in Filter Component when open the dashboard?

    Thanks.

  3. #3
    Join Date
    Feb 2014
    Posts
    2

    Default

    Another good idea found it in this topic https://forums.pentaho.com/threads/2...ing-by-Groups/ is use _.pluck

    You need to paste only this in the PostFetch event

    Code:
    function selectAll(data) {
    
        var selectedItems = _.pluck(data.resultset, 0);
        this.dashboard.fireChange(this.parameter, selectedItems);
          
    }
    Quote Originally Posted by goja288 View Post
    This post is a bit old, and you probably found the solution, but perhaps some else could benefit with the answer

    First in the option Advanced Settings paste this function

    Code:
    function options() {
     return { input: { root: { id: "All" } } }
    }
    And in postFetch paste this:

    Code:
    function selectAll() {
        this.dashboard.setParameter(this.parameter, ["All"]); 
    }

  4. #4
    Join Date
    Nov 2009
    Posts
    688

    Default

    Or use filter component as a select field which have a select all possibility

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 - 2019 Hitachi Vantara Corporation. All Rights Reserved.