Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
s29124141
Partner - Creator II
Partner - Creator II

Getting table data in mashup.

Hi All, I need help in getting the Qlik Sense table data into javascript object via capability API or any other API. Below is the table that present in data model viewer. I need to fetch this table into my javascript object. Can someone direct me in the right path?

customer.PNG

1 Solution

Accepted Solutions
s29124141
Partner - Creator II
Partner - Creator II
Author

Thanks bill.markham for your response.

I am able to create hypercube and pull the data using createcube method. But above table has the mapping (dimension name and label name) for straight table dimensions that needed for creating hypercube. How do I set the dimension label (Column label) to the defined in the above table dynamically.?

For Example :-

"CustLevel1" column should have "Company" as the column header. This mapping may vary for another app, so looking for generic solution.

app.createCube({

  "qInitialDataFetch": [

  {

  "qHeight": 20,

  "qWidth": 2

  }

  ],

  "qDimensions": [

  {

  "qDef": {

  "qFieldDefs": [

  "CustLevel1"

  ]

  },

  "qNullSuppression": true,

  "qOtherTotalSpec": {

  "qOtherMode": "OTHER_OFF",

  "qSuppressOther": true,

  "qOtherSortMode": "OTHER_SORT_DESCENDING",

  "qOtherCounted": {

  "qv": "5"

  },

  "qOtherLimitMode": "OTHER_GE_LIMIT"

  }

  },

  {

  "qDef": {

  "qFieldDefs": [

  "CustLevel2"

  ]

  },

  "qNullSuppression": true,

  "qOtherTotalSpec": {

  "qOtherMode": "OTHER_OFF",

  "qSuppressOther": true,

  "qOtherSortMode": "OTHER_SORT_DESCENDING",

  "qOtherCounted": {

  "qv": "5"

  },

  "qOtherLimitMode": "OTHER_GE_LIMIT"

  }

  }

  ],

  "qMeasures": [],

  "qSuppressZero": false,

  "qSuppressMissing": false,

  "qMode": "S",

  "qInterColumnSortOrder": [],

  "qStateName": "$"

  },CubeCreatedCallback);

View solution in original post

2 Replies
Anonymous
Not applicable

You need to create HyperCube of your data.  Here is the relevant section of the online help, https://help.qlik.com/en-US/sense-developer/3.2/Subsystems/EngineAPI/Content/Structs/HyperCube.htm

s29124141
Partner - Creator II
Partner - Creator II
Author

Thanks bill.markham for your response.

I am able to create hypercube and pull the data using createcube method. But above table has the mapping (dimension name and label name) for straight table dimensions that needed for creating hypercube. How do I set the dimension label (Column label) to the defined in the above table dynamically.?

For Example :-

"CustLevel1" column should have "Company" as the column header. This mapping may vary for another app, so looking for generic solution.

app.createCube({

  "qInitialDataFetch": [

  {

  "qHeight": 20,

  "qWidth": 2

  }

  ],

  "qDimensions": [

  {

  "qDef": {

  "qFieldDefs": [

  "CustLevel1"

  ]

  },

  "qNullSuppression": true,

  "qOtherTotalSpec": {

  "qOtherMode": "OTHER_OFF",

  "qSuppressOther": true,

  "qOtherSortMode": "OTHER_SORT_DESCENDING",

  "qOtherCounted": {

  "qv": "5"

  },

  "qOtherLimitMode": "OTHER_GE_LIMIT"

  }

  },

  {

  "qDef": {

  "qFieldDefs": [

  "CustLevel2"

  ]

  },

  "qNullSuppression": true,

  "qOtherTotalSpec": {

  "qOtherMode": "OTHER_OFF",

  "qSuppressOther": true,

  "qOtherSortMode": "OTHER_SORT_DESCENDING",

  "qOtherCounted": {

  "qv": "5"

  },

  "qOtherLimitMode": "OTHER_GE_LIMIT"

  }

  }

  ],

  "qMeasures": [],

  "qSuppressZero": false,

  "qSuppressMissing": false,

  "qMode": "S",

  "qInterColumnSortOrder": [],

  "qStateName": "$"

  },CubeCreatedCallback);