Jump 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.

Picture References in Database

Featured Replies

I have inherited the support of a FileMaker database. I need to move the database from a MAC to a PC. In the process of moving the database I have identified that pictures in the database are being inserted with "Store only a reference to the file" checked in a container field. Is there are way to view the actual reference to the file and can I replace the reference in a batch update to point at the new location? shocked.gif

Yes you can -- on the mac with AppleScript. There are some issues with cross-platform compatiblity (look for discussions of this issue in this forum).

An AppleScript for moving images stored as references to files follows. There are 2 fields required for this script: the "Container" field and a global field "Destination Folder" that stores the location of the new folder (you will need to select a location on a networked volume).

tell application "FileMaker Pro"

set theFile to cell "Container" of current record

set theFolderPath to cell "Destination Folder" of current record

end tell

try

set theDestination to alias theFolderPath

on error

set theDestination to GetFolder()

end try

if theFile is not "" then

try

set thePath to theFile as string

on error

display dialog "Image not stored as reference to file " buttons {"OK"} default button 1

return

end try

tell application "Finder"

duplicate file thePath to theDestination

end tell

tell application "FileMaker Pro" to set cell "Container" to the result

else

display dialog "No Image found in current container field" buttons {"OK"} default button 1

end if

on GetFolder()

set NewDestination to choose folder with prompt "Please select a destination folder"

tell application "FileMaker Pro" to set cell "Destination Folder" of current record to NewDestination as string

return NewDestination

end GetFolder

One thing that I always do when working with container fields which reference external files, is store the reference in a text field too. That way if the link to the file ever gets broken, then you can look at the info in the text field to find the original container data.

  • 2 weeks later...
  • Author

Will this work if I run the script on the Mac and then move the database to the PC?

You can test by saving an image to the network volume and then set the container field to a reference the image. And then check on the container on the PC. If there is no image, this means the path is different from the Mac to the PC.

Seems like I had read at some point to make sure the network volume is mounted via the IP address. Unfortunately I don't have a mixed platform network to test this out.

Create an account or sign in to comment

Important Information

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

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.