cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with bookmarking in Design Studio 1.6 ...

Former Member
0 Kudos

Dear Experts,

we are currently working on a Design Studio project at one of our customers.

One of the requirements is to safe the current state of the cockpit with all filter settings. We have decided to use the bookmarking feature within Design Studio since it provides the required functionality in theory. There are several blogs and guides out there which describe how to achieve our requirements. Unfortunately, none of these worked for us. We have checked the following guides:

http://scn.sap.com/community/businessobjects-design-studio/blog/2014/05/29/working-with-bookmarks-in...

http://visualbi.com/blogs/design-studio/general/bookmarks-and-personalization-in-sap-design-studio/

Requirement in detail:

The customer wants to safe the current cockpit state via bookmarking. This bookmarking feature is realized via script behind a button. The idea behind is that the user can enter a name for a bookmark in an input field. By pressing the save button the bookmark will be saved with the given name in the system. After this step, the newly created bookmark is distributed to a drop down menu. This drop down menu shows all bookmarks available in the system. If the user selects a bookmark in the menu, he will be able to either load the bookmark or to delete the selected bookmark. So far, so good.

Now, we experience some problems with this feature:

1. The pocedure works well, as long as we are working on the BI Platform. It doesn't work in local mode.

2. The application.alert event only works in local mode, it doesn't work with BI Platform.

3. Independing in what mode we are: If we restart our application, no bookmark is loaded although all bookmarks are stored in the system - the drop down is empty.

Please see our coding below:

On Startup event:


DROPDOWN_KOAR_BM.removeAllItems();

var array = Bookmark.getAllBookmarks();

array.forEach(function(element, index)

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

});

INPUTFIELD_KOAR_BM.setValue("");

On Background Processing event:


DROPDOWN_KOAR_BM.removeAllItems();

var array = Bookmark.getAllBookmarks();

array.forEach(function(element, index)

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

});

INPUTFIELD_KOAR_BM.setValue("");

On button save bookmark:


var bookmarkname = INPUTFIELD_KOAR_BM.getValue();

if (bookmarkname == "")

{

APPLICATION.alert("Please enter a valid name");

}

else

{

if (Bookmark.bookmarkWithTitleExists(bookmarkname))

{

APPLICATION.alert("Bookmarks already exists");

}

else

{

Bookmark.saveBookmark(bookmarkname);

var bookmarks = Bookmark.getAllBookmarks();

bookmarks. for Each(function(element, index)

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

});

INPUTFIELD_KOAR_BM.setValue("");

Button load bookmark:


Bookmark.loadBookmark(DROPDOWN_KOAR_BM.getSelectedValue());

DROPDOWN_KOAR_BM.removeAllItems();

var array = Bookmark.get AllBookmarks();

array.forEach(function(element, index);

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

});

INPUTFIELD_KOAR_BM.setValue("");

Any suggestions how to solve our issues with this feature?

Thank you in advance,

Karsten

Accepted Solutions (0)

Answers (5)

Answers (5)

0 Kudos

Hi everybody,

is there any solution to this Problem. I am working with DS 1.6 SP02 P2 and Bookmarks do not work in local mode.....

Best regards

Stephan

MustafaBensan
Active Contributor
0 Kudos

Hi Stephan,

So that your issues can be addressed more specifically by the community, I would suggest posting a new discussion question describing exactly the problems you have encountered with local mode bookmarking in DS 1.6 SP02 P2, including screenshots and script code.

By the way, is your issue limited to local mode only?  Does the same application work as expected when deployed to the BI Platform?

Regards,

Mustafa.

Former Member
0 Kudos

Ty all for your answers,

@Nico

Found out by myself meanwhile - TY anyway.

@Ingo

OSS message created - let's see what SAP will say.

BackgroundProcessing entry is required - otherwise the bookmarks are not shown.

In fact, I faced another issue, which is pretty odd for myself.

All bookmarking features implemented run as expected. But, the problem now is that all bookmarking features run just once - at the second try I will get a JavaScript error.

Example:

I got two bookmarks in the system. If I load the template and select the certain bookmark to be loaded it works fine. If I load in a second step the second bookmark, then I will get a JavaScript error.

If I refresh my webbrowser and try to load the second bookmark afterwards, then it works fine. But, loading the first bookmark, which was fine before, then I will get the same JavaScript error.

Everything I do related to bookmarks, creating, loading or deleting, it works just once unless I refresh my browser window.

Does anybody of you guys got such a behaviour before? Maybe some caching issue?

Thank you in advance,

Karsten

j_vandersterren
Participant
0 Kudos

How did you go on the OSS message?

Former Member
0 Kudos

Hi guys,

thank for your answers.

@Ingo

Nice to read you again. We met each other at a SAP executive training in Walldorf in 2013, but i am afraid, you don't remember

Regarding my issues:

After a lot of testing and debugging, I have found some very interesting aspects. My coding looks in the initial state as follows:


TEXT_USER.setText("Hallo " + DS_KOA.getInfo(().user + " - Herzlich Willkommen!");

TEXT_DATE.setText("Aktuelles Datum " + APPLICATION.getInfo().dateNow);

// Here is a blank line in my Startup script

DROPDOWN_KOAR_BM.removeAllItems();

var array = Bookmark.getAllBookmarks();

array.forEach(function(element, index);

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

});

INPUTFIELD_KOAR_BM.setValue("");

I found out that the system has got problems with blank lines within the coding. In my case this means that the whole coding after the blank line will be skipped. I assume this as a bug.

If I remove the blank line, the system almost works as expected. Almost, because the application alert is still not working. At this stage I don't have a clue why

Best regards and TY,

Karsten

P.S: The coding within the BackgroundProcessing was meant to update the drop down menu. But, i guess, it is not required.

Former Member
0 Kudos

Application alerts are only working in local mode resp. on local execution.

Use APPLICATION.createErrorMessage, .createInfoMessage or .createWarningMessage instead :-). (Make sure that the application property "Display\Display Message Types" is set accordingly.)

Best regards

IngoH
Active Contributor
0 Kudos

Hello Karsten,

the fact that it runs without the empty / comment line and it doesn't without - that sounds pretty strange and in case you can repeatedly reproduce it then I would open an OSS case with SAP.

regards

Ingo

IngoH
Active Contributor
0 Kudos

Hello Karsten,

the code looks correct. Whats the reason for having the same code at onStartup and onBackgroundProcessing ?

regards

Ingo

MustafaBensan
Active Contributor
0 Kudos

Hi Karsten,

Your code works for me when the app is reloaded, although I'm not sure about the need for the Background Processing script.  You can download my exported BI app from the following link and then import into your Design Studio for testing:

Dropbox - SCN_BOOKMARKING_ISSUE-20160201223105.zip

Regards,

Mustafa.