Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Cde: multiple select

  1. #1
    Join Date
    Aug 2013
    Posts
    11

    Question Cde: multiple select

    Hi

    I am trying to create a dashboard that consist from two components: CCC Bar chart and Multiple select component.
    I use the multiply select component for assignment param value, which is using in the datasource. (MDX query):
    ----------------------------------------------
    SELECT
    NON EMPTY {[Measures].[doc_count]} ON COLUMNS,
    NON EMPTY {[Dimension Usage date_publish.Hierarchy date_publish].[date_publish].Members} ON ROWS
    FROM [Docs]
    WHERE CrossJoin({${param_hosts}}, {[event].[active]})
    ----------------------------------------------

    So if i set (multiply select component) property "value array" with pairs:
    ( {arg:[host].[news.com] value:news.com}, {{arg:[host].[somesite.com] value:somesite.com}} ), everything work perfect.
    The parameter is bound to the component receives the correct value, for example: "[host]. [News.com], [host]. [Somesite.com]".

    But if i try to fill the multiply select component from the datasource it become unworkable.
    As DataSource, I use the "sql over sqlJndi" with query: "SELECT distinct (host) as Id, concat ('[host]. [', Host, ']') as Value FROM docs_fact where dim_event_id = 1;"
    The result of this query is a table:

    id | value
    news.com | [host].[news.com]
    somesite.com | [host].[somesite.com]

    Parameter is assigned a value: "news.com, somesite.com"

    Changing the properties of the "Value as id" only affects which of the fields (id or value) will be shown to the user, and the parameter's value is not affected.
    Tell me please, is it possible to specify which of the columns to be used for display to the user and which of the columns to be used to generate results?
    Last edited by vlad_grish; 09-10-2013 at 04:54 AM. Reason: mistake

  2. #2
    Join Date
    Aug 2013
    Posts
    11

    Default

    resolve this problem. the right answer is:

    --------------------------------------------
    No, but you can change the dataset on the clientside using the postFetch function on the multi-select component.
    function (dataset) {

    for (var i=0; i < dataset.resultset.length; i++) {
    var temp = dataset.resultset[i][0];
    dataset.resultset[i][0] = dataset.resultset[i][1];
    dataset.resultset[i][1] = temp;
    }

    return dataset;
    }
    -----------------------------------------
    it works perfect. may be it will help sb else.

  3. #3
    Join Date
    Jan 2013
    Posts
    135

    Default

    Hi vlad_grish,
    as I'm newbie to MDX queries. Can you please help?
    1. how MDX query looks like after using postFetch in MultipleSelect?
    2. are you defining options in MultipleSelect as result from SQL query or are you using values Array in the component?
    Many many thanks for your help!

  4. #4
    Join Date
    Jan 2013
    Posts
    135

    Default

    Hi,
    does anyone has an idea how to do this multiple select?

    Thanks a lot for your help!

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.