If you know the file path to the file, as you should with a "folder on my desktop", you can insert that specific file using a path variable.
But if you have a whole folder of images that you intend to insert, use the Import Records | Folder option to import them all into a table in your database. You can import the images into a container field in that table and the filenames into a text field at the same time.
You can then use the file names in your original table and this table of import images to link up your records in a relationship.
FileMaker 12 Managing Container Data
The Benefits of FileMaker 12 – Part 7: FileMaker Container Field In Depth
This is what I first assumed to do. I guess I'm having issues around creating the relationship. I'm much more familar with Access and SQL than I am FileMaker Pro.
I have a text field called "picture1" contains the filename on the database I want to import the picture into. The field on the other table is "File name". So i created a relationship between "picture1" and File Name". However, both of my container fields are greyed out and can't be selected. I tried to do a calucated and a lookup on the container field. I don't know what I'm doing wrong.
You don't need two container fields only one. Neither container field should be used as match fields in your relationship. (I think that's where you see them greyed out.)
You have two options. Which is best depends on what data you have where in your database.
Option 1. Use this method if all pictures are being imported and you don't have any pictures in your original table that you want to keep.
Remove the container field from your original table. You do not need it.
If you have this relationship:
OriginalTable::Picture1 = ImageTable::File name
You can simply add the container field from Image Table directly to your OriginalTable layout and it will show the imported image just as though that field were part of your original table.
Option 2. Use this method if you need to combine the imported pictures with images already present in your original table.
Assuming the same relationship as Option 1, Immediately after importing the data, use Replace Field Contents on a layout based on your Image Table to copy the contents of the ImageTable container field into the container field of the matching original table record.
Thanks, worked perfectly.