Error: Default values, rules or code may be running in an Infinite loop - InfoPath 2010

Answered Error: Default values, rules or code may be running in an Infinite loop - InfoPath 2010

  • Wednesday, March 07, 2012 5:40 AM
     
     

    Hi,

    I am using InfoPath 2010. In the browser enabled form, i have a repeating table and have some rules set.

    When the number of rows inserted is more than 13, i am getting the below error:

    "Default values, rules or code may be running in an Infinite loop. To prevent this, ensure that the default value, rule action or event handler does not update the data which causes the same rule action or event handler to execute".

    In the 14 root log, i am getting the below:
    03/07/2012 12:50:52.15     w3wp.exe (0x277C)
     0x2C98    InfoPath Forms Services           Runtime - Business Logic    

      82lj    Critical    Calculations exceeded the maximum stack depth.

    Further analysis on the form:

    I have a column, which has the default value set like this: count(preceding-sibling::*) + 1

    This column is causing the issue. I removed the calculation on the column and the form loaded properly. However, this calculation is required. The column is used to find the right row index before setting a value from a lookup to the appropriate row.

    How to change this calculation?

    How to fix this error?

    Thank you




    • Edited by Venkatzeus Wednesday, March 07, 2012 12:47 PM
    •  

All Replies

  • Thursday, March 08, 2012 7:00 AM
    Moderator
     
     Answered

    Hi ,

    As far as I know  InfoPath is hard coded to only execute 16 rules before throwing the "Infinite Loop" error. So when you add more than 13 rows it will throw an error .Using the formula count(preceding-sibling::*) + 1 alone on the repeating table will not cause the error .It is because of the rule which sets the lookup value .

    Here is a good article introduction copy repeating table values ,you can search in this article for more information :

    Entries in InfoPath (14): http://johnliu.net/blog/category/infopath
    Thanks


    Entan Ming

    TechNet Community Support

  • Saturday, March 10, 2012 5:11 AM
     
     

    Hi,

    Thank you very much for the reply.

    Is there any MSDN article stating the same, as the customer would need to verify.

  • Monday, March 12, 2012 8:04 AM
    Moderator
     
     

    Hi ,

    I have found this forum post stating the same issue as yours .This is also caused by the 16 limitation .This is by design .

    For more information ,please refer to this site:

    InfoPath Rules Limit : http://social.msdn.microsoft.com/Forums/en/sharepointinfopath/thread/6a12a023-4180-4f52-9ba2-4fe622b0e4c8

    Thanks



    Entan Ming

    TechNet Community Support