Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6789 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (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 by Guest
Trying to make problem more clear
Posted

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

Posted

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

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.