Jump to content

Button / script help needed


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

Recommended Posts

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 5700 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
 Share

×
×
  • Create New...

Important Information

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