Hi there!
I'm currently creating a form that only allows each person to make reservations for a maximum of 3 times a week. So if one already have 3 reservations in the same week recorded on my sharepoint list, then when the person make the 4th reservation on the same week, an error message will be shown on my canvas app. Can anyone assist me in my code, it doesn't seem to be working:
If(CountIf(SharepointList,ReservedBy=DataCardValue4.Text && DateValue(Text(ReservedDateinSharepointList,DateTimeFormat.LongDate))>=DateValue(Text(DateAdd(DataCardValue5.SelectedDate,1-(Weekday(DataCardValue5.SelectedDate,Monday)),Days),DateTimeFormat.LongDate)) && DateValue(Text(ReservedDateinSharepointList,DateTimeFormat.LongDate)) <= DateValue(Text(DateAdd(DataCardValue5.SelectedDate,7-Weekday(DataCardValue5.SelectedDate,Monday),Days),DateTimeFormat.LongDate)))>3,"You can only make 3 bookings per week.","")