Jump to content

File Path / Image Mapping / Batch Importing image files into FileMaker Database


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

Recommended Posts

  • Newbies

Hi,

I'm trying to import images into my FileMaker database. My problem is:

How can I import all my images at once and automatically match or store it based on the value in the Container in the field? For example:

I have 5 images located/stored in the same folder of my FileMaker database: 11111.jpg , 22222.jpg , 33333.jpg , 44444.jpg , 55555.jpg

**NOTE THAT FILENAMES CAN ALSO BE ANY RANDOM NAMES LIKE 36745.JPG , 76935.JPG , 36790.JPG , ETC.**

-In my FileMaker database, I have PRODUCTS Table.
-In my PRODUCTS Table, I have PHOTO Field Name.
-My PHOTO Field Type is "Container" -- not 'Text' or 'Calculation'.
-My Container Values are: 11111.jpg , 22222.jpg , 33333.jpg , 44444.jpg , 55555.jpg --> So that makes 5 rows right?

What I want to do is, import all those 5 images from my folder into my FileMaker database while FileMaker will automatically search for its matching value in the database. Once FileMaker found its matching value/filename, it will place the image in that container.

Basically, it will be like this: FILENAME = VALUE (IF 11111.jpg = 11111.jpg THEN place that image in that container)

I want to know how to do this because I know it will save a lot of time when importing hundreds, thousand or even hundred-thousand files.




I hope my explanation to my problem is very clear to you.

Your help will be highly appreciated! :hug:

Thank You very much in advance. :) :hug:

Link to post
Share on other sites

For starters are the images in one directory on your computer? or are they in different directories?

 

if you have a known filename and a known file path to the files you can create a calculation that  derives the path to the files and then write a script that loops thru the records to insert the image into a container field.

 

The other option is - Import Records > Folder... then choose the path to directory of images and import them then once the files are in a record you can do any matching between records in another table. 

 

In some cases i have done a hybrid approach where i only import the filename and file path into a table then loop thru the found set and omit any thing that is not a .jpg or .pdf (depending on your needs ) then loop thru the set of sanitized records and import the file into the container. 

Link to post
Share on other sites

This topic is 2066 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
  • Similar Content

    • By stan111
      Gents, 
      there is a price list in Excel with images embedded. Do you have an idea how to import those records into DB with corresponding images preserved?
      Note that I've attached only two records, there are 600 of them. Any manual manipulations with the images is not an option.
       
      price.xlsx
    • By Tony Diaz
      How do I set a field with a value list item from a script, from a set of tick box values? .. or remove a value list item, but leave whatever else is there alone?
      Looks like GetValue with the name of the value list and the position # of the value, but I'm sure that also means that if I change that value list, I need to change any scripts that reference them by position # too..
      Something like detecting if a string is already there, and if not add it, surrounded by C/Rs, unless it's the first item entry?
      For the first time a field is set, I presume I could just Set Field (field ; "Value List Item"), and if there's only one entry/line in it, just clear it.  But if there's already a value there, I just want to select an additional one.
    • By mountainx
      I am trying to import data from a MySQL database and need to somehow also import fieldnames to be the fieldname in FMP. Is there anyway to do that? I have a CSV of the fieldnames and I also have a MySQL dump of fieldnames and associated data.
      Thanks for any help.
    • By emncwundy
      I have two iPads connected to FM server. For some reason one ipad (5th Gen running 13.5) will not complete the navigation scripts and shows error messages (no records match this find criteria), however the 7th Gen running on 13.1.1 works fine..... Issue has only begun after purchasing the second, newer iPad. I cannot for the life of me work out what is wrong, or how to troubleshoot and would love some guidance please!! Here is a screengrab of one of the scripts and related layout:
      fm go script issue.tiff Orders iPad layout.tiff
    • By PatrickDes
      Hello everyone,
      I have a Preference table with status options. The user can create a new status and through a script can assign a color (see attachment). The calculation is the following: 
      Allow user abort [off]
      Set error capture [on]
      Set variable [$start ;  value: Get ( ActiveSelectionStart )]
      Set variable [$end ;  value: Get ( ActiveSelectionStart ) + Get ( ActiveSelectionSize ) -1 ]
      Insert Calculated Result [ TextColor ( Middle ( Get ( ActiveFieldContents ) ;  Get ( ActiveSelectionStart ) ; Get ( ActiveSelectionSize) ) ; Get ( ScriptParameter ) ) ]
      Set Selection [ StartPosition : $start ; End Position : Send$ ]
      The ScriptParameter has the color values in RGB: RGB ( 237; 41; 190).
      The Status field is pulled into a Value List for the Product table. Is it possible, once the status is used in the Product table , to convert the text color into a conditional formatting? Is my approach wrong? I am trying to give the user some flexibility.
      Thank you for guiding me.


  • Who Viewed the Topic


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.