Newbies Fred Leonard Posted January 19, 2006 Newbies Posted January 19, 2006 I need to be able to open files stored in containers. Has anyone figured out how to automate this yet? If I export the field contents, it does know the file name because it comes up in the save dialog box with the documents full name in it, so when a script is written to do this with no dialog, why doesn't it know the file name? I tried to specify "temp" when setting the script, but that doesn't work because the extension is lost, so the open option doesn't work because it has no application assigned to a file with no extension. So, is this a bug/oversight on FileMaker's part, or has someone figured out how to get around this? (Maybe a variable that holds the name?) I obviously can't save the file as "temp.ext" because there are different types stored on different records. Some may be PDF, some may be JPG, or others. I want to get a document imaging solution working. If anyone knows of one already made up and working, that would help too. It's too bad FileMaker didn't allow an open or view function on containers. Thanks!
Fenton Posted January 20, 2006 Posted January 20, 2006 Create a calculation GetAsText ( container field ). You will see the file name of the inserted file (hopefully). You can then set that into a named variable, with the Set Variable script step. Something like: Set Variable [ $Filepath; Case ( Get ( SystemPlatform ) = -1; "filemac:"; "filewin:" ) & Get ( DesktopPath ) & "folder path if any/" & GetAsText ( container field ) Use $Filepath in the Export dialog.
Recommended Posts
This topic is 6885 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