Set a flag on cases generated every Tuesday and Friday

Good morning!
I need to create a virtual column that allows me to set a flag in the cases generated on Tuesdays and Fridays of each week. To select the cases I have columns with dates that allow me to do what I need to do.

The difficulty of this is that the flags should only last for a week, at the end of the week they should disappear, resulting in the following week the flags will be generated again.

Does anyone have a solution to solve this problem?

Thanks!

I found a way to only select the cases generated on Tuesdays and Fridays, but I still can’t figure out how to mark them with a flag that only lasts until the end of the week.

NOT(
IN(
WEEKDAY([fecha_carga]),
LIST(3,6)
)
)

Welcome to the AppSheet community.

If understanding of your requirement is correct, you may want to give the following expression a try

OR(
AND(WEEKDAY([fecha_carga])=3 , HOUR(EOWEEK(TODAY())-([fecha_carga]))/24=4),
AND(WEEKDAY([fecha_carga])=6 , HOUR(EOWEEK(TODAY())-([fecha_carga]))/24=1)
)

Please test well.

EOWEEK() - AppSheet Help

WEEKDAY() - AppSheet Help

3 Likes

Thank you very much, it worked perfectly.

1 Like