I’m working on a product filtering system where users can select multiple price range checkboxes (e.g., “Under 300”, “300-600”, “10k-20k”), and I need to filter products using OR logic - meaning products should match ANY of the selected ranges.
I’ve set up:
-
Input fields for each checkbox (e.g.,
i.price_under_300,i['price_300-600']) -
A “Get list” request with Filter type set to “Or”
-
Multiple filter conditions on the
selling_pricecolumn
The issue: I need each filter to only apply when its corresponding checkbox is checked. When I try to use conditional values like i.price_under_300 ? 300 : null or i.price_under_300 ? 300 : undefined, I get errors like “Invalid input syntax for type numeric: ‘null’” or “Invalid input syntax for type numeric: ‘undefined’”.
I’ve also tried using the “Do not match filter” checkbox with !i.price_under_300, but this gives me “Invalid input syntax for type numeric: ‘true’”.
My question: What’s the correct way to implement conditional OR filters in Wized where each filter condition is only applied when a corresponding input field is true, and completely skipped otherwise?
Is there a way to make an entire filter row conditional, or do I need to use a different approach like Supabase Edge Functions?