Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8025 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

Posted

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)

This topic is 8025 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.