Newbies RobK Posted April 22, 2004 Newbies Posted April 22, 2004 I am making an application for people with very low computer literacy. They will have some attachments to include as part of the data they will be entering. If I only want to allow PDFs, graphics and plain text files, I can use import folder and just have them keep the files in folders and write a script to import it. When I do this, I get the file name in one field and a thumbnail in the other. this is perfect, and exactly what I want, but I also need to include .rtf and .doc files as potential file types, and this import feature does not import them. I can have them import the .rtf and .doc files into a container by right clicking the container field and then finding the file to include, which is fine, but this does not allow the file name to be imported into its own field, which I need to happen. Any suggestions? FileMaker Version: Dev 7 Platform: Mac OS X Panther
Fenton Posted April 22, 2004 Posted April 22, 2004 If they're on Macs, then you can do it with AppleScript. What platform(s) and version of FileMaker does this need to work on? I'll assume Mac and v.7. You can get the file path out of the field with the file inserted as reference with AppleScript.* But it has a little more data than just the filepath (which you could easily remove, if you needed to use the path with AS later). Ex. file:Blobbo.rtf filemac:/Macintosh HD/Users/fej/Documents/FileMaker/My_FM/Small_files/Blobbo/Blobbo.rtf This would of course have to be scripted, using Insert File, Commit Record. If you're on the correct layout, BlobboAsRef is the container field, the AS would look like: tell current record of document 1 set cell "FilePathTxt" to cell "BlobboAsRef" as string end tell *(I wasn't able to do the "Insert File" with AppleScript alone, as .rtf is not a supported format for setting into a container field. Perhaps there's a new syntax to do this with AS; but I don't know it.) [i'm seeing odd spaces in filepaths in v.7. These copy correctly to the clipboard and work, but have many extra spaces when visible in FileMaker. This is esp. true when using Get (FilePath); you get "Macintosh HD". In the text above, the "space" before "filemac" is actually ASCII 11, not a regular space. I changed it, as ASCII 11 isn't visible here.]
Newbies RobK Posted April 23, 2004 Author Newbies Posted April 23, 2004 I will be making this in FM Pro 7 on the mac, but when it is done, it will be run in a stand alone runtime application on both macs and PCs. I'm guessing by your answer that this may not be possible, or maybe it is. I do have the option of limiting them to txt, pdf, and common graphic formats, although I would like to avoid that. But this may be the only real option. Most users will be running it on a PC. rob
Recommended Posts
This topic is 7520 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