cancel
Showing results for 
Search instead for 
Did you mean: 

bookmark in sap design studio

former_member241445
Participant
0 Kudos

Hello.

I'm learning use bookmark recently,but I have some problem now.

First,I found Bookmark.getAllBookmarks() just can get current version value,and everytime I change the application,I will miss all bookmark that I saved before;

Second,I use follow code to save bookmark in a folder,and everytime I enter the application,I will see the bookmark I saved lasttime,and if I changed the bookmark,it will save the last time version,and delete before version.So, it will just one bookmark in service.

//save bookmark
var text=INPUTFIELD_1.getValue();
if(bookid!=""){
Bookmark.deleteBookmark(bookid);
}
if(text!=""){
bookid=Bookmark.saveBookmark(text,"bo_admin520");
Bookmark.assignToFolder("FuzLV1jXrAUAkW4AAAA3OO8AAFBWi0ru", bookid);
}
//get bookmark,and display it
var con=Bookmark.getAllBookmarksByFolder("FuzLV1jXrAUAkW4AAAA3OO8AAFBWi0ru");
con.forEach(function(element, index) {
INPUTFIELD_1.setValue(element.text);
  bookid = element.id;
});

Everything work fine,but when I enter the CMC to see the bookmark,I found it don't remove to the folder I want.And if I remove the bookmark into the folder in CMC as picture one,it return error as picture two.

anyone can tell me why?

And how can I resolve above two problem?

Thanks.

Jing

TammyPowlas
Active Contributor
0 Kudos

Hi - would you please provide the version and SP you are using for BI4.x? For example, BI4.1 SP7, BI4.2 SP3?

Same for Design Studio - 1.6 SP3, SP4?

former_member241445
Participant
0 Kudos

Hi,Tammy.

I'm use Version: 16.2.2 and BI4.2SP3.

Thanks.

Jing

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Jing,

Some tips from my side!

1) When you change a dashboard, this will invalidate the bookmarks currently created. This is currently the design of the Standard bookmark functionality. Through customer feedback, we enhanced bookmarking to include Fragment Bookmarks which cannot become obsolete. You can change your dashboard for example logos, text, even layout, and still load Fragment Bookmarks. The API methods follow Bookmark.FragmentBookmark.<Methods>

2) The unique identifier for standard bookmarks is the TEXT or name of the bookmark. If you save a standard bookmark with the same text, it will overwrite the current standard bookmark with the same name. This is by design for standard bookmarks. For fragment bookmarks as mentioned in 1) the ID is a GUID generated, so this is the unique element and you can use this for if you want to overwrite a bookmark or simply create more.

3) The exception message in the CMC bookmark administration window should not occur no matter what action is performed here, looks to be a bug that should be raised with support.

Could you clarify with what your issue is with the deletion of folders/bookmarks from the CMC? When you delete a bookmark it doesnt remove it from the folder that it is in? Or what you delete a folder it deletes the wrong one?

Thanks,

Conor

former_member241445
Participant
0 Kudos

Hi,Conor.

Thank you for your reply. I'm sussure I was delete the bookmark before I delete it,so I haven't delete wrong one. And after I delete the old one,the new one will instead of it.eg:if I first time input "false",and second time input "true", I will get only one bookmark which is "true".So I was delete the right one.and I just haven't move it to folder,it seens like Bookmark.assignToFolder("FuzLV1jXrAUAkW4AAAA3OO8AAFBWi0ru", bookid) doesn't work.

Thanks.

Jing

Former Member
0 Kudos

Hi Jing,

Sorry for the delay, I was away on vacation.

It's hard to fully understand your scenario from what you have described above. However looking at the scripting you provided in your first post, I would certinly recommend from a design point of view of seperating your save and delete actions into two logical blocks for clarity. You can easily use Global script variables here to do this and call them via scripting when needed. I would also take a look at the templates that we have shipped with Design Studio which show good examples of bookmarking scripting.

I'm not sure from the above what the true/false logic flow is and also it appears that you are deleting a bookmark and then creating a new one? Are you trying to overwrite a bookmark?

Maybe to help you could create a sample dashboard which shows the logic you are trying to implement with bookmarking, it's just quite hard to understand from the workflow above.

Thanks!

Conor

former_member241445
Participant
0 Kudos

Hi Conor.

Thank you for replaying me in your vacation time.

Yes,I'm trying to overwrite a bookmark,and as above code I realize it,but my problem is that I haven't remove it to the folder that I want,and if I remove it in CMC ,it still false,and the page will show above picture error.

Thanks.

Jing