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.

Re-naming Container Field Image file?

Featured Replies

Is there a way to rename an image file that is held in a container field - in either FM 11 or 12?

I'm currently grappling with converting an image-heavy database from FM 11 to 12. I think I have a grip on the Container fields, but my case is made a little more complex, because my original Container images were inserted by means of copy-and-paste rather than the "Insert Picture" command.

The result is that when I do the Conversion to the new Container Storage system, these pasted images get stored as (1) .jpg originals of the same small size as my original source images (small, about 15K) -- and (2) ._pct files, which are much larger (175K) and are the actual images used for display in the new FM12 Container field. All of these files are assigned generic, numbered names like Untitled_4.jpg or Untitled_4._pct .

I've been experimenting, and basically what's going to work is moving these images out of the Storage Folder, deleting the reference in the new Container field, and then batch-importing the .jpg files using the "Import Folder" command and matching the Filenames to the database records. Onerous, but okay.

The one thing I would like to be able to do, after the import, is to rename the stored images so that they are based on a unique Title Field -- like Colorado_4.jpg. I know I can't just re-name the images in the Storage Folder.

. . . but I think there might be a way to rename the images either before I do the FM12 conversion -- or by importing them temporarily into a simple stored-in-the-File Container, and then dumping them over into the Remote Storage Container field.

So, I'm having no luck finding a calculation function that "Gets" the name of an embedded image file -- or a script step of function that could rename it.

Any help?

I'm having no luck finding a calculation function that "Gets" the name of an embedded image file

If the image was pasted into the container field, then there is no image file and no name. You can (probably) export the field contents to a file, then reinsert the resulting image file back into the container. Note however, that the image format may vary according to the source from which it was copied (this is why you may see .jpg or .pct as the suggested file formats when exporting).

  • Author

Thanks Comment -- I think I understand this part and the export / re-import process.

. . . what I'm getting art is simply the *file name* of the inserted image. When an image is properly inserted and then exported, it retains the name it had on the desktop before you put it into Filemaker, right? At least when i do an "Export Field Contents out of a container field, it lands on the desktop with the original name.

So I'm wondering whether there is a means for me to *edit* that file name from within Filemaker, via a Calc or Script -- either in the 11 system, or in FM12 Managed Storage system?

To Clarify once more -- I get it that when I pasted in the Images from the Mac clipboard, I *lost* the original filenames. But when I do the conversion, FM12 *does* create a generically named .jpg. I'm wondering if now there is a way to rename that .jpg from within FM (in either version).

Export the image to the temp folder using a new name. Then import it back using the new name.

But when I do the conversion, FM12 *does* create a generically named .jpg. I'm wondering if now there is a way to rename that .jpg from within FM (in either version).

It would be easy to do what Vaughan suggested - by scripting the export and using a script variable to name the exported image file. However, it would work only if you knew in advance what the file extension should be. Otherwise I would export the field contents using Filemaker's suggested name, rename the resulting image file using OS-level scripting or a plugin, and insert it back.

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.