FMPRO-L Archives

October 2014, Week 4

FMPRO-L@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
John Wenmeekers <[log in to unmask]>
Reply To:
FileMaker Pro Discussions <[log in to unmask]>
Date:
Tue, 28 Oct 2014 13:28:07 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (27 lines)
It's possible with native FM tools.

Add a global number field, default 0. [zc_closeWindow_gn]
Add a script along these lines:
Prevent close window:
If( yourTableName::zc_closeWindow_n = 0 )
Show Custom Dialog ( yourText why user can't use the stop light )
Halt scriptEnd If
If( yourTableName::zc_closeWindow_n = 1 )
Close Window ( Current Window )
End If
Exit script

In File --> File Options
Go to tab Script Triggers
Link the script to "OnWindowsClose"

Find a way to set the global field to 1 when needed or authorized.
Something like a close Window button on your layout.
Put a Set Field line in the script linked to that button that sets the zc_ field to 1,
call the Prevent close window script, reset the global to 0
Or tweak the script with a variable.

Hope this helps

JW

ATOM RSS1 RSS2