Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7854 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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... confused.gif

Posted

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...

Posted

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.

This topic is 7854 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.