Jump to content

Container field exporting


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

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 6508 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
 Share

×
×
  • Create New...

Important Information

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