Hi,
So I have an edit form component that includes a date picker field and two choice fields. I have a button below my editForm that I run an IF statement on to check against a SharePoint list. My formula for the OnSelect of said button is as follows;
If(
CountRows(
Filter(
CarBookings,
Date = DataCardValue5.SelectedDate && TimeRange.Value = DataCardValue3.Selected.Value && SpaceBooked.Value = DataCardValue1.Selected.Value
)
) && DateDiff(
Now(),
DataCardValue5.SelectedDate
) < 0,
ResetForm(Form1),
SubmitForm(Form1); ResetForm(Form1)
)
It would seem however that my second condition with the DateDiff function is not working potentially. Even when the value of the DateDiff function returns a negative number such as -4 for example the form will still submit when I expect it should just reset. This is just basically to reject any date trying to be submitted that is older than the current day. Can anyone suggest why my form is always being submitted despite ;
DateDiff(
Now(),
DataCardValue5.SelectedDate
)
returning -6 etc.
Thanks

Report
All responses (
Answers (