Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
jelindbe
Partner - Contributor III
Partner - Contributor III

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
Øystein_Kolsrud
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 - Contributor III
Partner - Contributor III
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?