Page 1 of 1

Form onDataChange called twice

PostPosted: Tue Aug 10, 2021 3:04 am
by roddy
When a form has a onDataChange() action; if the data source field is changed in this function, then it calls the onDataChange() again. I have tried looking at the JSEvent, old and new values but I cannot figure out a way to determine if the call is from the form itself; it could also lead to an infinite loop. The data source is a form variable.

When the second automatic call is made, the datasource still has the original newValue from the first call.

It really shouldn't be triggering a form action event from the form again. Is there anyway of stopping the second onDataChange() call (or establishing that it is a second call)?