Back Button data issue

Back Button data issue

  

Hi All,

I have page A, I do some search on it and load some results based on search on same page A.
Now, on click of an element in the results on page A, I navigate to page B (I used a link to navigate to page B).
I have a Back button on page B, but when I click on it, it goes to page A but clears out all the results on that page I had earlier (In short it runs the preparation of page A).I tried keeping the Link and the back button having Method as all the three types.

I want the page B to come back to page A with all the search results intact.Any help would be great.

TIA,
Anagha

Hi Anagha,


Do you mean that the filters you applied on page A are reset once you come back?

In that case, you should set them as session variables so when the preparation is run again, the variables will maintain the value.

You need to save the state of each of your filters and results on the first page, and then retrieve them on the next visit to the page.


Excellently, this page (https://success.outsystems.com/Documentation/10/Developing_an_Application/Use_Data/Maintain_State_while_Navigating_across_Screens) will give you examples for both web and mobile.

Hello Anagha,

Navigating to a page will always load that page again.

Possible solutions: 

Pass an ID of the record you wants to see (if it is a "Detail" page, with a form).
Use Session variables to store the values (performance penalty if you have to many or complex data type).

As you didn't specify what you are doing, we can't really point you the best solution, but if you are navigating from a LIST page (where you did a search) to a DETAIL page and come back, usually we use a Session Variable for the value of the search string.

Cheers.

Thanks All for these immediate responses.
I'll explain a bit more.
1. I have 2 drop downs on page A, when I select values is them and click on a search button I get some statistical data for the searched data.
2. Now on this data I click on the facility number and navigate to page B, where I get (big) list of all the error records for that facility.
3. I have a back button on page B, on click of it I want to go to page A with all the statistical data I earlier had with same values in dropdowns as well. But thats not happening now.
It gets me to page A with empty dropdowns and no search results.

Please suggest.

Thanks,
Anagha