Due date color and show/hide

Hello guys,
I’m a newbie on bubble and start building a little “ToDo” app to understand databases etc.
I have two use cases now where I don’t understand to set the right parameters.

First things first:
I use a repeating group row to show new tasks. And I built a button called “overdue”.

So, first of all: I want to highlight every task with a due day older than today red and every task with due date today in green. (Due day in future is just black)
How can I do this?

Second: If the button “overdue” is active (toggle on), I want to hide every task with due date in the future.
I duplicated my group and say “show whole regular list include overdue” (and “hide overdue list”) when “overdue”-button is toggle off and say “hide regular list” (and “show overdue list”) when “overdue”-button is toggle on.
It works, but I have no idea how to say “show in overdue repeating group just tasks with due days older than today”.

Do you have any ideas or ressources? (Maybe you also know a course to understand conditional logics better?)

Thanks,
Sven

Hi Sven,

I would probably create a conditional expression within the cell of the rg “when due date is <current date/time”
change colour to red

and for current day i would write a similar expression “when due date: extract day is current date/time: extract day”
change colour to green

Im not sure i’m understanding the multiple RG’s, i would use one RG with all the tasks and use conditional expressions again to alter the data source of the group to filter the tasks depending on when due. So if the toggle was on for overdue you could write an expression stating when “toggle” is yes data source search for tasks filtered by due date < current date.

Im not too great at explaining things but hope it may help a little.

Hey Zoe,
great. It’s exactly what I’m looking for. I just had a stupid mistake in my mind. Thank you!