Design Studio 1.3 has a new features for creating application Bookmarks and Personalization.  Bookmarks are a saved navigation state of a Design Studio Application, similar to “Scenarios” in Dashboards Designer (Scenarios are local to the user PC, bookmark information is stored on the BI Platform).  Bookmark and Personalization functionality has been available in SAP BW BEx Web users since BW 3.X days.

Bookmarks can be used in the following scenarios:

  1. Save the Design Studio Application with the Current Filter settings for future access. You can save the Bookmark to the BI Platform and also to the browser favorites.
  2. Share the current Design Studio Application state with other users via URL

Saving Bookmarks:

You can use the command Bookmark.saveBookmark();  to save a Bookmark for the application, this command accepts a title as input.  You can use a text box for users to input text for saving it with some meaningful names for the bookmarks, default Bookmark title is the application name.

You could do Bookmark.saveBookmark(BOOKMARKTXT.getValue());  BOOKMARKTXT is the Input field in DS.


When a Bookmark gets created locally it stores the bookmark information in the folder C:\Users\<userid>\Analysis-workspace\com.sap.ip.bi.zen\repository\__TECHNICAL_CONTENT\BOOKMARK

There are 3 types of files which gets created while creating a Bookmark:

  1. Relations file:  One per DS Application, this file has all the Bookmark ID stored in it.
  2. Properties file: One per Bookmark with Bookmark ID as the file name
  3. BIBOK File: One per Bookmark with Bookmark ID as the file name, this is the file which has all the navigation state information.  The file is in XML format and is very similar to the Bookmark Information stored in RSWRDATA tables in BW system for BW BEx web bookmarks.  Sample XML file below with the bookmark information.

BIBOK File.png

Accessing Bookmarks:

You can view all the Bookmarks available for an Application by using Bookmark.getAllBookmarks(); Command.

Using the new Array function you could load all the Bookmarks to a dropdown box on the start up event of the application. In the example below BOOKMARK_DD is the Dropdown box with the list of Bookmarks.

Bookmark.loadBookmark(BOOKMARK_DD.getSelectedValue());

var array = Bookmark.getAllBookmarks();

array.forEach(function(element, index)

{ BOOKMARK_DD.addItem(element.name, element.text);

});

BIDS_StartUP.png

This will add all the bookmarks for the existing application to the Dropdown box, you can add a command to the On Change Event of the dropdown to load the selected the Bookmark.

Bookmark.loadBookmark(BOOKMARK_DD.getSelectedValue());

To Populate the newly created Bookmark ID to the Dropdown box after saving we need to add the same code above to the On Background Processing event also. If you don’t add it then the Dropdown box will be empty after loading the Bookmark.


If DS supported full JavaScript functionality we could enhance the Bookmark functionality more (I guess their could be other benefits too if there was full JS support… topic for another conversation).  Examples: Share Bookmark URL via mail client using HTML mailto command, Validate user title while saving Bookmark URL.

You could also look at possibly extending Bookmark functionality by leveraging the BI Platform SDK to add the Bookmark URL to user favorites on the BI Platform. I have not explored this option yet.

See screenshot below how the bookmark solution in a real Design Studio Application, users have the option to Save the bookmark with a title and also load the Bookmark by selecting from the Dropdown.


BIDS_BOOK.png


Personalization:


Personalization provides the option for users to Personalize the application with a default view. For example if you want to hide certain components, select certain filter values etc. as the default view everytime you run the application you could do this using the Personalize command.  Users should be trained well on how to use Personalization functionality or they could end up with the wrong or impartial data set views if they personalize with certain filter criteria.

The following methods can be used to Set and Delete Personalization:

State.setPersonalization().

State.deletePersonalization().

Happy Bookmarking!

To report this post you need to login first.

10 Comments

