Qlik Community

Qlik Sense Integration, Extensions, & APIs

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

Not applicable

BackendApi ApplyPatches for dimensions reorder


I'm writing my own custom extension and I'd like to implement similar functionality to one present in native Pivot Table Extension which allows to change order of selected dimensions by dragging buttons, without entering edit mode. Since change which is done in Pivot Table is not permanent I assume that ApplyPatches method is used there with qSoftPatch flag set to true.

In my own extension so far I was not able to change the order of dimensions, because I receive error 'Patch value not on valid JSON format.'

My approach was to take one of the dimensions from Layout's qDimensionInfo, stringify it and apply it under different index like this:


  { qPath: '/qHyperCube/qDimensionInfo/0', qOp: 'replace', qValue: JSON.stringify(layout.qHyperCube.qDimensionInfo[1]).split('"').join('\\"') },

  { qPath: '/qHyperCube/qDimensionInfo/1', qOp: 'replace', qValue: JSON.stringify(layout.qHyperCube.qDimensionInfo[0]).split('"').join('\\"') },

  ], true);

Is this approach valid? If yes why am I receiving format errors?

Community Browser