Then change your script trigger to activate OnObjectModify instead of OnObjectExit.
Even with onobjectmodify, the value is updated only after clicking elsewhere on the screen and not just after the user changes the value.
The value gets updated fine when there is no script trigger for validation.
but I need these validations
That means you need to commit the record between single modification events (let's call them keystrokes for now). If you give the edit box an object name, you can use something like this:
If [ not passesValidationChecks ]
Exit Script [ False ]
Set Variable [ $name ; Get ( ActiveLayoutObjectName ) ]
Set Variable [ $sStart ; Get ( SelectionStart ) ]
Set Variable [ $sSize ; Get ( SelectionSize ) ]
Go to Object [ $name ]
Set Selection [ start: $sStart ; end: $sStart + $sSize - 1 ]
There is a nice use of a counter variable between events that should recognize (well, guesstimate) if the user is actually done with the modifying, so that routine isn't played between every keystroke. That concept was demoed by Jeremy Bante quite some time ago but I cannot write it from memory ...
Thanks so much..
Now after adding the Commit Records, it works perfectly well