The number of calculations used for a single action exceeded the maximum limit - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

The number of calculations used for a single action exceeded the maximum limit

Last post 10-21-2010 01:59 AM by Dremandred. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-20-2010 08:26 AM

    The number of calculations used for a single action exceeded the maximum limit

    I have an multi line address field in my form, which I would like to convert to upper case.

    the formula is: translate(AddressField, "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ")

     

    However if it doesn't seem to like the enter button (CR/LF) and throws the warning: "A calculation in the form has not been completed. The number of calculations used for a single action exceeded the maximum limit." and then converts the letters to uppercase.

     

    Is there anyway I can get InfoPath to ignore this issue.

     

    Thanks 

    Dremandred.

  • 10-20-2010 09:18 AM In reply to

    Re: The number of calculations used for a single action exceeded the maximum limit

    The error indicates that some chain of events is causing a rule on your form to fire over and over, not just because it has a problem with new lines.  Try to figure out what could be causing the rule to fire over and over, and find a stop condition, or a way to set the field's value in a manner that doesn't cause that.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-21-2010 01:59 AM In reply to

    Re: The number of calculations used for a single action exceeded the maximum limit

    Hi Jimmy

     

    Thanks for your response, I have read that the error means that a rule is being fired repeatedly and I can see it is but I don't understand why or how I can avoid it. This only ever occurs when there's a carriage return / line feed in the text box. It's also very easy to replicate.

     

    Add a text box to a new InfoPath form, enabling the Multi line property.

    Add translate(., "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ") to the formula property.

     

    Preview and enter text with a Carriage return/ line feed and some more text, you should get the error when the field losses focus.

     

    This error will also occur if you remove the formula and insert the following JScript code in the text box's after_change event.


    var value = XDocument.DOM.selectSingleNode("/my:myFields/my:field1").text;

    value.toUpperCase();

    XDocument.DOM.selectSingleNode("/my:myFields/my:field1").text = value;


    Seems very weird to me :)

    I guess I may have to split the text box into separate fields which is a bit annoying!

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