on validate

View: New views
4 Messages — Rating Filter:   Alert me  

on validate

by Paul Chernoff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What I want to do seems pretty basic but I can't remember how to do  
it. During the "on validate" form event I want to check on a condition  
if it isn't met I want to stop the validation phase and put the user  
back into editing the record. What command would I use so stop the save?


Paul Chernoff
Director of Information Technology
Washingtonian Magazine

**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.4d.com
   

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

Re: on validate

by Peter Bozek-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Nov 3, 2009 at 5:44 PM, Paul Chernoff
<pchernoff@...> wrote:
> What I want to do seems pretty basic but I can't remember how to do it.
> During the "on validate" form event I want to check on a condition if it
> isn't met I want to stop the validation phase and put the user back into
> editing the record. What command would I use so stop the save?

Reject?

I have seen its use  some time ago, but myself consider checking the
changes in 'on validation' phase  a bit non-standard.

--
Peter Bozek
**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.4d.com
   

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

Re: on validate

by Scott Gelvin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Paul,

On Nov 3, 2009, at 9:44 AM, Paul Chernoff wrote:

> What I want to do seems pretty basic but I can't remember how to do  
> it. During the "on validate" form event I want to check on a  
> condition if it isn't met I want to stop the validation phase and  
> put the user back into editing the record. What command would I use  
> so stop the save?

REJECT


Scott Gelvin
Footprints, Inc.
4D specialists since 1987

**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.4d.com
   

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

Re: on validate

by Scott Gelvin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Peter,

On Nov 3, 2009, at 10:41 AM, Peter Bozek wrote:

> On Tue, Nov 3, 2009 at 5:44 PM, Paul Chernoff
> <pchernoff@...> wrote:
>>
>> During the "on validate" form event ... What command would I use so  
>> stop the save?
>
> Reject?
>
> I have seen its use  some time ago, but myself consider checking the
> changes in 'on validation' phase  a bit non-standard.

Agreed, though the reasoning goes way back to v2 days, when the "After  
phase" locked the database to writing to all other users. To my  
knowledge, it's really no different in v2004. For this reason, we do  
our form validation in a form event prior to On Validate (e.g. a Save  
button's On Clicked event). In fact, there (on automatic accept  
buttons), we may use the REJECT command to stop the automatic action  
from occurring. (It stops First/Previous/Next/Last Record action  
buttons, too.)


Scott Gelvin
Footprints, Inc.
4D specialists since 1987

**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.4d.com
   

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