DrNikon224 Posted December 18, 2002 Posted December 18, 2002 I am in the process of creating a script that will delete the current record using a custom dialog box. I have searched the list of filemaker error codes, but cannot locate the code for delete record. I am looking for the code to use with the "Status(CurrentError=??)" statement to activate the custom dialog box. At this point, my script is laid out like this: If( Status(CurrentError) = ) Show Message("Are you sure you want to cancel this loan?") choices "Yes","No" If (Status(CurrentMessageChoice = 1) Delete Record/Request [No Dialog] End If Does anyone know what code I need to use?? Thanks in advance,
Vaughan Posted December 19, 2002 Posted December 19, 2002 Status(CurrentError) <> 0 That is, you look for any error. 0 = no error.
DrNikon224 Posted December 19, 2002 Author Posted December 19, 2002 I altered my script to the following: Allow User Abort (Off) Set Error Capture (On) If ["Status(CurrentError <> 0)"] Show Message ["Are you sure you want to cancel this loan?"] Choices of "Yes" and "No" If ["Status(CurrentMessageChoice=1"] Delete Record/Request [No Dialog] End If End If It looks like it should work (doesn't most stuff look like that?) But no matter which button I choose on the dialog (which pops up correctly), it goes back to the current record w/o deleting it. ...i don't think i need the first If - with the CurrentError statement. I just need to set-up the outcome of the Show Message choice. Can anyone see what I'm doing wrong?
DrNikon224 Posted December 19, 2002 Author Posted December 19, 2002 I FOUND IT!! I've been using the following: If["Status(CurrentMessageChoice = 1)"] INSTEAD OF: If["Status(CurrentMessageChoice) = 1"] After I put the "= 1" outside the parenthesis, it works!!
Vaughan Posted December 19, 2002 Posted December 19, 2002 That'll do it every time! I saw that in your original post and figured it was just a message typo.
Recommended Posts
This topic is 8013 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