Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
nvrphanikumar
Creator
Creator

Dynamic Hypercube

I'm trying to build a hypercube based on dynamic selection of columns from a mashup.

For example, I have a drop down button that allows user to select the columns they are interested in

<select id="JODtls-val" class="form-control form-control-sm">

                              <option selected="" disabled="">Job Details Filters</option>

                              <option value="[Job Function]">Job Function</option>

                                <option value="[Job Family]">Job Family</option>

                                <option value="[Job Code]">Job Code</option>

                                <option value="[Job Title]">Job Title</option>

                                <option value="[Band]">Band</option>

</select>

Based on the Options selected,I would like to build a hypercube with the columns selected.

I'have started to experiment this with the some hardcoded values in a array variable which works with hardcoding of array indexes.

I'm trying to achieve this dynamically ,If a user selects 3 values from a Option HTML Select tag, the same number of columns should be passed on to hypercube .

var Phani =  ["Band","Project","Sub Project"];

app.visualization.create(

  'table',

  [

    "[Job Opening ID]","[JO Status]",

// for (let i = 0; i < arr.length; i++) {  //I TRIED TO PLAY THIS FORLOOP TO PASS ALL THE ARRAY OBJECTS BUT IT DIDNT WORK

//   Phani ;

// } ,

Phani[0],Phani[1],Phani[2],

    {

      "qDef" : {

        "qDef" : "1",

        "qLabel" : "Number"

      }

    }

  ],

  {"title" : "Hyper Cube"}

).then( function ( visual ) {

  visual.show( "HyperTable" );

} );

Any suggestions/recommendations to make this work ?

2 Replies