I created a form in InfoPath, in which current Year information is compared in a calculated value to Previous Year. Each Year is in a different list, so to calculate the variance percentage I did something like this:
translate(CurrentYearField1 * 100 / PreviousYearField1 - 100, "aINnfity", "00")
This calculation was causing a postback, showing a "Sending information to the server" message every time a field is modified. The "translate" and "aINnfity" are only to avoid the "NaN" or "Infinity" instead of the real information. If I remove them, leaving the calculated field like this:
CurrentYearF1 * 100 / PreviousYearF1 - 100
There is no postback, but I get "NaN" or "Infinity" if any of the fields is 0. Disabling postback in the "Browser Forms" options stops the postback from happening, but it doesn't update the calculated value when one of the fields is modified.
Is there anyway to avoid the postback and the "NaN" at the same time?
Regards!