guiseppe Posted March 27, 2004 Posted March 27, 2004 I'm trying, from a script, to open a file that has been stored in a container field. As far as I can tell, I can only export and not open directly. I can force it to export as a particular filename (e.g., "Test"), but that causes problems if the user tries to view files from more than one record at once. Ideally, I could determine the filename of the file originally imported into the contained field, but I cannot find a script step to do that either. Am I missing something? -- Joe Version: v7.x
bruceR Posted March 28, 2004 Posted March 28, 2004 If the file is stored as a reference, and stored as a file (as opposed to picture or movie) then go to field select/perform will open it.
guiseppe Posted March 30, 2004 Author Posted March 30, 2004 Thanks, BruceR, but most of the time, the file will be stored within the database itself (that is, NOT stored as a reference). As far as I can tell, "select/perform"ing a selected container field will only open the file if it is stored as a reference. (In fact, double clicking on the field will only open it if it is a reference.) Otherwise, this would have been the perfect solution. Any other ideas? -- Joe
Fenton Posted March 30, 2004 Posted March 30, 2004 If the image (or whatever) is embedded in the database, then it is no longer a "file" to FileMaker. It's whatever it is, all of it, in the container field. Which is good, so you can move the original file and FileMaker can still show the image. If you export that image, turning it back into a file, then it's a new file. If you wanted to export several at once, as a scripted export, then you're going to have to rename the file each time. Maybe a later version of FileMaker will give us more "file" control. The renaming is a platform-specific operation. On a Mac it can be done with AppleScript. On a PC or cross-platform I use the Troi File plug-in.
guiseppe Posted March 30, 2004 Author Posted March 30, 2004 Thanks. I guess that makes sense. But since, when I import a file into a record, I can see the filename in the container field, I had hoped FM would provide some way to GET() that filename. Guess not. I'm toying now with the idea of tying the exported filename to time-of-day information, so multiple exported files do not trample each other. Thanks for the help. -- joe
Recommended Posts
This topic is 7612 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 accountSign in
Already have an account? Sign in here.
Sign In Now