Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

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.

Posted

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.

Posted

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.

Posted

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

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

Posted

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

This topic is 5885 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.