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.

Automate Insert Picture

Featured Replies

  • Newbies

I am seeking to automate an Insert Picture task in a container field in my record set. It's probably going to involve using some combination of Mac's Automator and ScriptMaker, but I'm stymied owing to a lack of programming experience.

The way it works:

I'm inserting a unique ".jpg" file reference in each container, where the name of the file matches the unique ID number for each respective record. The JPEGs themselves are prepared in advance and saved externally, in a directory file tree on a separate hard drive. The names of the nested containers in the tree are based on the same unique ID numbers as are the names of the JPEGs they ultimately contain. The format is as follows:

yy-xxxx, where "y" is a double-digit prefix corresponding to batch number, and "x" is a quadruple-digit number corresponding to the actual record.

For instance:

A record ID # "66-0201" should display image "66-0201.jpg" in its container field. The address of the JPEG in this case is essentially "C://Files/Images/66-0001 - 66-0499/66-0201.jpg"

The layout exhibits a field "ID" as well as an "Image Name" field, each of which hold numeric data equivalent to the name of the JPEG file I want to link in the container field.

Basically, I want to tell Filemaker to look at an Image Name field, take a part of the numeric text, and match it first to container names in the directory tree. Then, tell it to match whole text to the correct JPEG file in the ultimate directory container, and insert a link to that file in the record's container field.

Currently, I do this myself, one at a time. Yeah.

Any help is greatly appreciated.

You know, I did the exact same thing. Tried to make id's of files and id's of the records so that you could correspond them, I have even had apple script at one time manage the capturing the data from a compact flash card transfer them to the computer rename them run an action with graphic converter to resample images a little more apple script to rename files then fmp scripts to create records. ----

Honestly I gladly gave all this up for 360Works Super Container. No more worrying about directory paths. Or names of original files. The beauty of SC is that the image is stored on the server in a folder that corresponds to the record id. It really doesn't matter what the name of the file is it could be IMG_00001.jpg stored in a folder called 66-0201 that corresponds to your record id.

If you ever want to download that file directly to the computer just apply the name at that point and time. While it's stored on the server there is no need to rename the file.

Believe me I was very hesitant, because I didn't have a warm fuzzy feeling that the file was not properly NAMED. I had asked Jesse at 360 works why not. After he told me to have a little faith. After awhile in practice I realized it really did not matter. And haven't looked back since.

The other option is to use FileMakers built in import images but just uncheck the fields for the actual images. If you don't want to import the images but just want the path to the file and the file names in the folder. This would create records based upon the contents of image the folder.

Or, if you can calculate the path to the image file, in FileMaker syntax (with the "filemac:/" or "filewin:/" prefix), then just use that, with a result of Container. Do you have the full path? If you do, then you do not have to Insert the image; it's really much the same thing. FileMaker just needs to know where it is.

  • 6 months later...

I have done as you mentionned, using the "filemac:/" path to the file, but when i click on the container file icon, i get the "The file (myfilename) could not be found and is required to complete this operation"

Any suggestions?

Manuel

Never mind, I got it, wasn't putting the HD name in the file path, was using unix file path.

Manuel

Ok, I do have a problem, this script step insert only the file reference into the container, how do I script this so the file is embedded in the container?

Manuel

Answered here:

http://fmforums.com/forum/showtopic.php?tid/198711/

Please do NOT double-post.

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.