<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Qlik Sense app.bookmark.create: How to Preserve Layout, Including Column Positions? in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-app-bookmark-create-How-to-Preserve-Layout-Including/m-p/2134434#M19409</link>
    <description>&lt;P&gt;Hi &lt;SPAN class="mention" data-mention="@christianborg"&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/104669"&gt;@christianborg&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;, for doing this you have to use Engine APIs. Bookmark API from Capability APIs doesn't offer this.&lt;/P&gt;
&lt;P&gt;You have to use &lt;A href="https://help.qlik.com/en-US/sense-developer/August2023/Subsystems/EngineJSONAPI/Content/service-doc-createbookmarkex.htm" target="_blank"&gt;CreateBookmarkEx method&lt;/A&gt; from Engine API. As you can see from our help, this is an experimental method, but actually this method is used by our product, so you can stay with it.&lt;/P&gt;
&lt;P&gt;Below an example&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "delta": true,
    "handle": 1,
    "method": "CreateBookmarkEx",
    "params": [
        {
            "qInfo": {
                "qType": "bookmark"
            },
            "qMetaDef": {
                "title": "Bookmark with Layout",
                "description": "",
                "isExtended": true
            },
            "creationDate": "2023-11-03T10:23:49.321Z",
            "qIncludeVariables": false,
            "sheetId": "10c25f6a-2d96-42e0-b034-6f27b548984d",
            "selectionFields": "Dim1"
        },
        []
    ]
}&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 03 Nov 2023 10:24:31 GMT</pubDate>
    <dc:creator>alex_colombo</dc:creator>
    <dc:date>2023-11-03T10:24:31Z</dc:date>
    <item>
      <title>Qlik Sense app.bookmark.create: How to Preserve Layout, Including Column Positions?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-app-bookmark-create-How-to-Preserve-Layout-Including/m-p/2133821#M19395</link>
      <description>&lt;P&gt;Good afternoon,&lt;/P&gt;
&lt;P&gt;We are in the process of developing an extension, and one of the key steps involves creating a bookmark. We are utilizing the app.bookmark.create capability API to achieve this. However, we have encountered an issue where certain aspects of the layout, such as column positions in a table, are not being preserved when the bookmark is created.&lt;/P&gt;
&lt;P&gt;Is there a recommended approach or solution to ensure that the layout, including column positions, is properly saved when creating a bookmark?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 16:12:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-app-bookmark-create-How-to-Preserve-Layout-Including/m-p/2133821#M19395</guid>
      <dc:creator>christianborg</dc:creator>
      <dc:date>2023-11-01T16:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense app.bookmark.create: How to Preserve Layout, Including Column Positions?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-app-bookmark-create-How-to-Preserve-Layout-Including/m-p/2134434#M19409</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention" data-mention="@christianborg"&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/104669"&gt;@christianborg&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;, for doing this you have to use Engine APIs. Bookmark API from Capability APIs doesn't offer this.&lt;/P&gt;
&lt;P&gt;You have to use &lt;A href="https://help.qlik.com/en-US/sense-developer/August2023/Subsystems/EngineJSONAPI/Content/service-doc-createbookmarkex.htm" target="_blank"&gt;CreateBookmarkEx method&lt;/A&gt; from Engine API. As you can see from our help, this is an experimental method, but actually this method is used by our product, so you can stay with it.&lt;/P&gt;
&lt;P&gt;Below an example&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "delta": true,
    "handle": 1,
    "method": "CreateBookmarkEx",
    "params": [
        {
            "qInfo": {
                "qType": "bookmark"
            },
            "qMetaDef": {
                "title": "Bookmark with Layout",
                "description": "",
                "isExtended": true
            },
            "creationDate": "2023-11-03T10:23:49.321Z",
            "qIncludeVariables": false,
            "sheetId": "10c25f6a-2d96-42e0-b034-6f27b548984d",
            "selectionFields": "Dim1"
        },
        []
    ]
}&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 03 Nov 2023 10:24:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-app-bookmark-create-How-to-Preserve-Layout-Including/m-p/2134434#M19409</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2023-11-03T10:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense app.bookmark.create: How to Preserve Layout, Including Column Positions?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-app-bookmark-create-How-to-Preserve-Layout-Including/m-p/2134467#M19410</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/145804"&gt;@alex_colombo&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Thank you for your response.&lt;/P&gt;
&lt;P&gt;I successfully executed the Qlik Sense Engine API to create a bookmark using the Qlik Sense Engine Explorer within the Dev Hub. However, I have a follow-up question, and I'm wondering if you can assist with it:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;Is it possible to programmatically connect to a specific user session, perhaps using a tool like Python, before making calls to the Engine API? I'm interested in saving selections and layouts for that session.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Alternatively, can I use the Qlik Sense Capability API to gather layout and selection details and then pass that information to the Qlik Sense Engine API?&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Your guidance on these matters would be greatly appreciated.&lt;/P&gt;
&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 12:24:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-app-bookmark-create-How-to-Preserve-Layout-Including/m-p/2134467#M19410</guid>
      <dc:creator>christianborg</dc:creator>
      <dc:date>2023-11-03T12:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense app.bookmark.create: How to Preserve Layout, Including Column Positions?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-app-bookmark-create-How-to-Preserve-Layout-Including/m-p/2134496#M19411</link>
      <description>&lt;P&gt;1. Could you please describe wht is the main requirement here?&lt;/P&gt;
