Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Change a parameter value on click action

  1. #1

    Default Change a parameter value on click action

    Hello

    I want to initialize a parameter in CDE by used Click action on a pie chart. I had already done that on a server with pentaho 5.2 and it works fine.
    Recently, I installed the new version of Pentaho server 7.0.0.0.25. I did new dashboards and tried to initialize a parameter using the clickAction but it doesn't work...
    I have create a simple parameter "my_parameter" and the following function on the clickAction :
    Code:
    function f(scene){
        alert("you have clicked on"+" "+ scene.getCategory());
        Dashboards.fireChange('my_parameter',scene.getCategory());
    }
    And if I want to print the value of 'my_parameter' in the clickAction function, nothing happens. I have the impression that my parameter doesn't exist.

    Any help will be greatly appreciated

  2. #2

    Default

    Maybe your dashboard is using Requirejs, in which case you should write 'this.dashboard.fireChange' instead of 'Dashboards.fireChange'.

  3. #3

    Default

    Thanks for your response bhericher but it doesn't work.
    But when I make 'alert(scene.getCategory());' the correct value I want to assign to my parameter pops up in an alert box.
    But if I do the same with my parameter 'alert(my_parameter);' I have no alert box.

  4. #4

    Default

    I haven't yet used the version 7, but you could try to delete and recreate the parameter in the editor.

  5. #5

    Default

    I solved the problem. Thanks bhericher.
    Code:
    function f(scene){ 
    dashboard.fireChange("my_parameter",scene.getCategory());
    }

  6. #6
    Join Date
    Feb 2017
    Posts
    7

    Default

    hello,
    i have the same problem did you found a solution to solve it,
    i think that it's a bug
    thanks.

Tags for this Thread

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.