Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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".
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.
However, when I navigate back to the main dashboard all my sheets are gone.
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.
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
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
}
]
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
}
]
That makes a ton of sense - thank you!
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;
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:
// 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...
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:
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: