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

qListObjectDef and qHyperCubeDef in the same extension?

Is it possible to have a qListObjectDef and qHyperCubeDef in the same extension?

1 Solution

Accepted Solutions
Not applicable

Re: Re: Re: qListObjectDef and qHyperCubeDef in the same extension?

Found a solution!

If you put the qListObjectDef inside another object, they don't interfere anymore.

dateField : {

               qListObjectDef : {

                    qShowAlternatives : true,

                    qFrequencyMode : "V",

                    qSortCriterias : {

                        qSortByState : 1

                    },

                    qInitialDataFetch : [{

                        qWidth : 2,

                        qHeight : 1000

                    }]

                },

            },

            qHyperCubeDef : {

                    qDimensions : [],

                    qMeasures : [],

                    qInitialDataFetch : [{

                        qWidth : 10,

                        qHeight : 50

                    }]

                },

                       

        },

4 Replies
erik_wetterberg
Honored Contributor

Re: qListObjectDef and qHyperCubeDef in the same extension?

Yes it is. You can also have multiple hypercubes and listobjects.

Erik

Erik Wetterberg
https://extendingqlik.upper88.com/
Not applicable

Re: Re: qListObjectDef and qHyperCubeDef in the same extension?

I have tried but they seem to interfere with each others. When a field is added it screws up both the dimension and the measure. This is how I tested it and it didn't work.

        initialProperties : {

            version: 1.0,

            qHyperCubeDef : {

                qDimensions : [],

                qMeasures : [],

                qInitialDataFetch : [{

                    qWidth : 10,

                    qHeight : 50

                }]

            },

            qListObjectDef : {

                qShowAlternatives : true,

                qFrequencyMode : "V",

                qSortCriterias : {

                    qSortByState : 1

                },

                qInitialDataFetch : [{

                    qWidth : 2,

                    qHeight : 1000

                }]

            }

        },

        definition : {

            type : "items",

            component : "accordion",

            items : {

                dimensions : {

                    uses : "dimensions",

                    min : 1

                },

                measures : {

                    uses : "measures",

                    min : 0

                },

                field : {

                    type : "items",

                    label : "Fields",

                    translation : "Field",

                    ref : "qListObjectDef",

                    min : 1,

                    max : 1,

                    items : {

                        label : {

                            type : "string",

                            ref : "qListObjectDef.qDef.qFieldLabels.0",

                            translation : "Common.Label",

                            show : true

                        },

How would you set it up?

Not applicable

Re: Re: qListObjectDef and qHyperCubeDef in the same extension?

I get an error

TypeError: Cannot read property 'offsetTop' of undefined


Not applicable

Re: Re: Re: qListObjectDef and qHyperCubeDef in the same extension?

Found a solution!

If you put the qListObjectDef inside another object, they don't interfere anymore.

dateField : {

               qListObjectDef : {

                    qShowAlternatives : true,

                    qFrequencyMode : "V",

                    qSortCriterias : {

                        qSortByState : 1

                    },

                    qInitialDataFetch : [{

                        qWidth : 2,

                        qHeight : 1000

                    }]

                },

            },

            qHyperCubeDef : {

                    qDimensions : [],

                    qMeasures : [],

                    qInitialDataFetch : [{

                        qWidth : 10,

                        qHeight : 50

                    }]

                },

                       

        },

Community Browser