Qlik Community

Qlik Sense Integration, Extensions, & APIs

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

moleroalonso
New Contributor II

Problem with method "CreateObject" when qType="sheet"

Hi,

I'm trying create a "sheet" throught API Engine with "CreateObject" but instead of create a sheet the method removes all sheets and new sheets can't be create from the GUI, the app becomes useless.

I follow theses steps:

-1 Connect to Engine

-2 Open doc, with OpenDoc method

-3 Send a CreateMethod request:

     {     "jsonrpc": "2.0",

          "id": 1,

          "method": "CreateObject",

          "handle": 1,

           "params": [

               { "title": "Sheet 1",

                 "description": "Description of sheet 1",

                 "qInfo": {

                         "qId": "SH01",

                         "qType": "sheet" },

          "qChildListDef": {

           "qData": { "title": "/title",

                          "description": "/description",

                          "meta": "/meta",

                          "order": "/order",

                          "type": "/qInfo/qType",

                          "id": "/qInfo/qId",

                          "lb": "/qListObjectDef",

                          "hc": "/qHyperCubeDef" } } } ] }

The response is:

{

    "jsonrpc": "2.0",

    "id": 4,

    "result": {

        "qReturn": {

            "qType": "GenericObject",

            "qHandle": 2,

            "qGenericType": "sheet",

            "qGenericId": "SH02"

        },

        "qInfo": {

            "qId": "SH02",

            "qType": "sheet"

        }

    },

    "change": [

        1,

        2

    ]

}

Thank you!

1 Solution

Accepted Solutions
erik_wetterberg
Valued Contributor III

Re: Problem with method "CreateObject" when qType="sheet"

Hi,

If you want to create a sheet that works in the client it must have some additional data, or your app will not work at all in the client. Check out this thread: Unable to Create Sheets through Qlik Engine or API

Hope this helps

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
2 Replies
erik_wetterberg
Valued Contributor III

Re: Problem with method "CreateObject" when qType="sheet"

Hi,

If you want to create a sheet that works in the client it must have some additional data, or your app will not work at all in the client. Check out this thread: Unable to Create Sheets through Qlik Engine or API

Hope this helps

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
moleroalonso
New Contributor II

Re: Problem with method "CreateObject" when qType="sheet"

Thank you Erik!