Limit days according to promotion

I need to limit the days allowed to select a shift, according to the selected days in an enum list of another table:

The enum list of the PROMO table contains:
MONDAY
TUESDAY
WEDNESDAY
โ€ฆ Every day of the week.

According to the promotion, it is applied to certain days of the week.
I try to put a Valid if constraint in the field type date [Event Date]

WEEKDAY ([PROMO ID]. [Days])

And it gives me error โ€œParameter 1 of function WEEKDAY is of the wronh typeโ€

How should I do it? Is there any way that in addition to giving validation error message, block the selection in the calendar of the days not allowed?

Thank you so much

0 0 303
0 REPLIES 0
Top Labels in this Space