Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Passing Two Parameters From one Table to the Next in CDE

  1. #1
    Join Date
    Aug 2013
    Posts
    2

    Exclamation Passing Two Parameters From one Table to the Next in CDE

    Hello All,

    I have been browsing through and have not found any posts that explicitly answer my question. i am trying to pass two parameters from one table to the next I tried using firechange but it does not seem to work. here is my Clickaction code of the first table.
    function(a,b){

    Dashboards.fireChange('drilldate1',b.value);
    enodeb=a.series;
    }
    simple stuff but not updating the table I have also tried to put my enodeb parameter in a firechange statement but that does not work either. The thing is i want to click on one row of my table and have it select the value in the first column and the value in the second column for my two parameters respectively is there any way to do this?.

    Thanks all,
    Cliff

  2. #2
    Join Date
    Dec 2010
    Posts
    304

    Default

    Hi Cliff,
    try with
    Code:
    function(obj) {
        Dashboards.fireChange('drilldate1', obj.value);
        enodeb = obj.series;
    }

  3. #3
    Join Date
    Aug 2013
    Posts
    2

    Default

    Hey lukolap that does work! Thank you
    I was wondering if there was a way to have the second column value be passed on when you click on the first column so if i clicked on my first column (enodeb) then that series value and the next column value (drilldate) will be used right now it only works if you select the the value in the second column (drilldate). SO in conclusion I want the same thing to happen as the code above but it will work when you click a row the first column not the the second column.

    Hope that makes sense!

    Thank you again

  4. #4
    Join Date
    Dec 2010
    Posts
    304

    Default

    If you want to know what obj contains, add this statement inside the function:
    Code:
    console.log(obj);
    Then open your browser console (if you use Firefox press Ctrl + Shift + k), click a row in your table (which column is not important) and see that object content.

    obj has these properties:
    - category (the column header value)
    - colFormat
    - colIdx (the index of the clicked column)
    - rawData (an object containing the result of the query used for the table)
    - rowIdx (the index of the clicked row)
    - series (the first value in that row)
    - tableData (an array containing all the values in that row)
    - target
    - value (the clicked value)

    In your case, set
    Code:
    Dashboards.fireChange("drilldate"; obj.tableData[1]);
    If you want update drilldate parameter only when you click the first column, you have to check that colIdx == 0

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.