A simple drag and drop won't do it.
You'd need to use a script to insert the items from that folder one at a time or you'd need to zip the folder so that the zipped folder can be treated by Filemaker as a single file.
There are ways to get a list of all files in a folder so that a script can loop through them and insert them one at a time into different records in Data. there are plug ins, a system script can generate a text file list of the file names for import into FileMaker or you can use a folder inside Documents and use Get ( DocumentsPathListing ) combined with some parsing to get to the file names for each file.
a couple of questions relevant to the above :
1. Is it possible to generate a script (FM pro 12) that gets the list of all files in a windows folder other than //Documents or would i need a plug in for it? I 'd like to avoid the plug-in because i 'm not sure that functionality would be preserved in remote access via Filemaker Go.
2. Is there a way (script or other) to tell FM to save a simple empty .txt (or similar format) file with a name that the user would define each time at a calculated directory?
3. My containers are stored externally at a calculated path relevant to the DB. I 'd like to give the user the option to go to this path via the OpenUrl function. I found an earlier post of yours regarding this at http://forums.filemaker.com/posts/6239bd2f11 :
"Define calculation fields that returns text and use these expressions to return the file path of a store by reference file:
cFilePath: GetValue ( containerField ; 2 )
cFileName: Middle ( cFilePath ; Position ( cFilePath ; "/" ; Length ( cFilePath ) ; - 1 ) + 1 ; 999 )"
this works only when a reference is stored. For external storage, i tried manipulating the GetValue function, by changing the number from 2 to 4, but still, the first word that appears in the path is the type of the container data, i.e. "JPEG:/Container_Field_1/client1_16032800266/27_8_2014/24248452.jpg". I tried to manipulate the Middle function in order to start from the 7th letter, but this isn't going to work if the container file is in a different format i.e. BMP. How can I get the path only?
4. Is there a way to rename container fields according to a caclulation/script without having to import and export?
1. Go doesn't use plug ins but you can't do drag and drop anyway in Go.... And the alternative is a system script--which won't work from Go either, I suspect (haven't tried that). But you might be able to get something to work "server side" for this if you are hosting the DB and your iOS devices connect as clients of the hosted database.
2. FileMaker can generate text files using export field contents and using Export Records. (I've performed batch files and VBScripts by using Export records to generate a text file with the needed file extension. By selecting the "open" option, the export also then performs the batch file or VB Script to get something done that can't be done with a fileMaker script.)
3: see the calculations found in the following thread if you want to extract a filepath or filename from a field with external storage:Exploring the use of a $Path Variable in Scripts
4. why would you rename a FIeld? don't you want to rename the file inserted into the field? And no, it has to be exported and re-inserted as far as I know...
Sorry, I meant renaming a file in a container field, but you answered it anyway,
thanks a lot Phil
EDIT : i had a look at the link, - and it seems that the issue of getting the path is a bit complicated. Drag and Drop in containers would not be the same as by using the insert function; also, if i understand correctly, things are different when the objects are stored externally (vs when a reference only is used). I 've manage to compile a script to get the path using a combination of various functions (get filepath, get filename, get value, length, midlle, etc) in order to manipulate the text and get the desired result, but it still only works for some container files types (not pdfs). So, my only working complete solution for now is to get the predicted file path, -based on finding the directory in which the DB should have externally saved the containers files according to a calculation during the import process.
again thanks a lot for taking the time to answer my questions.
P.S. i think that it would be nice to have a function like Get(ContainerPath) in the next editions of FM.
The calculation used in that file is complex because it is designed to work with all storage options and insertion methods. But you can also set up the container field in that file to have external storage, insert a file and then examine the text that appears in the fields of that file to produce a much simpler calculation that only works with external storage.
Drag and drop is the same as embedding a file using insert picture. The issue you were setting yourself up for is that you can't drag and drop a group of files or a folder filled with files so I've suggested alternatives that can produce the result that you want.
After changing the container storage options for both fields to external---open, i get the message "FilePaths to files in externally stored, secure container fields are not accessible". Maybe in order for this to work i should make changes to more calculated fields?
edit : i 'm talking about single file insertion, i 'm trying first to get past that before attempting multiple files.