Boolean "AND" Search for RG Data Type - help needed

I’m trying to create a page that shows orders that can be filtered by which placed the order. That works well. But then I want a checkbox that, when checked, further filters out “Expired orders”.
The first bit works well using a 'Search and Autocorrect" box and it displays orders that match the entered criteria.
BUT when I try to add another condition to filter out expired orders, that doesn’t work. I had really just assumed that Bubble treats additional conditions as “AND” conditions but I’m not sure now…

Here are a couple of screenshots…I hope it helps explain what I’m doing. Can anyone tell me how I achieve filtering out expired orders?


Conditionals are read in order, from top to bottom, so if you have the same conditional multiple times (as you do here) then the last one will be the one that is applied…

So your first condition will be met if the checkbox is checked, and the datasource will be set to that.

Then the second condition will also be met (because it’s the same as the first one), so the final data source will be that set in the final conditional.

If you want both things to be applied to the datasource just use single conditional with both constraints (check the ignore empty constraints box).

1 Like

Thank you for this. So it’s basically saying Check and act on Condition 1 THEN Check and act on Condition 2 and over ride condition 1?

Could I trouble you to expand on your comment “If you want both things to be applied to the datasource just use single conditional with both constraints (check the ignore empty constraints box).” because this is exactly what I need to do but I can’t get it to work when checking the ignore empty contraints box.

Ignore my previous message. Thank you ever so much. You’ve solved my conundrum. I needed to walk away and unplug my brain for a minute or two.
So basically the “Conditionals” happen one at a time, in order, with a NEXT command between them. Adding extra contraints will add perform an “AND” search? That’s my understanding and it now works.
Thank you very much for your help.

1 Like

Yes, because both the conditions are true (they’re the same) AND the thing to change is the same (the data source). You can only have 1 data source for an element, so in this instance it will settle on the final conditional’s data source.

Adding extra constraints will add perform an “AND” search?

Yes, within a single search all constraints are treated as AND - so only results that match ALL the constraints will be returned.

1 Like