Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

mambi
Contributor III

Adding dimension to an empty table

Hello everyone,

I'm trying to add a dimension to an empty table by clicking on a button :

  $element.html( "<button type='button'>Click Me!</button>" );

  $element.on('click', function() {

  app.getObject("PswGnt").then(function(target){

       var patches = [{

                 "qPath": "/qHyperCubeDef/qDimensions/0",

                 "qOp": "add",

                 "qValue":"{ \"qDef\" : {\"qFieldDefs\" : [\"Dim1\"] } } "

            }];

      target.applyPatches( patches, true );

  })

but nothing happens

any idea ?

Tags (2)
4 Replies
erik_wetterberg
Honored Contributor

Re: Adding dimension to a table

‌Hi,

any errors in the console? Does the getObject call succeed?

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
mambi
Contributor III

Re: Adding dimension to a table

no error in the console and  console.log(target) succeed

erik_wetterberg
Honored Contributor

Re: Adding dimension to a table

‌And if you check web socket traffic? Any Messages?

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
mambi
Contributor III

Re: Adding dimension to a table

Status 101 that's all

Community Browser