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 from multiple tables of one file, select it only once?

Featured Replies

I'm hoping this is possible but trawling through the FMP documentation and forums here hasn't resulted in a solution to what I'd like to do.

 

Essentially I'd like to create a script that can merge the database with another database (where the table structure is guaranteed to be the same).  Now that's basically importing from another FMP database several times (since each import can only handle one table).  However, I'd like the user to be able to select the file to be imported, and not have the filepath hardcoded into the script.

 

I realise this is possible by storing the filepath as a script parameter, but how can I bring up an "open file" dialog box in a nice way that simply stores the path to the file the user selects, so I can then run the "Import..." script step several times using that path.

 

Also, are there going to be other problems with this method that you can foresee?

The file to import from is not hosted?  In other words they can find it in Finder or Windows Explorer?

In that case you use OS-level scripting to capture the file path and name through an OS "open file" dialog.

 

Or you can use the FM "insert" script step to let the user select the file and you insert it into a global container.  Then you use "export field contents" to export the file to a location and with a file name that you have control over and use that path & filename in your import variable

  • Author

The file to import from is not hosted?  In other words they can find it in Finder or Windows Explorer?

In that case you use OS-level scripting to capture the file path and name through an OS "open file" dialog.

Yes, that is correct, and that's what I'd like to do but I need more information on how exactly to do that with "OS-level" scripting. Sounds like it might be too hard for me. :sad:

 

Or you can use the FM "insert" script step to let the user select the file and you insert it into a global container.  Then you use "export field contents" to export the file to a location and with a file name that you have control over and use that path & filename in your import variable

Would that still work if the database is a few hundred MB in size (lots of pictures in container fields)?

If OS-level scripting is too hard then you can always look at the various file plugins.

 

For approach #2: yes it would still work but it would not be efficient as it requires both an import and an export so there would be a fairly long delay.

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.