Toggle filter for query used by table component

Let’s say I have some filters for Name, UserID and Daterange (two popup calendars). I also have some check box components I want to use to enable/disable these filters. I have a table to display the resulting dataset. I can write the sql so that it resolves any of the above in the where clause.

How can I dynamically change my sql statement when I toggle the check boxes on or off?

What I typically do is add a dynamic property called whereClause that is a string to your filter components. Bind the property to an expression like:if({Root Container.Check Box.selected}, "Something = '" + {Root Container.Comp.text} + "'", "1=1"}You would then add these properties to your SQL query in the where clause:SELECT .... FROM Table WHERE {Root Container.Comp.whereClause} AND {Root Container.Comp 2.whereClause}

Thank you.