Matching current month with Option Set?

I have an option set create for Months, which I use to say when a database food item is in season. A food item could have multiple months. What I’m trying to do is do a bunch of views where it shows lists based on which ones are in season now and next month.

I set up a custom state to store the current month, but IDK how to ‘match’ that with item(s) in the option set. No matter what I try, I seem to get errors. I spent 8 hours on this going in circles, and I’m pretty new to Bubble so this is quite frustrating! HELPPPP! :slight_smile:

Presumably your option set has an attribute of ‘number’ (1-12)

So just extract the month from the current date and match it to the option set number.

It does - it’s the actual matching function that I’m struggling to understand. How do I “Match” it?

Use a filter on the option set.

Aha! It was a bit fiddly but I got there with Type of Content: Food, Data Source: Search for Food > Month Ready contains All Month Numbers:filtered(This Month Numbers’s number is Current date/time: extract month):first item. (writing it here for when I accidentally delete it and need to remember what I did. PHEW! Thank you!

1 Like