Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

File Reference Problem?!?

Featured Replies

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!

Um, don't rename or delete the file, and tell your users they will be flogged if they do?

  • Author

Is there no possibility in Scripting it ?

I thought of Error Capturing it. (I don

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.

  • Author

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!

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.

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)

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?

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.