cancel
Showing results for 
Search instead for 
Did you mean: 

BO Design Studio - global variable for page index navigation

mario_panzenboeck
Contributor
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

mario_panzenboeck
Contributor

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

index == PAGEBOOK_1.getSelectedPageIndex();

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

Answers (0)