4 Replies Latest reply: Jul 5, 2018 1:08 PM by Mambi Badi RSS

    Adding dimension to an empty table

    Mambi Badi

      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 ?