Ok I've seen two other posts on this but unfortunately I can't relate them to mine. I think it's the same issue but I can't come up with the solution
This is the syntax I have in a text box in a form
With(
{
// generate a one-column table of all dates between start date & end date
gblDateRange: ForAll(
Sequence(dpEnd.SelectedDate - dpStart.SelectedDate + 1),
dpStart.SelectedDate + Value - 1
)
},
If(
And(
IsBlank(dpStart.SelectedDate),
IsBlank(dpEnd.SelectedDate)
),
// show nothing if any date pickers are blank
0,
// include only dates Monday to Friday
If(
conHalf,
CountIf(
gblDateRange,
Weekday(Value) in [2, 3, 4, 5, 6]
) - 0.5,
CountIf(
gblDateRange,
Weekday(Value) in [2, 3, 4, 5, 6]
)
)
)
)
when I submit the form I get the above error. It doesn't prevent the submitting of the data. From what I have read it seems to have something to do with where I'm subtracting the 0.5 and getting a negative value? Not sure how to resolve it..
Any ideas?
Thanks