The number of calculations exceeded the maximum limit - InfoPath Dev
in

InfoPath Dev

The number of calculations exceeded the maximum limit

Last post 04-20-2017 10:42 AM by paulos. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-06-2017 09:10 AM

    • paulos
    • Not Ranked
    • Joined on 04-05-2017
    • Posts 2

    The number of calculations exceeded the maximum limit

    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

    • 0

    DATE

    • addDays(today(), (DATE * -1) + 1)

    DRIVE_FPID40030F01

    •   0

    NONE_FPID40030F02

    • 0

    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

  • 04-08-2017 06:03 AM In reply to

    Re: The number of calculations exceeded the maximum limit

     I think the issue may just be too many interactions between fields here - I'd suggest adding a helper field that sets things instead of using defaults. So, add additional fields to your repeating data source (they don't have to show on the form) and put rules on the helper fields to set your other fields, instead of using defaults. Then, on open, set the helper field to 1 or something (in an open rule, this will set all 14 instances) and each helper field will do the calcs for that row....Attaching a simple sample, save locally, right click and select design to open in design mode. I also added a rule on the repeating group to set the same helper field, in case the user added more rows.

    I am not sure this will fix your issue, but save a copy of your form and give this approach a try in a backup copy. :) 

    Hilary Stoupa

  • 04-20-2017 10:42 AM In reply to

    • paulos
    • Not Ranked
    • Joined on 04-05-2017
    • Posts 2

    Re: The number of calculations exceeded the maximum limit

    Thanks for the reply. We have decided that for the 14 day selection the user will need to calculate themselves. They do not enter this very often, less than 1% of the time. I have the calculations working for the 7 day option however and I no longer get the error message. I have attached a copy showing the idea. The calculations are still entered for the 7 day option but removed for the 14 day option.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.