Duration Column Type: 0 value is invalid?

I have a column called “Over Time hours” which I have set to type “duration”. But the form is not accepting a 0 value in the corresponding field, it says “this value is invalid” even though I haven’t written anything in the validif field for the column.
Please help.

Solved Solved
0 8 765
1 ACCEPTED SOLUTION

Thanks for the very helpful screenshots!

The problem is simple: within expressions (i.e., in the app editor), Duration values must be enclosed in quotes, and the hours component must have at least three digits.

Your initial value is 00:00, but it should be "000:00:00".

The minimum-three digits in the hour components is how the app editor differentiates Duration values from ordinary Time values (which will never have more than two-digit hour components).

View solution in original post

8 REPLIES 8

Steve
Platinum 4
Platinum 4

Could you provide a screenshot that shows the error?


hi Steve, attached!

Is there an app formula or initial value expression for the OT Hours column? If so, what is it?

Hi Steve, here are the screenshots.




Thanks for the very helpful screenshots!

The problem is simple: within expressions (i.e., in the app editor), Duration values must be enclosed in quotes, and the hours component must have at least three digits.

Your initial value is 00:00, but it should be "000:00:00".

The minimum-three digits in the hour components is how the app editor differentiates Duration values from ordinary Time values (which will never have more than two-digit hour components).

@Steve It’s always good to follow your posts. There is always something to learn

Thanks Steve, it worked like always!
Interestingly the initial value in the form shows as 0:00 and it does not accept wrong values of the type e.g. 1:300 or 1:3
So it is doing exactly that I needed it to.
Thanks again!

Technically speaking, 0:00 is a valid Time value, just not a valid Duration value. Inconsistencies between Expression Assistant and the app framework that actually hosts your app are probably why it’s accepted in one place but not the other.

I’m glad it’s working for you now!

Top Labels in this Space