May 23, 200322 yr Hi guys, The scenario: I have a database of people's cv's. CV's are updated continuously, so what I have done is made a field of the "filename" with the path + name of person and created a script to open the file. e.g """" & "P:BCV - Brisbane CVs" & Author & ".doc" & """" This works beautifully. Problem: On my script i have the error capture turned on, but what i would really like is a conditional statement that would open the file, or if null, send a message saying it doesn't exist. I know I can do conditional statements when a field is "", but how do i do it when the thing i am looking for is external to filemaker?? i.e there will always be an entry in the filename field so it will never be null, but there may not be a document to open with that filename. Hope that makes sense...
May 23, 200322 yr Take a look at the Status(CurrentError) function in FileMaker help. I believe it lists error codes. I'm not sure which one corresponds to "file not found," but you can trap for that error code and handle it in your script...
May 27, 200322 yr I have found that I almost never need to trap for a specific error, so unless there's a specific need, I just use: Status(CurrentError) <> 0 ...that pretty well covers all your bases.
Create an account or sign in to comment