Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have an issue that arise when I try to use the CreateBookmarkEx-method within an extension using QIX.
If I first go to a published application, makes some choices in a table and rearrange the columns.
Then I use the Engine API explorer and create a bookmark using CreateBookmarkEx:
The bookmark is created with the option use current layout setting set to "saved":
But if then create an extension and use QIX and createBookmarkEx-method within the same application (within the same session as when I made the call in the Engine-API explorer), the bookmark is created but the option use current layout setting is not set to "saved":
define( ["qlik", "text!./template.html"],
function ( qlik, template ) {
return {
template: template,
support: {
snapshot: false,
export: false,
exportData: false
},
paint: function ($element, layout) {
var app = qlik.currApp(this);
var qix = this.backendApi.model.enigmaModel.session;
qix.app.createBookmarkEx({
"qProp": {
"qInfo": {
"qId": "",
"qType": "bookmark"
},
"qMetaDef": {
"title": "bookmark-test-02",
"description": "desc"
}
}
});
return qlik.Promise.resolve();
},
controller: ['$scope', function ( $scope ) {
}]
};
} );
Since the bookmark is created the method exists, but it doesn't seems to work in the same way as it does in the Engine API-explorer. What can I do so that the layout setting is being set to saved?
Regards
Jesper
Good morning @_jespers_
I've successfully executed code similar to the one you shared and was able to save the layout. Nevertheless, even though the bookmark indicates that the layout is saved (marked as "saved layout: True"), in practice, the layout doesn't seem to persist. For instance, fields in a table revert to their default positions. Have you encountered and resolved this issue?
var app = qlik.currApp(this);
var qix = this.backendApi.model.enigmaModel.session;
var sheet_id = qlik.navigation.getCurrentSheetId().sheetId;
qix.app.createBookmarkEx({
"qProp": {
"qInfo": {
"qType": "bookmark"
},
"qMetaDef": {
"title": "Bookmark with Layout",
"description": "Bookmark with Layout",
"isExtended": true
},
"sheetId": sheet_id
}
});
return qlik.Promise.resolve();