How to best handle mandatory conditions
I doing the ground work for a CustomExpression builder
Forgetting that for the moment using the Criteria and Or columns how would you handle what I would call mandatory conditions
Simple example
You have table with fields for Total Sales, Area, Category
You want to ask of the database return me all the Total computer and TV sales that are above £100 for the following areas B1 B2 G1 G2
so in SQL
WHERE (TotalSales>100 and (Category='Computers' or Category='TV')) AND (Area='B1' or Area='B2' or Area='G1' or Area='G2')
This is an over simple example and yes I could have used the IN operator but I wanted to emphasize the mix of and's and or's
I assume all of this would have to go in the criteria cell because the Or columns are only ever Or'd with the Criteria and each other ?
If that is the case then perhaps an option to turn off the Or columns when using the custom expression builder as they probably have limited use ?
I've not tested extensively but this does seem to work ticking both the Output column and the field in the Table
It doesn't tick the table if it is an expression eg RTrim(table.field) which is fair enough as there may or may not be a field within the expression