Save values applied on Filters with Session Variables

I have a generic screen that when I click on an item it leads me to the detail screen but when I get back to the main screen the filters applied are reset.

Is there a way I can save what was applied on the filters so when I get back the values remain? It is important to mention that I have not been allowed to use Session variables.

Hi Lucas,


If you are not allowed to use a session variable, I suggest that you create a temporary table, where you save filter values and when you return to the page, you will read the values, and delete them.

On the other hand, you can store everything in one structure and fill in the structure, but it's not so good to have a structure going around in the view state. But if there are few filters, you can pass as input variables.

There are only two suggestions.


Regards,

Nuno Verdasca

Nuno Miguel Verdasca wrote:

Hi Lucas,


If you are not allowed to use a session variable, I suggest that you create a temporary table, where you save filter values and when you return to the page, you will read the values, and delete them.

On the other hand, you can store everything in one structure and fill in the structure, but it's not so good to have a structure going around in the view state. But if there are few filters, you can pass as input variables.

There are only two suggestions.


Regards,

Nuno Verdasca


Can you explain me how would you save the values on a Temp table, and how to read them? I don't have figured it out yet. Can you please explain me if it is using a sreen action to create the temp table and how do I read it on the preparation?

Also I'm using create table() when I read this temporary table on another advanced I get an error

I think what Nuno means is you would have to create a table in your database, where you can store filters information for each user. You may even consider maintaining filters at screen level. Then on every screen when user navigates away from the screen, you can write an action to save the filters. These filters then can be retrieved when user comes back to that screen in preparation logic.Further, you can consider cleaning up this data when user logs out of the application.

Hope this helps!

Thanks,

Junaid

Also it´s not allowed to pass a structure as input parameter and I can seem to create a Temp table, is there a way I can do it, to save and read the values?? I'm not sure how to do it.

Junaid Ahmed Syed wrote:

I think what Nuno means is you would have to create a table in your database, where you can store filters information for each user. You may even consider maintaining filters at screen level. Then on every screen when user navigates away from the screen, you can write an action to save the filters. These filters then can be retrieved when user comes back to that screen in preparation logic.Further, you can consider cleaning up this data when user logs out of the application.

Hope this helps!

Thanks,

Junaid


I was hoping to do it with Temp table, because I am not allowed to create one table only to save the search that has been done. 

lucas ferreira wrote:

Also it´s not allowed to pass a structure as input parameter and I can seem to create a Temp table, is there a way I can do it, to save and read the values?? I'm not sure how to do it.

As Mr Junaid said well, what I meant by the temporary table is what he describes.

You create a table on your Date, which you can call anything like filterParameterTemp, with one attribute per filter, plus the userId, and in preparing the screen in question, always load this table and assign it to each filter's local variable in onChange of each change, always make createOrUpdate value, when navigating from the next page to the previous one he always knows what he had. Then you can be careful how, for example when logging out, you clear the table data so that next time, these local variables have no values.

I don't know if you can understand the idea? But this is a possible solution to your problem, given your restrictions.

Regards,
Nuno Verdasca


lucas ferreira wrote:

Junaid Ahmed Syed wrote:

I think what Nuno means is you would have to create a table in your database, where you can store filters information for each user. You may even consider maintaining filters at screen level. Then on every screen when user navigates away from the screen, you can write an action to save the filters. These filters then can be retrieved when user comes back to that screen in preparation logic.Further, you can consider cleaning up this data when user logs out of the application.

Hope this helps!

Thanks,

Junaid


I was hoping to do it with Temp table, because I am not allowed to create one table only to save the search that has been done. 

Well, temporary table is not an option. Would it be possible for you to extend an existing table to store this information which is already storing some user specific data? Then there are some extreme options, but you might not want to try that like storing information in XML files etc.


Hi! 

Have you tried "cookies"? 

Regards

 Graça