Newbies HelleHelle Posted December 2, 2002 Newbies Posted December 2, 2002 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
BobWeaver Posted December 2, 2002 Posted December 2, 2002 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)
Recommended Posts
This topic is 8396 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now