Hi Christian, i have tried the same in GridView but its not working. Is there any KB article for this to go-through.
Sorry I thought, the gridview is the triggering object, but you are looking for a way to change the query using a parameter.
If you have a sql data adapter, you can use the parameters in the sql script like here:

I hope, this is what you are looking for?
In the sample, Onestream replaces
|!WFProfileCriteria_TCR!|
with the parameter's value:
= 'Houston.Register'
and executes the query with this where statement:
... WHERE XFW_TCR_Register.WFProfileName = 'Houston.Register' ...