Avoiding duplicates of Fragment Bookmarks on BI Platform
Portable Fragment Bookmarks are a very powerful and useful feature in SAP BusinessObjects Design Studio. It allows users to create bookmarks of an application and share it with business users. When a bookmark is saved to a folder, users with access to that folder can retrieve the bookmarks.
At Visual BI Solutions, we had a scenario where we had to populate all the fragment bookmarks for an application in a listbox and let the users open the required fragment bookmark. When implementing Portable Fragment bookmarks and running SAP BusinessObjects Design Studio on BI platform mode, we ran into one drawback – that is that the bookmarks get replicated on the platform when different users open the same bookmark. This causes the bookmark folder to have replicas of the same bookmark. When listing the available bookmarks in a listbox, this causes the list to have replicas and the list becomes confusing.
To overcome this, we can use scripting to remove duplicates from the listbox of saved bookmarks and also to delete all the associated(replica) bookmarks when we delete a particular bookmark.
To Load only the original bookmark in the List box:
We can check for duplicates with respect to the title of the bookmarks, since each of the replica bookmarks has a unique id.
var bmk = Bookmark.PortableFragmentBookmark.getAllBookmarkInfos(“ONLINE_COMP”);
//Retrieving all the bookmarks of the folder
var list=””; //String to save the unique bookmark titles
bmk.forEach(function(element, index) {
if(Convert.indexOf(list, element.title)==-1){ //Checking for replica
LISTBOX_SAVED_ANALYSIS.addItem(element.id, element.title);
}
list=list+”;”+element.title; //Adding bookmarks to a listbox
});
To Delete a Portable Fragment bookmark and its replicas:
var title= “”;
if (LISTBOX_SAVED_ANALYSIS.getSelectedValue()!=””)
{
title = LISTBOX_SAVED_ANALYSIS.getSelectedText();
var bmk1 = Bookmark.PortableFragmentBookmark.getAllBookmarkInfos(“ONLINE_COMP”);
bmk1.forEach(function(element, index) {
if (element.title==title)
{
Bookmark.PortableFragmentBookmark.deleteBookmark(element.id);
}
});
LISTBOX_SAVED_ANALYSIS.removeAllItems();
Load the list box as mentioned earlier, so that no more replicas are present.
One limitation of this workaround is that not more than 1 bookmark can have the same name even though the enterprise IDs may change. While creating bookmarks, this is a useful work-around to include in our application to avoid such scenarios during sharing of the bookmarks.
Hi Noel,
I have recently been working more closely with the Design Studio bookmarking functionality but have not been able to replicate the duplicate portable fragment bookmark issue described in this blog post.
What I have found for deployments on the BI Platform is:
1) When different users open the same portable fragment bookmark, the bookmark is definitely not duplicated;
2) When a user attempts to update a portable fragment bookmark created by another user, a new portable fragment bookmark is created under the current user, which is probably by design in order to avoid the original portable fragment bookmark author's bookmark from being overwritten by another user.
Can you provide a scenario with specific steps, or even a very simple sample BI app for download (without any data sources) that replicates the duplicate bookmark issue you have encountered?
Thanks,
Mustafa.
Hi Mustafa,
We had this issue when we implemented a ad hoc analysis application where a super user creates bookmarks and other users can view it. When the bookmarks were opened by users , duplicates where created with same name on the platform.(The bookmarks were not updated just viewed.)
Hi Noel,
This is exactly my point in that I cannot replicate this behaviour. I created a simple BI app that allows one user to create portable fragment bookmarks and other users to view such portable fragment bookmarks, using Bookmark.PortableFragmentBookmark.loadBookmark(). In this scenario, there is no duplication on the BI platform.
How did your ad hoc application implement viewing of portable fragment bookmarks? I am interested to know what different bookmark viewing approach might have caused the duplication in your case because I am not experiencing this issue at all.
Thanks,
Mustafa.