Skip 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.

using applescript to pass a filename to Filemaker as variable - import records

Featured Replies

HI,

I have an applescript that selects the name and path of an XML file that id like to then parse into filemaker.

I have tried using "Set Variable" to do this but cannot make the link between the applescript and $VariableName.

It is currently not working and is hard to find any examples on the web.

Any help is much appreciated.

It would look something like this. (which is SO NOT working)

Filemaker Script

Perform Applescript:


global file2open

set file2open to (choose file)

set file2openName to POSIX path of file2open

set $theFile to file2openName

Set Variable: [$FileToImport; Value: "filemac:/"& "$theFile"]

Import Records: [No dialog; $theFile; myxslt; Add; Mac_Roman]

Try using a global FIELD.

I'm no AppleScript expert, but I'm sure I've seen this before.

You can only set fields via AppleScript.

No Variables, no parameters for scripts.

Very much like it was introduced in FMP3.

Try this minimal demo.

aedemo.zip

  • Author

Thanks Karsten,

That looks promising, a little backwards yes, but it looks like the only option.

How do I then bring that field in you demo back into the "import fields" dialog as the file path to import?

Cheers

Same thing you would do if you weren't using applescript.

Set Variable: [$FileToImport; Value: "filemac:/"& yourTO::yourField

  • Author

Hi,

Sorry, Im not familiar with yourTO::yourField .

A quick google didn't help much either. Please explain a little more the use of this cast.

Many thanks.

yourTO = your Table Occurrence

i.e. a table in your relationship graph.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.