Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Unable to Create Sheets through Qlik Engine or API

I'm attempting to create a Qlik sheet through the Engine API but am experiencing odd errors. From the start, you can see my application has a sheet, "test sheet 1".

Screen Shot 2017-02-09 at 11.08.33 AM.png

I then attempt to create a new sheet through the Engine API Explorer, which gives a successful response - this leads me to believe the sheet was created.

Screen Shot 2017-02-09 at 10.36.24 AM.png

However, when I navigate back to the main dashboard all my sheets are gone.

Screen Shot 2017-02-09 at 10.36.32 AM.png

I can only view my sheets after I logout then log back in. Even though it's show in the dashboard, the title is missing.

Screen Shot 2017-02-09 at 10.38.30 AM.png

What is the correct way to create a sheet? I used the methods described in the tutorial, but they are clearly not working. Please advise

1 Solution

Accepted Solutions
Alexander_Thor
Employee
Employee

So the Engine API is just the communication protocol between clients and QIX. Hence the documentation will document how to interact with QIX. Now it's important to understand the the Engine API does _not_ document Qlik Sense Client implementations. So when the documentation talks about a "Sheet" it's the concept of called a "Sheet" but not the actual Qlik Sense client implementation of a sheet.

To your question, the easiest way to see which specific properties the Client implements is to use the Engine explorer to fetch a sheet that has been created and then get the properties for said sheet.

This is currently how the Client implements it's definition of a Sheet (Note that the Engine has no concept of a sheet, it only sees a GenericObject with some known properties prefixed by a q and unknown properties implemented by the Client)

"qInfo": {

    "qId": "<object id>",

    "qType": "sheet" //The client groups objects of type "sheet"

},

"qMetaDef": {

   // Some custom properties to control display within the client

    "title": "My new sheet",

    "description": ""

},

"rank": 0, // Sort order in app overview

"thumbnail": {

    "qStaticContentUrlDef": {}

},

"columns": 24, // Grid size

"rows": 12, // Grid size

"cells": [ // An array of objects that are present on the sheet, GenericObjects that are Children of the sheet oject

    {

        "name": "kfJAy",

        "type": "barchart",

        "col": 0,

        "row": 0,

        "colspan": 12,

        "rowspan": 12

    }

]

View solution in original post

5 Replies
Alexander_Thor
Employee
Employee

So the Engine API is just the communication protocol between clients and QIX. Hence the documentation will document how to interact with QIX. Now it's important to understand the the Engine API does _not_ document Qlik Sense Client implementations. So when the documentation talks about a "Sheet" it's the concept of called a "Sheet" but not the actual Qlik Sense client implementation of a sheet.

To your question, the easiest way to see which specific properties the Client implements is to use the Engine explorer to fetch a sheet that has been created and then get the properties for said sheet.

This is currently how the Client implements it's definition of a Sheet (Note that the Engine has no concept of a sheet, it only sees a GenericObject with some known properties prefixed by a q and unknown properties implemented by the Client)

"qInfo": {

    "qId": "<object id>",

    "qType": "sheet" //The client groups objects of type "sheet"

},

"qMetaDef": {

   // Some custom properties to control display within the client

    "title": "My new sheet",

    "description": ""

},

"rank": 0, // Sort order in app overview

"thumbnail": {

    "qStaticContentUrlDef": {}

},

"columns": 24, // Grid size

"rows": 12, // Grid size

"cells": [ // An array of objects that are present on the sheet, GenericObjects that are Children of the sheet oject

    {

        "name": "kfJAy",

        "type": "barchart",

        "col": 0,

        "row": 0,

        "colspan": 12,

        "rowspan": 12

    }

]

Anonymous
Not applicable
Author

That makes a ton of sense - thank you!

Not applicable
Author

I actually liked @Alexander's response, but It didn't make sense to me: specifically I didn't understand how it addressed @Dylan's original question.

Judging from Dylan's screenshot, and his reference to this Create sheets > create app objects example, he used the CreateObject.

Alexander pointed out that creating an object may not create the Qlik Sense Sheet (i.e. something that appears in the app overview; aka Alexander's "actual Qlik Sense client implementation of a sheet" -- I will call it a "Qlik Sense Sheet") That's how I'm interpreting this from Alexander:

So when the documentation talks about a "Sheet" it's the concept of called a "Sheet" but not the actual Qlik Sense client implementation of a sheet.

Then Alexander recommends a "Get" strategy before doing a "Create" strategy, so we can see that a "Qlik Sense Sheet" actually has...

In other words, Dylan created an Object with these properties:

{ "title": "Sheet Test", "description": "Description of sheet 1", "qInfo" : { "qType" : "sheet" } }

Alexander points out that a Qlik Sense Sheet actually has these properties (only a subset shown here)

{ qInfo: {  "qId": "<object id>",  "qType": "sheet" },  "qMetaDef": {      "title": "My new sheet",  "description": ""  }, "rank": 0, ... }


At least one difference between these things is highlighted in green;

  • Dylan's Object had custom title and description properties at the "root",
  • whereas Alexander's Qlik Sense Sheet had title and description properties beneath "qMetaDef"

Maybe this difference is why, as Dylan said:

Even though it's show in the dashboard, the title is missing.

So presumably , Dylan can fix (fixed) the missing title by defining title beneath qMetaDef, vs title at the root.

Furthermore , highlighted in blue:

  • Alexander's Qlik Sense Sheet had a custom property called "rank", which his comment explains:

// Sort order in app overview

So presumably if Dylan cared about order, he could change it by modifying the rank property.



Is my analysis correct? Dylan and Alexander, please correct me if I'm wrong.


I still don't understand how Dylan fixed the issue he described:

However, when I navigate back to the main dashboard all my sheets are gone.

Maybe by defining a Sheet object "properly" according to the syntax Alexander Got for us, then the Qlik app overview would respect sheets properly? Who knows...

Not applicable
Author

At least for me, Qlik version 3.1 SR4, if I create a new sheet with most of the properties Alexander describes (except for "Id"):

{

  "handle": 1,

  "method": "CreateObject",

  "params": {

  "qProp": {

  "qInfo": {

  "qType": "sheet"

  },

  "qMetaDef": {

  "title": "My new sheet",

  "description": ""

  },

  "rank": 0,

  "thumbnail": {

  "qStaticContentUrlDef": {}

  },

  "columns": 24,

  "rows": 12,

  "cells": []

  }

  }

}

I observe:

  1. I see an invalid state on my App and the new Object I just created. I expect this, since they both Changed.
  2. I can immediately see the new sheet in the App Overview on a different tab with the title "My new sheet"
  3. The App Overview on a different tab has an asterisk in the <title> (i.e .shown in Browser/tab header), until I do one of:
    • "Save" in the App Overview UI,
    • or execute a DoSave in the Engine API Explorer
Øystein_Kolsrud
Employee
Employee

I can recommend the tool "Qlik Explorer for Developers" if you want to investigate the property structure of Qlik Sense entities. You can find more information (and instructions for download) at this site:

Qlik Explorer for Developers is here!