Skip to Content
0

Error on time formula that has been working

Feb 28 at 06:00 PM

14

avatar image
Former Member

We have a formula that had been working till now. but I dont see how to debug, how to see what the data issue is?

IF istime(Left(Split({qryPtWaitingTme_.SCHED_TIMESTART}, ' ')[2],8)) then Time(Left(Split({qryPtWaitingTme_.SCHED_TIMESTART}, ' ')[2],8))

when running now it gives this message:

' A subscript must be between 1 and the size of the array' without seeing the data, how can i change the above code to handle this error>

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Abhilash Kumar
Feb 28 at 07:03 PM
1

Hi Paul,

This could very well be caused due to NULL values.

Modify the formula to:

IF {qryPtWaitingTme_.SCHED_TIMESTART} = '' THEN
Time(0,0,0)
Else IF istime(Left(Split({qryPtWaitingTme_.SCHED_TIMESTART}, ' ')[2],8)) then 
Time(Left(Split({qryPtWaitingTme_.SCHED_TIMESTART}, ' ')[2],8))

Also, make sure to select "Default Values for Null" from the drop-down in the formula editor. (The default is set to "Exceptions for Nulls").

-Abhilash

Share
10 |10000 characters needed characters left characters exceeded