Jump to content

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

Recommended Posts

Posted

I have a situation where a served FileMaker database displays linked images which are located in a complex hierachy of folders on a separate file server machine. The file server went down and all the data was restored from backup with the exact same names and structure. Now many of the linked images are not displaying (the usual "Could not draw picture file: "image name"). There are more than 5000 records in the file, so reinserting images one-by-one is not an option.

Based on a recent experience changing folder and file names to be PC-friendly, I know that the link FileMaker uses with image references is more complex than say an html "img src" tag, which is based entirely on the file and folder names. In FileMaker it seems a folder name can be modified (as long as it's not moved), and the image link remains.

I have an AppleScript I've used previously to grab the image path as a string and paste it into a text field, but it doesn't work when the image is unable to be displayed. (I receive the following error message: "Not enough memory to complete this operation. (-108)") The basic script looks like this:


tell application "FileMaker Pro 6"

	tell document 1

		set path_var to get data of cell "Sketch" of current record

		set cell "ImagePath" of current record to path_var as string

	end tell

end tell 

 

Is there any way I can access the text of what FileMaker *thinks* the image path is?

Both the DB server and file server are running OS 9, FYI.

Thanks!

Megan

Posted

I just broke a reference in 6, and couldn't get the file reference with AppleScript. I then converted the file to 7, and was able to get the reference as text, with either FileMaker: GetAsText (Image container field) or AppleScript.

So you might try that. Once you have the paths you can export them as text, then import back into your 6 file. Then run an AppleScript loop to reset the broken image links (you might want to find only broken one's first).

BTW, in FileMaker 7 the AppleScript term "document 1" refers to the 1st document opened that session. Not so good. Use "window 1" instead for similar use. The file and layout and fields referenced must all be frontmost however to use this simple reference (which is actually the default, so is not really needed). Or specify document by name.

In any case, try the conversion. If it works, write back if you need more routines to set the image references.

This topic is 7235 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
×
×
  • Create New...

Important Information

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