You would want to use Open URL.
You can concatenate your candidate reference ID into it. Something like: "//Server/Shared/CVs/" & canref & ".doc"
I am unfamiliar with apple paths so you would have to double check it but you should get the concept.
mr_vodka - many thanks. That certainly sounds about right.
My only other problem is where the document types differ, so some may end in .doc others, .docx or .pdf.
Is there any kind of error handling I could employ within the script?
To expand on that, something like:
if canref.doc doesn'texist then canref.docx
if canref.docx doesn'texist then canref.pdf
if canref.pdf doesn't exist then give error 'No CV found'.
There are techniques to check whether or not a file exists at a path. However, it may be more simple to use an applescript to check if it exists using the various types.
Blimey, applescript is not something i've ever used before so that may be a bit too complex initially?
It may be new territory but there probably are existing scripts out there that someone already wrote. ;)
FileMaker does not have a native function to check if a file exists or if a path is valid. As I said earlier, there are some ways to do it such as importing into a global container field as a reference to check but it can be cumbersome.
Here is a thread that may help you.
Thanks for that mr_v. I'll have a read now.
On another related note - with the open url script, it only opens the the folder in finder, it doesn't actually open the file in word. Is there any way to force it to open in word?
I beat my head against a mac for quite a while trying to get 'Open URL' open a network shared pdf file.
I ended up having better success using the "Send Event" step instead.
Unknown if this will be needed in this case (I hope not), but another option to look at if you run into significant trouble.
Thanks Ninja. I suspect the problem i'm going to have is the mixture of doc types (PDFs and word files). The send event script does however look like it will work to open a specific application. It's just going to be a case of suck it and see. I'll report back.