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.

Importing multiple data sets

Featured Replies

FMPro9 . daily reports from a online storefront are emailed to me each morning. File sent is a .csv file and imported into Filemaker for manipulation and reports. Import script is simple clear out old records and pause while you navigate to folder to select the "file of the day"

On Mondays, there are multiple orders waiting for FRIDAY THROUGH SUNDAY IN SEPARATE FILES. When the import script is paused for naviagtion to the file, I can not for the life of me figure out how to add more than 1 file.. Import is not selectable when it is called from the script and paused..

What am I missing? Some sort of loop section in the script?

Not a real biggie, but, an annoyance...

Mark

Times like this is when I turn to a plugin like FileManipulator so you can scan a directory for "all" files in that directory, and return a list of these files, you then could test to see if they are all .csv files and weed out others, Then step thru a process to import each file.

Basically you are not "choosing" the individual file but only the folder you wish to process.

Thus eliminating a pause...

However you could call your script again?

Hit button to perform script

dialog : do you want to import a file? yes/no

if yes

import step (choose file)

perform script import file

if no

halt

end if

this way you are not "pausing your script"

If this is all on Macs, there is a simple AppleScript command, list folder, which returns the names of the files (which you can then recombine with the folder path to get the full path). Alternatively you can use "files of folder", like this:

set theFolder to choose folder

-- or pass the folder path from a FileMaker field, or hard-code it (Mac format)



tell application "Finder"

	set files_txt to (files of theFolder whose name extension is "csv") as Unicode text

end tell



-- You would then need to set these into a FileMaker (global?) field:



set cell "_gFiles" of table "TO name" to files_txt

Then you'd loop through the global field, translate the path into a FileMaker-syntax path (add "filemac:" prefix, substitute "/" for ":"), set that into a script Variable, then import using the Variable as the file path.

[P.S. You'll need to Add a real file path into the Import dialog also, in order to set up or see the Import Order. The dialog accepts return-separated paths. It will check them in the order entered. So like this, with the Variable ($filepath) first:

$filepath

filemac:Macintosh HD:Users:You:Documents:Some file.csv

Edited by Guest

  • Author

However you could call your script again?

Hit button to perform script

dialog : do you want to import a file? yes/no

if yes

import step (choose file)

perform script import file

if no

halt

end if

this way you are not "pausing your script"

This is what I was looking to do..

Have been whacking on it this morning and have it functioning somewhat, but..

I have it pausing to add the multiple files (one at a time) but somehow I am getting into a endless loop..

Start of script Navigates to proper layout

Clears old data and goes to import dialog box..

The IMPORT steps SHOULD BE..

Dialog Box (MULTIPLE FILES)YES OR NO

IF YES, IMPORT First file

Back to dialog box...

Loop until I click NO

End step and continue with script

Script continues on to sort, print and export data

Have all working BUT the "IMPORT STEPS" above..

Sigh....

Edited by Guest

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.