&lt;P&gt;2. You can read current layout and selections, but I'm not understanding what you mean by "pass this to Qlik Sense Engine API".&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 13:19:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-app-bookmark-create-How-to-Preserve-Layout-Including/m-p/2134496#M19411</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2023-11-03T13:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense app.bookmark.create: How to Preserve Layout, Including Column Positions?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-app-bookmark-create-How-to-Preserve-Layout-Including/m-p/2134505#M19414</link>
      <description>&lt;P&gt;Hi again&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/145804"&gt;@alex_colombo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The primary goal of our extension is to both create a bookmark and trigger an internal API.&lt;/P&gt;
&lt;P&gt;In my previous experience, I've typically interacted with Qlik Sense Engine APIs programmatically using Python. However, I'd like to seek your opinion on whether it would be advisable to call these Engine APIs directly via JavaScript within the custom extension itself. This approach could potentially streamline the process by automatically accessing the sheet layout and selections. What are your thoughts on this?&lt;/P&gt;
&lt;P&gt;Your insights and recommendations would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 13:47:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-app-bookmark-create-How-to-Preserve-Layout-Including/m-p/2134505#M19414</guid>
      <dc:creator>christianborg</dc:creator>
      <dc:date>2023-11-03T13:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense app.bookmark.create: How to Preserve Layout, Including Column Positions?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-app-bookmark-create-How-to-Preserve-Layout-Including/m-p/2134838#M19422</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Good morning&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/145804"&gt;@alex_colombo&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I've successfully executed code similar to the one you shared and was able to save the layout using javacript code. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;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. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For instance, fields in a table revert to their default positions. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Have you encountered and resolved this issue?&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;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();&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="christianborg_0-1699258761764.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/119381i0139413D4891D56F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="christianborg_0-1699258761764.png" alt="christianborg_0-1699258761764.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 08:21:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-app-bookmark-create-How-to-Preserve-Layout-Including/m-p/2134838#M19422</guid>
      <dc:creator>christianborg</dc:creator>
      <dc:date>2023-11-06T08:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense app.bookmark.create: How to Preserve Layout, Including Column Positions?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-app-bookmark-create-How-to-Preserve-Layout-Including/m-p/2134943#M19423</link>
      <description>&lt;P&gt;Hey &lt;SPAN style="color:var(--ck-color-mention-text);"&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/104669"&gt;@christianborg&lt;/a&gt;&lt;/SPAN&gt; , how are you applying the bookmark? By using Qlik app?&lt;BR /&gt;Looking at what product is doing, if you are applying a bookmark from a Qlik app with layout saved, these ar the Engine API calls made:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;ClearAllSoftPatches method called for removing all the possible soft patches applied by the user. This basically reset the whole sheet layout&lt;/LI&gt;&lt;LI&gt;ApplyBookmark. this apply your bookmark&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Instead, if you are applying bookmark from API, you have to do what I have explained above.&lt;BR /&gt;&lt;BR /&gt;About your question in the previous message, you can absolutely use Engine APIs directly from a custom extension.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 12:07:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-app-bookmark-create-How-to-Preserve-Layout-Including/m-p/2134943#M19423</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2023-11-06T12:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense app.bookmark.create: How to Preserve Layout, Including Column Positions?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-app-bookmark-create-How-to-Preserve-Layout-Including/m-p/2134959#M19424</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/145804"&gt;@alex_colombo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your reply.&lt;/P&gt;
&lt;P&gt;I managed to create a bookmark and save the layout using the following code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Adding `&lt;SPAN&gt;"qObjectIdsToPatch": []` did the trick.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;var app = qlik.currApp(this);
var qix = this.backendApi.model.enigmaModel.session;
var sheet_id = qlik.navigation.getCurrentSheetId().sheetId;

qix.app.createBookmarkEx({
	"qProp": {
		"qInfo": {
			"qId": "",
			"qType": "bookmark"
		},
		"qMetaDef": {
			"title": "Bookmark with Layout",
            "description": "Bookmark with Layout",
        	"isExtended": true
		},
		"sheetId": sheet_id,
		"qIncludeVariables": true
	},
	"qObjectIdsToPatch": []
});		

return qlik.Promise.resolve();&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 12:46:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-app-bookmark-create-How-to-Preserve-Layout-Including/m-p/2134959#M19424</guid>
      <dc:creator>christianborg</dc:creator>
      <dc:date>2023-11-06T12:46:31Z</dc:date>
    </item>
  </channel>
</rss>

