I use a plugin from 360 Works, ScriptMaster. It's free and can be downloaded from their site. BaseElements and a few other plugins offer similar functionality.
Do you just want to display an image in a container? Or do you really need to insert it into the container?
Previous two posts mentioned two plugins, this is the most common way to add this functionality. The other popular plugin is Troi-File.
If for whatever reason, you want to avoid using plugins,you can use AppleScript or VBScript triggered from FIleMaker to scan the target folder.
Finally, you can place all pdfs into the Documents folder and retrieve the list with Get(DocumentsPathListing).
(not supported in WebDirect or Custom Web Publishing)
warning danger will robinson! I tried this on a large Documents directory. Do not try this at home! I quickly switched back to Troi File (which has a lot of other functions).
One other thing, just to mention the possibility. If you know what the file should be called, and you know where it should be stored, then you can simply create a Calculation field that has "Container" as the type returned. Use a formula such as:
Get ( SystemPlatform ) = 1 ; "imagemac:" & "/Macintosh HD/Users/danjohnson/Documents/data3.png" ;
Get ( SystemPlatform ) = -2 ; "imagewin:" & "/Macintosh HD/Users/danjohnson/Documents/data3.png"
NOTE: My Windows reference is wrong here, but...someone will fix it or you can use Get ( DocumentsPath ) to mimic the actual reference if you're on Windows.
If you add another calculated field, you can use something like:
GetContainerAttribute ( TableName::ContainerField ; "filesize" )
If that calculation returns a size, the file exists at the specified location. If it returns "?", then the file doesn't exist at that location.
When you go to a layout on which that container field is placed, the container will be displayed as an image (as long as the file hasn't been moved). This won't work for FM Go or WebDirect (I don't think).
This can come in very handy in certain situations, and if your data already contains the components that describe where a file SHOULD be and what it WILL be named, then you can build the calculation off the data in each record and you'd never have to even import any files. Example: XYZ Magazine, April issue, 2016, page 1 might be called "XYZ042016_001.pdf", and it might be in a location such as "2016 Magazines/XYZ/04".
Beverly, I think you are lost in space! if I want to view what's in the documents folder I use the following calc to clean things up.
yes! And if the Documents folder is loaded, take a coffee break while it loads...
I only use this option in FMGO. The documents folder is much more manageable on an iDevice.
one would hope!