The matter is same: too many calculation because of loop. Sometimes the error
message is displayed but sometimes the calculation fields are just zero
without warning. I received advice to do boolean flag as follows
var handler = 0;
function ...::OnAfterChange(eventObj)
{
if(eventObj.IsUndoRedo || handler > 0) return;
handler = 1;
....
handler = 0;
}
I just can't get it work or I can't use it properly. Programming skill is
not so good. Big amount of calculation should be launched when opening the
form and excuting a query from database(XDocument.Query();). Also
calculations should be made when certain check box is checked. I have
problems in both cases. At least one of those cases is not working when
executing. What can be done?
Sorry if I have asked similar questions, but I just want to make this work
properly.
Looks like these events are asynchroneous in InfoPath. So OnAfterChange is
triggered by one node, and while your flag is set to 1, another node
triggers it too...then the code that was supposed to run for that node is
not running.....Your flag needs to be a little more sophisticated if you
want the proper code to be run.
Franck
> The matter is same: too many calculation because of loop. Sometimes the
> error
[quoted text clipped - 20 lines]
> Sorry if I have asked similar questions, but I just want to make this work
> properly.
Sam - 23 Mar 2005 09:19 GMT
>Your flag needs to be a little more sophisticated if you
> want the proper code to be run.
Yes, I realize that but the problem is that I don't know where to start when
building a working code for the flag. I'm not so good in programming.