This macro dynamically adds a condition to the WHERE clause of the grid.