December 2, 200223 yr Newbies I have 1 folder with 20 txt-files which I want to import into FM automatically. Each record in FM have 2 fields (1 with the name of the txt-file, the other with the contest of the txt-file). I have tried to modify the "Import Picture"-script which comes with FM without any success. I get a Filemaker error when the script arrives at set cell "filecontestt" of newRecord to file (txtFileRef). A guess would be that I have to copy/paste the text, instead of importing it. But...I might be wrong! The modified script: --choose a folder with text files activate set folderPath to (choose folder with prompt "Choose a folder with text files to import
December 2, 200223 yr Change the line to: set cell "filecontestt" of newRecord to (read txtFileRef as text) You may also have to coerce txtFileRef to be an alias or file reference rather than a string like this: set cell "filecontestt" of newRecord to (read alias txtFileRef as text)
Create an account or sign in to comment