RowN Posted December 15, 2011 Posted December 15, 2011 Hi all, I have a question that I hope is easy to answer. I want to be able to batch import images into a database and have them automatically import into a matching records. For example: I have a record which in the NAME field has the entry: 6E-4 (A) and I have a picture file names 6E-4 (A).jpg. I want to be able to import that file from a batch and have it automatically import to the matching 6E-4 (A) record. I have a container field ready to go for it. Any thoughts? Thanks, Rowan
comment Posted December 15, 2011 Posted December 15, 2011 Instead of importing, why don't you use a calculation field (result is Container), along the lines of = "filewin:/C:/Users/your_name/Documents/Images/" & Name & ".jpg' See also: http://www.filemaker.com/11help/html/create_db.8.32.html#1030283
RowN Posted December 15, 2011 Author Posted December 15, 2011 Thanks for this. It's not quite working yet but it's getting close. I'm getting a shortcut image in the box with the name of the file but not the picture. I will fiddle with it a bit and see if I can get it to work. I will let you know if I do.
comment Posted December 15, 2011 Posted December 15, 2011 I'm getting a shortcut image in the box with the name of the file but not the picture. Oops, that's my fault. Use "imagewin:/" instead of "filewin:/".
RowN Posted December 16, 2011 Author Posted December 16, 2011 Thanks for this. It's working but I think I still need to be able to import the images into the the file as it needs to move between different machines (usually via usb drive) and I think I would need to make sure the images and the directory update in all the computers. This is a great solution though and will come in handy with some other things I am working on.
comment Posted December 16, 2011 Posted December 16, 2011 Do you mean you want the images stored (embedded) in the .fp7 file?
RowN Posted December 16, 2011 Author Posted December 16, 2011 Yes, embedded. If I can I would still like to figure out how to batch import them and automatically have it calculate which record they sync up with. Or would them embed through this other method as well?
comment Posted December 16, 2011 Posted December 16, 2011 There are two ways you can do this: 1. Import your images into a new table. Then use a relationship matching on file name to pair them up with the records in your exisiting table. 2. Use a script to embed the pictures into a container field in your existing table: Show All Records Go to Record [ First ] Loop Set Variable [ $path ; "imagewin:/C:/Users/your_name/Documents/Images/" & YourTable::Name & ".jpg' ] Go to Field [ YourTable::Image ] Insert Picture [ “$path” ] Go to Record [ Next ; Exit after last ] End Loop
RowN Posted December 16, 2011 Author Posted December 16, 2011 I've been working on Step 1 today funny you mention it. Just need to get the relationship part figured out and it will work just fine. Thanks for step 2 as well. If I can't get 1 to work I will see about 2. Thank you.
Recommended Posts
This topic is 4726 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 accountSign in
Already have an account? Sign in here.
Sign In Now