Tissot Posted February 9, 2005 Posted February 9, 2005 Hi! When I Script a Containerfield with a File Reference it all runs perfect until the File is renamed or deleted. Then I've got a problem with it poping up with its own window wich brings up the Insert File Window that offcourse dosent make a reference, it inserts the hole File. Do you follow ? Thanks in advance!
-Queue- Posted February 9, 2005 Posted February 9, 2005 Um, don't rename or delete the file, and tell your users they will be flogged if they do?
Tissot Posted February 10, 2005 Author Posted February 10, 2005 Is there no possibility in Scripting it ? I thought of Error Capturing it. (I don
Fenton Posted February 10, 2005 Posted February 10, 2005 I would tend to agree with Queue, flog 'em :-! But if that's not allowed, I think that the best way you deal with this problem is to build the tools they need for renaming and managing files into your FileMaker interface; so that, if they rename a referenced file, from FileMaker, FileMaker reinserts the image. When they "physically" add images to a folder, you'd need to run a script to go get them also. Or better, use the "calculated file path" container approach,* using a calculation to build the file path of the image. Then all that needs changing is the path, you don't have to reinsert. It comes to more or less the same thing; but I believe its easier. On a Mac, we can do this with AppleScript. On a PC you'll need a plug-in, to deal with the file names. Troi File is good. There are others. You can also probably do it with command line; but Troi File is pretty easy. *This is new to 7. It is NOT documented anywhere in FileMaker Help. Search the forums here.
Tissot Posted February 11, 2005 Author Posted February 11, 2005 Thanks but..... All I want to do is to block the insert-file window, because that will take the hole file in FM! Please Help!
rtheman Posted February 13, 2005 Posted February 13, 2005 Per your comment below, what exactly is "Calculated File Path"? And also I've been looking at TroiFile but I can't seem to find a solution to my problem. What I'm trying to do now is similar to the start of this thread: managing .tif files that are moved to a different location (shared network drive) in Windows environment. I currently have a database of ~2700 records that are link by "LINK" to their respective .tif file. But now that they are moved to a network drive (from a local drive, so that everybody can see) I'm running into the problem of modifying each record's Container Field's referencing address 'automatically'. I've been looking through TroiFile and other plug-ins but none seems to provide me with looking at the CURRENT container field's ref then modifying it (really the change would only be changing the drive letter) Any help is appreshiated and thanks for your tip of placing the image file on a shared network drive instead of your local's. ~rich I would tend to agree with Queue, flog 'em -! But if that's not allowed, I think that the best way you deal with this problem is to build the tools they need for renaming and managing files into your FileMaker interface; so that, if they rename a referenced file, from FileMaker, FileMaker reinserts the image. When they "physically" add images to a folder, you'd need to run a script to go get them also. Or better, use the "calculated file path" container approach,* using a calculation to build the file path of the image. Then all that needs changing is the path, you don't have to reinsert. It comes to more or less the same thing; but I believe its easier. On a Mac, we can do this with AppleScript. On a PC you'll need a plug-in, to deal with the file names. Troi File is good. There are others. You can also probably do it with command line; but Troi File is pretty easy. *This is new to 7. It is NOT documented anywhere in FileMaker Help. Search the forums here.
Fenton Posted February 13, 2005 Posted February 13, 2005 Calculated field path looks like this: image:/volume name/folder path/file name (with extension) on Windows it might also be: imagewin:/volume name/folder path/file name (with extension) To see exactly what it should look like, mount a volume, Insert a Picture file from it, as reference only. Then create a calculation field: GetAsText ( container field with picture ) You'll see what the path looks like, in the last line. The strange and wonderful thing is that you can create a calculation field to produce the above, with result CONTAINER, and it will display your picture. When you think about it, it's more or less the same thing as importing a picture as a reference only, except in this case you're specifying what the path is, rather than choosing a file to get it. This may or may not have all the functionality of inserting an Object. That's Windows only, and I'm on a Mac. But the calculated field method is easy enough to try. P.S. On a local file it's much the same, if you want to quickly see: image:relative folder path/file name (with extension) By "relative" it means, if the picture is in a folder "images," which is in the same folder as your database, the path would be: image:images/file name (with extension)
rtheman Posted February 18, 2005 Posted February 18, 2005 Maybe I forgot to let all know but I'm running FM pro 6 and i don't have GetAsText()?! any other idea how I can retrieve a Container Field's file address w/ FM pro 6?
Recommended Posts
This topic is 7221 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