Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mambi
Creator III
Creator 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 ?

4 Replies
ErikWetterberg

‌Hi,

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

Erik Wetterberg

mambi
Creator III
Creator III
Author

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

ErikWetterberg

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

Erik Wetterberg

mambi
Creator III
Creator III
Author

Status 101 that's all