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.

scripts and variables

Featured Replies

I have an administrative database from which I can open and close other databases by way of scripts. The way I currently have it set up is each database that is going to be accessible via admin.fp5 has a record in admin.fp5. I want to be able to have a single script that will open a file based on the contents of the field.

For example:

admin.fp5 contains the field DATABASE which is the name of the database to be administered

so let's say records one and two in the db have the entries in the field DATABASE orders.fp5 and customers.fp5.

I want to be able to have one script called OPEN and one called CLOSE. Running the script will open or close the database listed in the DATABASE field of the current record.

The problem is that you can't pass the field contents to the name of the script you want to run. Ultimately, I will use this in a loop to go record by record and check to see if the database is open, and if it is, save a copy of it. (The database name field would come in to play here too.)

If anyone knows of a way to do this within FileMaker, please let me know. Or, if you know of a plugin that will suit my purposes, I'm happy to go that route too.

TIA,

Carrie

Hi Carrie,

If you're on a Mac the you could use Applescript & Apple Events to accomplish this.

As far as I can see you would have to write a separate AppleScript, that first gets the information about which databases to open from the 'main database' and then sends the Open Command for all those files to Filemaker.

This script, being saved as application, would then be triggered from a Filemaker script with an Apple Event script step. The reason for the use of an AppleEvent is that you can specify an Apple Event NOT to wait for completion of it's task, so Filemaker won't be 'locked up' until the script completes, thereby actually blocking the script from completing(!)

I hope that this helps, though it will require a lot of 'fiddling' I'm affraid...

But that's a lotta fun!

Success and regards,

Ernst.

you may use the openurl script step with a calculation

"file://path-to/" & filename.fp5

However, to close, you must use scripts

if [myfile="file1.fp5"]

perform scrupt, external [file1.fp5, close]

end if

if [myfile="file2.fp5"]

perform scrupt, external [file2.fp5, close]

end if

etc

Hey Christian,

How incredibly smart!

Ernst.

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.