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.

Check if DB is open?

Featured Replies

How can I make sure my Database is open before I try to access it via AppleScript?

And if my FileMaker Pro client loses its connection with the FileMaker Server, is there a way I can automatically dismiss the warning that appears and then have FMP try to reconnect?

As for the first question:

I assume by Applescript you mean a Filemaker script?

DatabaseNames will return the list of databases currently opened on your machine. It will return a list with hard returns (¶) between each database:

Contacts

Menu

Orders

Settings

Use:

PatternCount( DatabaseNames; NameOfDesiredDatabase ) > 0

If it returns > 0 (true) then the database is already open.

Example: PatternCount( DatabaseNames; "Settings" ) > 0 is true using the list above.

Second question:

Hm, wait a tick. Now that I think about it, I'm thinking of the wrong answer for this question. I'll let someone else field this question...

  • Author

I actually mean AppleScript.

I have an AppleScript that kicks off FileMaker Pro to run a FileMaker Script...

--hint from http://fmforums.com/forum/showtopic.php?tid/180492/post/new

tell application "FileMaker Pro"

	activate

	do script FileMaker script "SomeScript"

end tell

My thought was that I should probably test that my database is actually open before I go and try to run a script.

  • 2 weeks later...
  • Newbies

I have a little handler for just such a reason.

-- This subroutine test that the specified database is running

on filemakerTestForRunningDatabase(databaseName)

	tell application "FileMaker Pro"

		if exists database databaseName then

			return

		else

			activate

			display dialog "Please activate database " & databaseName & " and restart this program" buttons {"Cancel"} cancel button 1 default button 1

			tell me to activate

		end if

	end tell

end filemakerTestForRunningDatabase

Hope this helps.

Tim

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.