Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Import txt file via script

Featured Replies

I have on a regular basis to import .txt files generated by a Barcode scanner.

The steps used are: 1: Import Folder to get the list of filenames and the path. 2: A looping script to work thru the file paths to Import File with fields appropriately assigned.

Unfortunately this does not work as I get error 100 and message that "The "File xxxx" could not be found and is required to complete this operation" .

A finder window then opens showing the list of files and a double click effects the importing. Why does this not occur from the script.

FileImport.pdf

Welcome to the forum,

you may need to introduce a pause in your loop as filemaker may not have enough time to recover from the import process as some files may take longer than others.

You may consider using 360Works ScriptMaster plugin for this to perhaps have more consistent results.

http://www.360works.com/scriptmaster/

After you install the plugin you may try this file ( designed for a Mac OS )

run the 2nd Script to choose the the directory,

run the 3rd script to import the contents of directory, each file in to a record.

there is a sample folder with 3 txt files of 5000 lines each.

import.fp7.zip

txt.zip

Edited by Guest

The steps used are: 1: Import Folder to get the list of filenames and the path. 2: A looping script to work thru the file paths to Import File with fields appropriately assigned.

Unfortunately this does not work as I get error 100 and message that "The "File xxxx" could not be found and is required to complete this operation" .

I think you make it a bit more difficult than it really is:

http://filemaker.custhelp.com/cgi-bin/filemaker.cfg/php/enduser/std_adp.php?p_faqid=859&p_created=1115172476&p_topview=1

Only real requirement is the folder only contains the text files....

To get the content of the imported file digested would you be able to make a variation over:

http://edoshin.skeletonkey.com/2006/12/crosstab_report.html

Utilizing these two:

http://fmhelp.filemaker.com/fmphelp_10/en/html/func_ref3.33.74.html

http://fmhelp.filemaker.com/fmphelp_10/en/html/func_ref3.33.77.html

--sd

Edited by Guest

  • Author

Thank you all for your suggestions. I will need time to work thru them and hopefully find a working solution. I can at this stage comment that quickly using the 360Scripmaster Plugin and function Confirm Existence of files gives the same not found message as in my method. However as said I need to work on each suggestion.

  • Author

Thanks Ocean West, I have adapted the offering made in Archive.zip to meet my data format need including using the .cvs files generated by the barcode scanner.

Viewing the various solutions from others has also helped my thinking re use of FM functions and external functions. Great learning.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.