Sergeant Ron Posted December 13, 2005 Posted December 13, 2005 I have a script that uses a message to prompt the use if they want to creat a new record. What I'd like to do is have the message be displayed saying "do you want to creat a new record" then give the user the ability to either exit the script (which would be attached to the "NO" button on the message, or allow the user to contine and creat the record (YES button). My question regards the use of the message and how i can use that in conjunction with a IF statement perhaps to set the condition that allows the user to exit. any suggestions? Regards, Ron
Ender Posted December 13, 2005 Posted December 13, 2005 How about: Show Custom Dialog [ "Message"; "do you want to creat a new record" ; "Yes"; "No" ] If [ get(lastmessagechoice) = 1 ] #create record stuff here End If
stanley Posted December 13, 2005 Posted December 13, 2005 Ron: What you are looking for is Get(LastMessageChoice). After your custom dialog (where, let's say, the "Yes" is the default button and the "No" is the next button), you'd have: If [Get(LastMessageChoice)=1] New Record //(or whatever steps you want to use here) Else //(you can use ElseIf, should you have more than 2 buttons) Exit Script //(or however you want this to work) End If -Stanley
T-Square Posted December 14, 2005 Posted December 14, 2005 Ron-- As an aside, are you sure that asking your users to confirm adding a record is in their best interest? Such dialogs can become annoying, and it is well documented that people will tune out your dialogs if they are too numerous (Think about how many people have said "Yes" to deleting all the files on their hard drive! That's why we have the Recycle Bin, IMHO). If they're clicking an add button, let that serve as indication of intent and don't bug them with a confirm button. Just a couple of cents. David
Recommended Posts
This topic is 6922 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