AnsweredAssumed Answered

Script to insert files on Dropbox into Container Field

Question asked by flovelett on Mar 18, 2017
Latest reply on Mar 18, 2017 by philmodjunk

I've creating an database for my stamp collection. New records are periodically imported from an Excel file which includes the filename of the image file.

Manually adding potentially thousand of image files (.jpeg's or .bmp's) to the container field isn't practical, so I need help writing a simple script. Other than occasionally defining an occasional simple calculated field or using text functions in Excel, I have no script writing experience.


I did search the discussions to see if other users have asked similar questions, but I'm too much of a beginner to understand how to modify the example scripts properly.


A bit more information:

  1. The script should only modify records that have empty container fields. I've created a calculated field that returns a value for container field length, so that I can find only those records where this attribute=0.
  2. The script should only modify records in a found set. (Images will only be available as I scan them)
  3. The container field "image" only stores a reference to the image file. The field "filename"
  4. The image files are stored in one of several Dropbox folders (named to correspond to country), so perhaps having an interactive filepath dialog box might be necessary.
  5. Currently I'm running FM Pro 14 on a Windows 7 machine, but will probably end up moving the database to a Mac running OSX 10.x.
  6. Will be testing everything on a copy of my database until it works


One last thing... could someone recommend a FM book (or website) that has a good beginner scripting tutorial?


Thank you,

Felicia Lovelett