GreenPilgrim Posted April 22, 2006 Posted April 22, 2006 (edited) While trying to write a script for a button I am hitting a snag. I am wanting to have a dialogue appear which asks the user if they are sure they want to start a new record and then give them the option of either cancelling the script or proceeding. I can get the dialogue box, but when I add the "cancel" button onto the dialogue box, it continues on to create a new record. When they click cancel I want the cancel button on the dialogue box to cancel the whole script. If they click "Okay" I want the script to continue and start a new record. Edited April 22, 2006 by Guest Trying to make problem more clear
GreenPilgrim Posted April 22, 2006 Author Posted April 22, 2006 I used my filemaker help to decipher a fix. They have the new record request first, but this worked better for me. custom message New record request IF function with a GET(LastMessageChoice)=1 EndIf
Vaughan Posted April 23, 2006 Posted April 23, 2006 The step you posted above will create a new record no matter what the user does. The correct script (in pseudo-code) would be: Custom Dialog [ "Create a new record?" ; 1=OK, 2=Cancel ] If [ Get ( LastMessageChoice ) = 1 ] New Record/Request End If
T-Square Posted April 25, 2006 Posted April 25, 2006 I wonder why you want to hold the user up with an essentially meaningless dialog box. If the user has clicked an Add button, it seems reasonable to assume that they want to add a record. Putting in too many dialog boxes just means that when the user gets a truly important message (like, "Are you sure you want to delete all records?"), they are more likely to click without thinking. Moreover, scripting this DOESN'T take care of a user adding a record by using a keyboard shortcut or menu entry to add a new record. You'll still end up with a whole bevy of empty records when your users hit those instead of your button (and they will). David
Recommended Posts
This topic is 6789 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now