Hello,
Intention
I am trying to create a grid that has buttons, which will cause predefined searches over the table.
Ideally I’d like for those to be conditions that work together (so that when two buttons are toggled, both conditions apply).
If possible I’d like for the caption of the button to change as well, depending on what setting it is set to.
What I tried so far
Now I’ve tried using global variables in the SQL where clause, as recommended in a thread in this forum, which by default (in the event “onApplicationInit”) are set to “TRUE” (so that the WHERE clause in the SQL statement reads “WHERE TRUE AND TRUE AND TRUE AND TRUE”). I added buttons, gave them a few IF-clauses that make them cycle through the possible values for the global variables. I was able to prove that they work too, that the global variables actually do get changed by pressing the button. I tried it out the statements in the SQL editor, and they produces the desired result, so it should work methinks.
However, the grid remains unchanged. I’ve tried to redirect to self (sc_redir(nameofapplication)), which works (not including it in all of the if-clauses is how I figured out that the variables must be being set) to load the application again, but does not appear to affect the table content.
What I am looking for
A way to make this work as described above. Is there any way to execute the updated SQL statement based upon which the Grid is filled?
Cheers,
Fred