Qlik Community

Ask a Question

Integration, Extension & APIs

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

Announcements
Our May 2021 end-to-end product release from Data Integration to Data Analytics is out! READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
jelindbe
Partner
Partner

How to copy bookmark with expression?

Greetings

I am using .Net SDK and trying to copy user's bookmark. Almost fine except that expression is not available to copy at all.

Missing ExpressionMissing Expression

 

Code example:

 

var local = Qlik.Engine.Location.FromUri(new Uri(qlikSettings.WSSUrl));
local.AsDirectConnection("XXX", "XXX", extendedSecurityEnvironment: false);

var App = local.GetAppIdentifiers().Where(a => a.AppId == appId).FirstOrDefault();

IEnumerable<BookmarkObjectViewListContainer> listBookmarks;

using (var doc = local.App(App))
{
	listBookmarks = doc.GetBookmarkList().Items;
}

Capture2.PNG

Is there a possibility to get saved bookmark expression?

Labels (5)
2 Replies
yko
Employee
Employee

The set expression is actually not part of the bookmark properties, but there is a method on the App class that you can access it with. It's called "App.GetSetAnalysis". The method is available in the latest nuget package, but it doesn't seem to have made its way into the reference documentation from what I can see.

The signature of the method looks like this:

string App.GetSetAnalysis(string stateName, string bookmarkId)

And if you are not using alternate states, you would typically set "stateName" to "$".

jelindbe
Partner
Partner
Author

Thank you. It reads bookmark expression!

How do I set expression back using this method? Will it be set to same user? How is it possible to understand to which particular user original bookmark belongs?