is it time to start looking at a FILE-type plugin?
On 02 Mar 2012, at 9:13 AM, email@example.com asked in whole or in part:
created by firstname.lastname@example.org in Scripting and Calculations - View the full discussion
Hi, I am importing a lot of records from different files, and I'd like to keep a track of the filename that the record originated from. Is there a simple calculation that can find this for me? Obviously the Get(FilePath) or Get(FileName) locates the details for the current FileMaker database. I'm importing from Appleworks, and there are lots of different files to import.
I'd like to keep a track of the filename that the record originated from. Is there a simple calculation that can find this for me?
I don't know of a simple solution. Perhaps you should start by inserting the file into a global container field (as reference only). This will give you the name and the path of the source file. You can use that for both importing the file and entering the source into the data - either as auto-enter during the import or Replace Field Contants immediately after.
I run across this from time to time and have settled on starting the import script with a custom dialog which presents a global input field(s) to identify the source / batch. The script ends with a Replace on the found set.
I found that the existing file names were confusing or meaningless to the goal. I mention this under the flag of be careful what you wish for.