Export Field Contents can be scripted to export a copy of the file and open it. You'll need to specify a file name and a location for that copy in the export field contents script step.
A $Path variable can be used to do that.
See this thread for a Tutorial file used to help developers understand Container fields, $Path variables and the script steps that can use a $path variable: Exploring the use of a $Path Variable in Scripts
If you've been to this thread already, please post back here with a more detailed description of what you are trying to do and exactly where you encounter difficulty.
Please post your reposnses and questions here and not in the thread to which I referred you. It is too old to return to recent items and thus I will not see your questions when you post to it unless I happen to see it by accident as was the case today.
Export Field Contents can open a file stored in a container field. If you select the check box for this option, the file will be opened by the default application specified in your OS settings for that file type. This will work regardless of the method used to insert the file, the storage options specified and whether or not the file was inserted with the "store a reference" option selected.
Files inserted with "store a reference" enabled via the Insert File method can also be opened if you double click the container field, provided that you did not optimize the field for interactive content. Such a file can also be opened via script using the Go to Field script step with the select contents option enabled. But please note the many ways that this can be kept from working for you.
If you could please assist me too Phil I would be most grateful. I'm experiencing seemingly unexpected behavior. It's down to the basics for testing:
My Objective: Use a script to open a file (PDF) from a container field
My Setup: FMPA13 / Windows7 (for testing purposes this file is not shared or hosted FMS13 yet)
My Container Specs:
- REFERENCE ONLY (Reference is assured by being controlled 2 different ways: By script that allows Reference only & Using field validation and getContainerAttribute function)
- INTERACTIVE CONTENT is preferred, but I've tested both 'Interactive Content' and 'Images' and neither have been successful.
- For testing purposes the file is local to my C drive
I have combed the internet, and this is the unexpected behavior:
"Files inserted with "store a reference" enabled via the Insert File method can also be opened if you double click the container field, provided that you did not optimize the field for interactive content." My file will not open when I double click even when set to "Image" and the reference is removed and re-inserted anew. What does that signal? Does it help identify the problem? " Such a file can also be opened via script using the Go to Field script step with the select contents option enabled." This does nothing, even more odd is the fact that I don't get an error code either. " But please note the many ways that this can be kept from working for you."
Any ideas? I've uploaded images so you may verify what I've stated if you'd like.
One more image to show that it's a file Reference
Ummm I feel silly but I found my error, don't waste your time troubleshooting this for me.
...It's probably just me but just incase anyone else has the same problem:
That Display option in the Insert File dialog is overriding the selection I make in the Inspector.