AnsweredAssumed Answered

Intercept or trap and trigger on Save and Validate. Can I and how? Getting desperate.

Question asked by BroadwayJoe on Mar 30, 2010
Latest reply on Mar 30, 2010 by mrvodka

Title

Intercept or trap and trigger on Save and Validate. Can I and how? Getting desperate.

Post

Is there some way to stop or trap Filemaker’s automatic attempt to save records when you move off them (by clicking somewhere else or changing layouts, for example)? 

 

Here’s the situation:

 

When the uses opens a particular layout, a trigger script sets up a new entry. One of the fields is auto-entered (a date value). Four of the fields in the record are validated.

 

On the layout are buttons that Save the record (a script that commits and then ) and another that aborts the current record (does a Revert with no dialog and a New Record). That works fine.

 

The problem happens because the user at any time can go to a Home layout and can open another window into the same table, but with a different layout (which shows a log of today’s entries). I want to let the user do that without getting any interrupting dialogs if he or she has not made any changes to the record. But I cannot because:

 

Those actions (leaving the record entry) cause FM to try to save the record. If I set “Save record changes automatically” then FM validates the fields, finds them blank (which is violates the validation) and displays alerts. If I do not set “Save record changes” then FM asks the user if he or she wants to. FM thinks it has a new record with one field entered (the auto-entered date).

 

I’ve tried to trap (trigger) on Commit, but the Save logic comes before the Commit. What I want to do is to trap the Save. 

 

I’ve been spending way too much time on this. How do people deal with this issue. Urgent help is needed.


Outcomes