Hello all,
Is it not possible to suppress/disable the FileMaker Pro>Quit FileMaker Pro command in a particular layout? I'm developing a solution that has several modal/popup data entry layouts and it would be bad if the user quit FileMaker before the data entry was properly committed and certain housekeeping tasks could run. Do you suggest I install an OnLayoutExit trigger that could intervene (assuming it would execute before the app quits)? Thanks very much for your suggestions and/or workarounds.
7 replies to this topic
#1 OFFLINE enthusiast
Posted 13 January 2012 - 02:08 PM
#2 OFFLINE enthusiast
Posted 25 February 2012 - 08:19 PM
I'm working on a solution that needed to do something similar. I setup a script that would be performed on Closing. (Under File Options)
Not sure if this is the "right" way to do it, but it works for me.
Show Custom Dialog ["Close Database";"Do you want to exit?"] ## Choices are No;Yes If [Get(LastMessageChoice)=1] Halt Script Else Close File [Current File] End If
Not sure if this is the "right" way to do it, but it works for me.
#3 OFFLINE enthusiast
Posted 26 February 2012 - 01:39 AM
I was quite surprised to see that this actually works. I was thinking it had to be
Show Custom Dialog ["Close Database";"Do you want to exit?"]
## Choices are No;Yes
If [Get ( LastMessageChoice ) = 1]
Exit Script [Result: 0]
End If
Apparently Halt Script is the same as Exit Script with result 0. At least in this situation.
Show Custom Dialog ["Close Database";"Do you want to exit?"]
## Choices are No;Yes
If [Get ( LastMessageChoice ) = 1]
Exit Script [Result: 0]
End If
Apparently Halt Script is the same as Exit Script with result 0. At least in this situation.
Henk Brendel
#4 OFFLINE journeyman
Posted 26 February 2012 - 06:11 AM
The biggest difference is that Halt Script terminates ALL running (or paused) scripts. Exit Script terminates only the script in which it appears.
#5 OFFLINE enthusiast
Posted 26 February 2012 - 09:48 AM
I know that, but I was not aware that Halt Script also cancels the triggering event.
Henk Brendel
#6 OFFLINE Independent Contractor
Posted 26 February 2012 - 11:37 AM
hbrendel, on 26 February 2012 - 09:48 AM, said:
I know that, but I was not aware that Halt Script also cancels the triggering event.
#7 OFFLINE enthusiast
Posted 26 February 2012 - 11:49 AM
I tested it out. The script as displayed above was set to run onFileClose. It functioned as described, no matter if I used Halt Script or Exit Script (result: 0). Mac OS Lion / FMA 11.0.4.
Henk Brendel
#8 OFFLINE Independent Contractor
Posted 26 February 2012 - 06:17 PM
Matt_, on 25 February 2012 - 08:19 PM, said:
I setup a script that would be performed on Closing. (Under File Options)
I also hadn't realized that the "run when closing" script responds to the script result; closing the file if the script result is empty or true. I don't think of this as a 'script trigger', considering it has existed in FileMaker for quite some. I think of a 'script trigger' as the the recent addition of layout and field level triggers (introduced in FM 10, I believe). Nonetheless, it is a script trigger.
hbrendel, on 26 February 2012 - 01:39 AM, said:
Apparently Halt Script is the same as Exit Script with result 0. At least in this situation.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users































