using custom fields can be as easy as this (as an addition to an existing sql filter, we'll assume you already have something like "state NOT IN ('AL','FL')" and you'll be adding a custom field requirement.
To add "in_ground_pool" must be "Y":
- Code: Select all
state NOT IN ('AL','FL') and lead_id IN (select lead_id from custom_1111 where in_ground_pool = 'Y')
Downside: List ID is hard coded. To get multiple lists included, you'll need to perform a "join" inside the "select" or use multiple nested "or" statements, but be careful to nest them properly.
If you require a "null" value record to be returned instead of ignored (ie: omit those with "N" but accept "Y" and NULL):
- Code: Select all
state NOT IN ('AL','FL') and lead_id IN (select lead_id from custom_1111 where in_ground_pool = 'N' or in_ground_pool IS NULL)
Because of the way custom field tables are created, for maximum custom field flexibility, this is cumbersome but at least moderately possible.