How to come back to grid by redir mantaining the same filter was active before

Hi, I got a grid (named i.e. grid_test) with left side (Refined Search) where user can choose product category filter.
If he use it to filter product then he can do other things .
At the end of these possible things I do a redir to grid but it’s not connected to filter activated previously .
In this case user has to start from the beginning to filter his data and go trough the path did before.
Question: is it possible in some way to come back using redir to previous grid without showing to user the initial situation not filtered ?

Can you convert the redir to a sc generated link?
Refined searches will persist when coming back from an app called via a link.

I’m doing test using these macro under on_click events just to understand if they can be useful but nothing happens…;-(

$save_current_where = {sc_where_current};
echo $save_current_where;

$save_current_filter = {sc_where_filter};
echo $save_current_filter;

ERRORS [TABLE=“class: scErrorTable, align: center, cellpadding: 0, cellspacing: 0, width: 320, height: 30”]
[TR]
[TD=“class: scErrorTitle, align: left”]Error[/TD]
[/TR]
[TR]
[TD=“class: scErrorMessage, align: center”]Undefined property: grid_TEST_BDGT_apl::$sc_where_atual
[LEFT][SIZE=13px]Undefined property: grid_TEST_BDGT_apl::$sc_where_filtro[/SIZE][/LEFT][/TD]
[/TR]
[/TABLE]

Now I test them under PHP button and something appears…

where ((CATEGORIA IN (‘BDAG; ;BD Aghi’)))

The problem remains becouse the redir then has not possibility to insert sql

Although the topic is more then a year old. This is exactly what I want. It there answer?
Regards Bert Steinebach

Hello Bert,
I made a kind of solution that works for me. I’m not a programmer and I don’t know if there are more ‘intelligent’ solutions… ;-)) . Probably yes… :wink:
By the way the steps I did are the following.

  1. On User master data management I added a multi-select field with business sector of company and related and connected data. Area means business sector.
  2. On Login app, when user login, I added some lines that create a global variable that read sectors on user master data table and rewrite them in a particular way useful to following select
  3. On grid SQL Select I added the clase WHERE … IN ([my_glo_var_with_special_sintax]) .

If you look to attached image probably it will be more clear to you…
Bye
Giovanni

grid_user.jpg

Yes giovanni, that’s the way to go in the moment. In principle I change the WHERE clause dynamic…I give it a try.
Thanks sofar I let you know the results. Regards Bert

Yes, it is succesfull.
In the grid with the refined search I made a extra global on the end of the where clause. i.e [group] in which I put “and xxxx”
xxxx is the field on which I made the selection.
After selecting the filter I fill the global with the field on which the selecting takes place.
On the form I made 2 buttons: One for go back to the main grid (clears up the global] and one to stay to the selecting. You user can choose.
Thanks Bert

There is a better solution:
When you make with “refined search” a search (filter) and want to go from there to a linked form in the result, then open the form in “an other windows” (setting is in the link).
When you come back from the detailed form to the grid, then the search is still there…So simple can it be.

Hi Bert, thanks for suggestion.
SC guys say that it has to be by SC default that refined filter maintains last selection did…
Another question I did , without any reply, was … How can I clear all refined search filters IN ONCE ??? I’m still waiting …
I suggested to insert an “x” like cancelling on top of Refined search column . If you got 6/7/8 filters it could be helpful to clear all in once.