when you load a bookmark, your filters get modified. This is caused by the way how filters interact with variables and multiple data sources (last variable values wins after bookmark load). Example for this scenario – Bookmarks not work when more than one filter panel is used in an application
if you face such scenario, you can do following:
- save your filter per data source somewhere – eg. hidden text component
- save the bookmark
and on load:
- load the bookmark (which also contains the hidden component with the filter values
- apply the filter values explicitelly after the bookmark is loaded
Script for Save
// assure your filters are acutal TEXT_FILTER.setText(DS_1.getFilterExt("0BC_PERS1")); // save bookmark var bookmark = Bookmark.saveBookmark(); // add on drop down DROPDOWN_1.addItem(bookmark, DS_1.getFilterExt("0BC_PERS1"));
Script for Load
// load selected bookmark var bookmarkId = DROPDOWN_1.getSelectedValue(); Bookmark.loadBookmark(bookmarkId); // now, apply the saved filter from the hidden text DS_1.setFilterExt("0BC_PERS1", TEXT_FILTER.getText());
you can use also such hidden fields to store yourselt any other information in the bookmark, as bookmark is saving everything what is in the application. More in Insides on Bookmarking blog.
An Application with example can be downloaded at the BIAPP Repository (name: SCN_STORE_RESTSTORE_FILTERS) :
- KarolKalisz/DesignStudioBiAppRepository · GitHub
- or take it as newest ZIP: Releases · KarolKalisz/DesignStudioBiAppRepository · GitHub
I hope this helps.