December 18, 200223 yr 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,
December 19, 200223 yr Author 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?
December 19, 200223 yr Author 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!!
December 19, 200223 yr That'll do it every time! I saw that in your original post and figured it was just a message typo.
Create an account or sign in to comment