​change the "where" of sql query

I have setup in my query of SQL: Where [global]
this is in a GRID, I have several buttoms to can change the global variable so change the query.
the problem is refresh the GRID after change the variable.
I have tried on :
sc_exit(ref)-> refresh but doesn’t catch the new value. only Repeat the original query
sc_redir(_self). no work, repeat the original query
sc_redir(_blank). work, but it out of the menu application
sc_where_add. work, but the quick search and filter not work and show errors

is there any way to change del query of a GRID?

What code is using into buttons for change the SQL?

[sql_AsuntoUsuario] = ’ A.Responsable06= ‘. [id_empleado] ; (in the SQL query the is a Where [sql_AsuntoUsuario]
sc_redir(G_AsuntosUsuario,’_blank’); // call itself and create a new windows ( I like it was the same)
this is the only way to work. but as I said I try on with sc_exit(ref)

I think you can redesign a little your forms. First can create a app type Control, Into this app can Set your buttons and then each button can Call your Grid with the Parameter for SQL.
and into event onappinit with the macro: sc_select_where(add) = “where campoX > [global]”;

The Grid Must have a button for call The App Control when yopu need change your SQL.