qlik-oss / enigma.js

JavaScript library for consuming Qlik's Associative Engine.
MIT License
209 stars 82 forks source link

object.rangeSelectHyperCubeValues not selecting range #363

Closed cookiejest closed 6 years ago

cookiejest commented 6 years ago

Description

I am trying to use object.rangeSelectHyperCubeValues. However it does not seem to actually make a selection on the range. Here is the enigma.js promises:

                .then(() => object.rangeSelectHyperCubeValues('/qHyperCubeDef',
                    [{
                        "qRange": {
                            "qMin": 160,
                            "qMax": 425
                        },
                        "qMeasureIx": 0
                    }]))
                // Get layout and view the selected values
                .then(() => { return object.getLayout() })
                .then((layout) => console.log('THE OUTPUT', layout.qHyperCube.qDataPages[0].qMatrix)))

It just returns the full hypercube with no range selection made.

Expected behavior

I am expecting it to filter the rows to where the first measure is between 160 and 425

Actual behavior

It returns the full hypercube with no range select

Environment

windows qlik sense desktop

Library
enigma.js 12.20.0 schema
Operating system
[ x] Windows

##### Qlik Sense

[ x] Desktop [ ] Enterprise


### Versions

* Node.js: 8.9.3
* Browser: not using browser
* Qlik Sense: 3.2 SR4
peol commented 6 years ago

Hi @cookiejest. Does the websocket traffic look correct according to the QIX Engine API? If so, you'll have to report the issue on QIX Engine through the proper channels (likely support). If it does not look correct, please attach the websocket traffic you see.

cookiejest commented 6 years ago

im doing this is node.js whats the best way to view the websocket traffic? thanks for the help btw

peol commented 6 years ago

You may use the traffic:* event(s). https://github.com/qlik-oss/enigma.js/blob/master/docs/api.md#event-traffic

cookiejest commented 6 years ago

sent {"delta":true,"hasent {"delta":true,"handle":2,"method":"RangeSelectHyperCubeValues","params":["/qHyperCubeDef",[{"qRange":{"qMin":160,"qMax":425},"qMeasureIx":0}]],"id":4,"jsonrpc":"2.0"}

received {"jsonrpc":"2.0","id":4,"delta":true,"result":{"qSuccess":[{"op":"add","path":"/","value":false}]}}

cookiejest commented 6 years ago

Ok, the engine seems to return a success: true when there is data in the hypercube

and success:false when there is not data that matches the criteria.

I would have expected a blank array back, not a false error message