To prevent refresh of a page

Hi,

 In the first page i have some filtered values when i click on the link it used to redirect to the next page but when i press the back button i don't want the value of first page to get refreshed but i need to retain only the filtered value. How can i achieve this using outsystems. 

Thanks,

Ronan T.


Please go through the web app Tutorial in the below link

There is a session variable section where they exactly do this

https://www.outsystems.com/learn/lesson/884/session-handling/



coder kamath wrote:

Please go through the web app Tutorial.


There is a session variable section where they exactly do this

Hi coder kamath,

yes i have tried that one..after redirecting to the  previous page i am able to see the only value which i entered in the filtering box not filtered records.


Regards,

Ronan T.


Ronan T wrote:

coder kamath wrote:

Please go through the web app Tutorial.


There is a session variable section where they exactly do this

Hi coder kamath,

yes i have tried that one..after redirecting to the  previous page i am able to see the only value which i entered in the filtering box not filtered records.


Regards,

Ronan T.


In that case maybe your preparation is not rerunning, did you try putting a breakpoint and see if the flow is coming to the preparation again ?


coder kamath wrote:

Ronan T wrote:

coder kamath wrote:

Please go through the web app Tutorial.


There is a session variable section where they exactly do this

Hi coder kamath,

yes i have tried that one..after redirecting to the  previous page i am able to see the only value which i entered in the filtering box not filtered records.


Regards,

Ronan T.


In that case maybe your preparation is not rerunning, did you try putting a breakpoint and see if the flow is coming to the preparation again ?



wait your preparation is running again that is why you are getting the full details, Maybe session variables getting empty somehow can you post a pic of the Filters you used

Hi coder Kamath,

This is how I have implemented search

Thanks,

Ronan T.



In the preparation instead of assigning DummySTCountries_SearchKeyword = ""

assgin Session.STCountries_SearchKeyword.





For not this should work I guess. I am travelling at the moment will look at your complete implementation later in few hours

In your case I noticed you have implemented search with a Different screen action. There are Multiple ways you can make this work.

1. Using  Javascript On Document load function to trigger the search button.

2. Moving the Logic inside RefreshSTCountryTable to be with preparation and using empty action instead of RefreshSTCountryTable to retrigger the preparation

etc

Hi,

I was able to trigger the search button using Jquery but I need to clear the input fields of filters to which I am using session variables how can I do that. 

If the user logins and copies the url and paste it in other page the value of input fields will be reflected in that input field I don't want that to happen how can I achieve it.

Thanks,

Ronan T.


# to clear, just give the session variable a NULL value

# ajax refresh the field input then

# talking about URL, read this:

https://www.w3schools.com/tags/ref_httpmethods.asp

Solution

Ronan T wrote:

Hi,

I was able to trigger the search button using Jquery but I need to clear the input fields of filters to which I am using session variables how can I do that. 

If the user logins and copies the url and paste it in other page the value of input fields will be reflected in that input field I don't want that to happen how can I achieve it.

Thanks,

Ronan T.


Same user or diffrent user ? If diffrent user then he will have entirely diffrent session. Just because a Url is copied does not mean session  or cookies are copied. 


If same user is copying and pasting in the same browser session then what's the problem in him seeing the same filter again. He is the one who set the filter at the first place.


Also you can make Jquery click on reset button if he is not coming from the back button ??. By looking at what Url from which this page was called


Solution