Qlik Community

Qlik Sense Integration, Extensions, & APIs

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

ikomlyakov1929
New Contributor III

getRowCount() method returns wrong result

Hello!

I have an extension that should react different in case of lack of data. So for example i have table with one dimension and one measure.

I ticked the condition NullSuppression for dimension, so I do not want to get null values of dimension.

After that I implement c couple filters to get the situation when I haven't got any data.

BUT when i call method this.backendApi.getRowCount(), it returns me 1 row, and the method this.backendApi.getDataRow(0) returns me the following:


Getrowcount.JPG

All the values are null. Why do QS returns me row count = 1?

Qlik Sense November 2017

2 Replies
erik_wetterberg
Valued Contributor III

Re: getRowCount() method returns wrong result

Hi,

Your first cell is a dimension, qElemNumber -2 means it is collapsed,(check NxCell definition here) is this a pivot table?? Looks like you get one collapsed cell in an empty pivot table.

Erik

Erik Wetterberg
https://extendingqlik.upper88.com/
ikomlyakov1929
New Contributor III

Re: getRowCount() method returns wrong result

Hi Erik,

I define my HyperCube like this:

initialProperties:{

            version: 1.0,

            qHyperCubeDef: {

                qDimensions: [],

                qMeasures: [],

                qInitialDataFetch: [{

                    qWidth: 50,

                    qHeight: 50

                }]

            }

        }

As I understand, by default qMode is DATA_MODE_STRAIGHT

Community Browser