Qlik Community

Ask a Question

Integration, Extension & APIs

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

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
simoneantonicchio
Contributor
Contributor

Hypercube Def : PseudoDimension position not change

Hello,

I'm developing an extension to display a pivot table using an hypercube.  Before accomplished this I have created a pivot table into my Qlik sense App to check result that will be cloned into my extension.

The issue is the follow: 

I have: 

- two dimensions: "Model" and  "Country"
- two measures : "FBD" and "LTR"

I wanna obtain this: 
Screenshot_2.png















But I obtain this in my hypercube:
Screenshot_1.png

Below you can see my hypercube def and I think to have setted qInterColumnSortOrder array in the right way. 

 

var myProps = {
    textColor: "black",
    qHyperCubeDef: {
      qDimensions: [],
      qMeasures: [],
      qInitialDataFetch: [
        {
          qTop: 0,
          qLeft: 0,
          qWidth: 100,
          qHeight: 300
        }
      ],
      qInterColumnSortOrder: [0, -1, 1],
      //qPseudoDimPos:1,
      qNoOfLeftDims: 2,
      qMode: "P",
      qAlwaysFullyExpanded: true,
      qIndentMode: false
    }
  };

  var myDefinition = {
    type: "items",
    component: "accordion",
    items: {
      dimensions: {
        uses: "dimensions",
        min: 2,
        max: 2
      },
      measures: {
        uses: "measures",
        min: 2,
        max: 2
      },
      sorting: {
        uses: "sorting"
      },
      settings: {
        uses: "settings"
      }
    }
  };

 

 

Sometimes will be loaded the columns like my qInterColumnSortOrder , but another in this order: -1,0,1.

I don't know where there is a conflict or other issue. 

Have you any idea to solve this? 
 
Thank you all,

Simone

Labels (3)
1 Solution

Accepted Solutions
simoneantonicchio
Contributor
Contributor
Author

I have solved using backend-API method "applyPatches".
With this method i replace column order after render.

 

https://help.qlik.com/en-US/sense-developer/February2020/Subsystems/APIs/Content/Sense_ClientAPIs/Ba...

paint: function($element, layout) {
      var app = qlik.currApp();
        this.backendApi
          .applyPatches(
            [
              {
                qPath: "/qHyperCubeDef/qInterColumnSortOrder",
                qOp: "replace",
                qValue: "[0,-1,1]"
              }
            ],
            true
          )
}
          

View solution in original post

1 Reply
simoneantonicchio
Contributor
Contributor
Author

I have solved using backend-API method "applyPatches".
With this method i replace column order after render.

 

https://help.qlik.com/en-US/sense-developer/February2020/Subsystems/APIs/Content/Sense_ClientAPIs/Ba...

paint: function($element, layout) {
      var app = qlik.currApp();
        this.backendApi
          .applyPatches(
            [
              {
                qPath: "/qHyperCubeDef/qInterColumnSortOrder",
                qOp: "replace",
                qValue: "[0,-1,1]"
              }
            ],
            true
          )
}
          

View solution in original post