Hi
I have a repeating table calculating the overall hours from three double values (DRIVE_FPID40030F01 and NONE_FPID40030F02) plus the previous day total (HOS2_PREVIOUSTOTAL).
There is a reset boolean field (CYCLERESET) which resets the overall total. The user can only modify two fields DRIVE_FPID40030F01 and NONE_FPID40030F02.
The following is the output on open
DATE DRIVE_FPID40030F01 NONE_FPID40030F02 CYCLETOTAL CYCLERESET
2017/04/06 0 0 NaN n
2017/04/05 0 0 NaN n
2017/04/04 0 0 NaN n
2017/04/03 0 0 NaN n
2017/04/02 0 0 NaN n
2017/04/01 0 0 NaN n
2017/03/31 0 0 0 n
2017/03/30 0 0 0 n
2017/03/29 0 0 0 n
2017/03/28 0 0 0 n
2017/03/27 0 0 0 n
2017/03/26 0 0 0 n
2017/03/25 0 0 0 n
2017/03/24 0 0 0 n
The display is in reverse chronological order and must remain this way
There are 14 days and I have created 14 rows in the default data.
The default value used in the Fields definition are:
STATIC_ZERO
DATE
-
addDays(today(), (DATE * -1) + 1)
DRIVE_FPID40030F01
NONE_FPID40030F02
PREVIOUSTOTAL
-
(following-sibling::CYCLE2_ROW/CYCLETOTAL | STATIC_ZERO)[(position() > 13) + 1]
CYCLETOTAL
- DRIVE_FPID40030F01 + NONE_FPID40030F02 + number(concat(substring(PREVIOUSTOTAL, 1, (CYCLERESET = string(false())) * string-length(PREVIOUSTOTAL)), substring(STATIC_ZERO, 1, 1 * (HOS2_CYCLERESET = string(true())))))
When I open the form, the error pops up stating that
A calculation in the form has not been completed. The number of calculations used for a single action exceeded the maximum limit.
The output displays NaN for the first 6 rows, and the remaining 8 are 0. When the sixth row is modified, all calculations will work.
How can I get rid of this error?
Thanks,
Paul