Skip to Content
0

BO Design Studio - global variable for page index navigation

Jun 20, 2017 at 07:45 AM

85

avatar image

Hello experts,

I´m working with Design Studio to build up a dashboard and I want to use a "return" button to get back to the last page where the user comes from. The user is able to navigate to a detail page (page index = 5) and this page is accessible from different pages. So the return button should bring the user back and back means it can be two different pages.

So I´m thinking of defining a global variable for this case (name = index, int, default value = 0).

How to use and update this variable then in the application? I tried this one:

When the user wants to navigate to the details the on click script should update the actual pageindex:

// Index get´s updated and user get´s forwarded to the details page

index == PAGEBOOK_1.getSelectedPageIndex(); PAGEBOOK_1.setSelectedPageIndex(4);

When the user want´s to go back from the details page the back button is also containing a script:

PAGEBOOK_1.setSelectedPageIndex(index);

In my case this doesn´t work and the user get´s forwarded to the first page (page index 0) because this is the default value as I defined in the global variables.

Can somebody help me out with this? Many thanks in advance.

Br,

Mario

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Mario Panzenboeck Jun 20, 2017 at 08:03 AM
1

I solved it by myself. The problem was the coding:

index == PAGEBOOK_1.getSelectedPageIndex();

-> should be index = PAGEBOOK_1.getSelectedPageIndex();

Share
10 |10000 characters needed characters left characters exceeded