Default Value calculation causing "exceeded number of calculations for action" error. - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Default Value calculation causing "exceeded number of calculations for action" error.

Last post 04-25-2013 11:43 AM by Shrout1. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 02-14-2011 03:12 PM

    Default Value calculation causing "exceeded number of calculations for action" error.

    I have a repeating table in a form that has 2 date pickers, and a field displaying a date difference that I got from this wonderful blog http://alecpojidaev.wordpress.com/2008/12/30/infopath-codeless-programming-walkthrough-2/ (shows how to calculate the difference between days excluding work and holidays).

    In the footer of the repeating table, I need to sum the total days from the date difference, so I used a default value of sum(totalworkdays). 

    When previewing, this only works HALF the time.  The other half I get the error "A calculation in the form has not been completed.  The number of calculations used for a single action exceeded the maximum limit.".  Of course, I have the "refresh value when formula is recalculated" option checked, because I NEED it to be recalculated.

    I have attached the form.  Please let me know if you see any obvious problems. 

    It's wierd that it only happens HALF the time.  When I uncheck the refresh value box, it works no problem.  It just doesn't refresh.  ; )

  • 02-15-2011 04:48 AM In reply to

    Re: Default Value calculation causing "exceeded number of calculations for action" error.

    I have not gotten your problem as you described. I have ran it about 4 times now and pluged in 3 - 5 rows of different dates. So, not sure why your getting an error. Hopefully someone might have a better understanding to your problem.

  • 02-15-2011 06:46 AM In reply to

    Re: Default Value calculation causing "exceeded number of calculations for action" error.

    It appears the form I attached didn't have the default value to sum the repeating table set.  I've attached it again.  You'll notice that I get the error about every 4th time the calculation is refreshed. 

  • 02-15-2011 08:58 AM In reply to

    Re: Default Value calculation causing "exceeded number of calculations for action" error.

    You have to decouple sum calculation and sum visualization. Use expression box to visualize instead of field value. Assign sum field value on Save/Submt events.

  • 02-15-2011 09:03 AM In reply to

    Re: Default Value calculation causing "exceeded number of calculations for action" error.

    Here's another thing I noticed.  It only gives me the error when it has to sum odd numbers.  Even numbers work just fine. 

  • 02-15-2011 09:14 AM In reply to

    Re: Default Value calculation causing "exceeded number of calculations for action" error.

    Alec Pojidaev:

    You have to decouple sum calculation and sum visualization. Use expression box to visualize instead of field value. Assign sum field value on Save/Submt events.

     

    Thanks.  I will try that.  I'll let you know how it works. 

  • 02-15-2011 12:10 PM In reply to

    Re: Default Value calculation causing "exceeded number of calculations for action" error.

     

    Well I'll be darned.  That was the trick.  I never "decoupled calculation and visualization" in a form before.  Never even realized that was an option.  I learn something new everyday . . .
  • 04-25-2013 11:43 AM In reply to

    Re: Default Value calculation causing "exceeded number of calculations for action" error.

    I realize that this topic is quite old, but can anyone futher expand upong the concept of "decoupling sum calculation and sum visualization"? Does this mean that I create one field that is not displayed on the form and then reference it in the field that *is* displayed? I've looked at Alec's blog - very interesting stuff - but I still feel quite in the dark.

Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.