November 18, 200421 yr - I have a button on a db. - When the button is clicked it opens a file (via a script). - The file relates to the record number (so if it is record #5 and you click the button a file called "5.pdf" is opened via the "open URL" script step) the question: Is there a way to check if the file exists? for example, if the file doesnt exist Id like to give the user a message ( "Show Custom Dialog") thanks!
November 18, 200421 yr Just thinking on the fly... How about the script: Open file 5.pdf, If Current(file name) does not equal 5.pdf, Show custom dialog. End if. Good Luck.
November 18, 200421 yr Trap the error in the script: Set Error Capture [On] Set Field [zc_ErrorCaptureField_g; Get (LastError)] #The field zc_ErrorCaptureField_g is a global text field If[zc_ErrorCaptureField_g <> 0] Show Custom Dialog ["Couldn't find the file..."] End If
Create an account or sign in to comment