On 18 May 2017, at 05:50, Jody Bevan via 4D_Tech <4d_tech@lists.4d.com> wrote:

> Get rid of the auto save action. Then you can handle what ever situations you 
> need to. We have not used auto action buttons for 25 years.

Hi Jody

I have actually done that. It isn’t the problem here though - the ‘save’ is 
being done under program control, it’s just that by the time the OK button 
script is executed the field-level script has reverted the modification so the 
form level validation returns true.

EXAMPLE:

 • Lets say the acceptable input range for a field is 4-8.
 • It currently holds the value = 5
 • User enters 9 and hits Return to save the form
 • 4D now does 2 events: 1=the field object “On Data Change” script sees that 9 
is out of range, shows an alert and reverts the value back to 5
 • 4D isn’t finished yet with its events. Having run the field level script it 
now has to run the default form accept button script (invoked by the user 
pressing return). It isn’t aware that the user’s entry was rejected at the 
field level, sees everything in range (because the field script reverted it) 
and does an ACCEPT

I think I probably need some kind of flag to let the form level validation know 
that it has to cancel the save action because it was invalidated at the field 
object level.

Peter
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to