Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There are rules scenarios where you can't use a frevvo Live Forms control directly in a rule expression and you are forced to define a local variable, perform the computation using the local variable and assign the value to the control at the conclusion of the computation.

...

The code above makes logical sense but it just won't work. In a nutshell this particularity of the frevvo Live Forms implementation can be resumed this way:

The right hand side of an assignment expression resolves to the value of a frevvo Live Forms control passed to a rule when it is invoked. The left hand side uses a reference to the control''.

...

The expression will be evaluated three times (since there are three subtotals) but for every iteration, the T.value operand on the right hand side will always evaluate to 26 which is not the desired behavior and will lead to an incorrect result. Again, this happens because the right hand side of that expression is resolved based on the values initially passed to the rule as parameters.

Frevvo Live Forms explicitly imposes this restriction for the sake of efficiency and there would be a significant impact in performance if the restriction was not in place. Lets rewrite the rule using a local variable:

...

No execution error will be logged in frevvo Live Forms server log files (see [[#Rule_Debugging | rule debugging]] above). The rule will simply not be executed.