You must be Logged on to comment or reply to a post.

  1. Sonni Jacobsen

    Hi,

    Great help! Thanks for sharing.

    Do you know if there are security/access level that needs to be set for users to use bookmarks?

    Sonni

    (0) 
      1. Jomy Joy

        Hi Deepu,

        I’m trying to test this Bookmark functionality in Local Mode. What I did is teh following:

        1) Added below piece of code in both On Start and On Background Processing Event of the application:

        var array = Bookmark.getAllBookmarks();

        array.forEach(function(element, index) {

          BOOKMARK_DD.addItem(element.name, element.text);

        });

        2) Added below piece of code in the “On Select” Event:

        Bookmark.loadBookmark(BOOKMARK_DD.getSelectedValue());

        Problems facing:

        a) After saving a Bookmark, I’m not able to see the Bookmark ID in the dropdown box unless and until I close the application and run again.

        b) Once I select the Bookmark ID, then that particular Bookmark gets loaded but after that drop down becomes empty

        c) When i launch the application again, the drop down box is again empty even though the repository folder contains all the bookmarks.

        It would be great, if you can assist here.

        Thanks,

        Jomy

        (0) 
        1. Pablo Marcelo Muñoz Nantón

          Hi Deepu, I’m only experiencing problem B, but depending which bookmark you select maybe just one bookmark is displayed or anyone, it’s a really weird behavior.

          • For adding a new bookmark I’m using this:

          var bookmarkname = INPUT_FIELD_BOOKMARK.getValue();

          if (bookmarkname == “”)

          {

            APPLICATION.alert(“Please insert a value”);

          }

          else

          {

            if (Bookmark.bookmarkWithTitleExists(bookmarkname))

            {

            APPLICATION.alert(“Bookmark name already exists”);

            }

            else

            {

            Bookmark.saveBookmark(bookmarkname);

            var bookmarks = Bookmark.getAllBookmarks();

            bookmarks.forEach(function(element, index)

            {

             DD_BOOKMARKS.addItem(element.name, element.text);

            });

            INPUT_FIELD_BOOKMARK.setValue(“”);

            }

          }

          • For loading the dropdown:

          /*Load Bookmarks on dropdown*/

          var bookmarks = Bookmark.getAllBookmarks();

          DD_BOOKMARKS.removeAllItems();

          bookmarks.forEach(function(element, index)

          {

            DD_BOOKMARKS.addItem(element.name, element.text);

          });

          /*End Load Bookmarks on dropdown*/


          I hope this helps!

          Regards,

          Pablo

          (0) 
  2. Martin Chambers

    Deepu,

    Thanks for posting this. I think you should edit it a bit more carefully. Jomy Joy’s question is probably a result of this.

    Examples:

    1. The screenshot with the script for the “On Startup” event is correct. But in the text right before you include an additional, superfluous first ine:
      “Bookmark.loadBookmark(BOOKMARK_DD.getSelectedValue());”
    2. If you look carefully at all the screenshots, you can see that you have used the same script for the “On Startup” event as you have used for the “On Background Processing”. You do not mention this in your text. It would be interesting to know why this is necessary.
    3. I think you should explain in more detail how you have added a command to the “On Change Event” (I think you mean “On Select Event” of the dropdown to load the selected the Bookmark. When I implemented your suggestion, it only worked sometimes, e.g. sometimes I had to load a different bookmark before I could load the bookmark I really wanted. Very strange.

    And finally, I think the DS bookmark has got a huge problem. Even the smallest application change will render all bookmarks obsolete. This severely limits its usefulness for users.

    Cheers,

    Martin

    (0) 
  3. Emil Sjöstrand

    I had some really weird behaviour with my bookmarks list when removing bookmarks.

    When I removed a bookmark from the dropdown menu, the bookmark itself would not disappear until you refresh the application.

    The workaround:

    When deleting a bookmark from the list I use this code:

    Bookmark.deleteBookmark(BOOKMARKS.getSelectedValue());

    BOOKMARKS.removeAllItems();

    Bookmark.loadBookmark(BOOKMARKS.getSelectedValue());

    var array = Bookmark.getAllBookmarks();

    array.forEach(function(element, index)

    { BOOKMARKS.addItem(element.name, element.text);

    });

    This way the list in the dropdown menu will delete all the items it has and then read in all the current boomarks and the list should update accordingly.

    (0) 
  4. arpan gupta

    Hi,

    In my application, I have saved, say 4 bookmarks.A SAVE button saves the bookmarks and add it to a dropdown. ( Saving, Loading, Reading everything is working fine with getAllBookmarks()).

    Now if I open the application again, I have a button to fill the dropdown with all those 4 bookmarks. BUT it is adding nothing.


    Logically, If I open the application again it should point to those 4 saved bookmarks.

    Arpan

    (0) 

Leave a Reply