mindspank / qsocks

A lightweight promise wrapper around the Qlik Sense Engine API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getAllSheets not working?

countnazgul opened this issue · comments

Using the code below i can see that the connection is established and the app is open. The "sheets" object is not displayed.
The return json for the getAllSheets method is:
{"jsonrpc":"2.0","id":2,"error":{"code":-32601,"parameter":"GetAllSheets","message":"Method not found"}}

qsocks.Connect(config).then(function(global) {
    console.log('Connected!');

    global.openDoc('52fb9488-bdf8-4946-a3fb-0a00540befb1').then(function(app) {
        console.log('Open!');

        app.getAllSheets().then(function(sheets) {
            console.log(sheets);
        });
    });
});


Hmm, that seems to be a leftover method from way back. I'll make sure to remove it as it does not exist.

Instead you can use GetAllInfos which will return all the generic objects in the app and their handle.
Just filter the result on qType === 'sheet'

That's it!
Thanks!