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.

Set multiuser on ?

Featured Replies

I'm trying to write an AppleScript that will set multi-user or single-user for a bunch of FMP files dragged onto it.

I've got it to prompt for the password, and prompt for multi or single user, and then for each of the files it runs the following command:

set multiuser of database DBName to multiuser

where "DBName" is the filename of the database and "multiuser" is either TRUE of FALSE.

However this command doesn't seem to do anything - not even an error. What am I doing wrong?

How do I AppleScript the setting of multi-user for an FMP database?

  • Author

Okay, so it does actually give an error. The subroutine which performs this command was within a "try...on error...end try" structure, so I hadn't seen any error until I commented out the "try" stuff.

The error is:

"Object is not an element of property of this class"

So I guess that I'm guessing that my "DBName" is not of the right database class.

How do I get an FMP database class from a database name?

What will be the advantage of doing that through AppleScript?

You can do it as FM script step.

tell application "FileMaker Pro"

tell database 1

if multiuser = false then

set multiuser to true

else

set multiuser to false

end if

end tell

end tell

+add a repeat loop for all databases dropped on the applet.

database 1 is just the frontmost database. You will need to open each database in your drop script and close them after changing the multiuser status.

  • Author

Well if I did it using ScriptMaker, I'd still have to use AppleScript to call the FMP ScriptMaker script then wouldn't I?

I'm trying to automate the procedure for a large number of FMP files. That's the point.

  • Author

"database 1"

I'd rather use the database name (in case the user brought up some other database while the script was runnin, for example), to make sure I'm using the right database, but I guess the number would have worked.

I got it working using the name eventually. Pain in the bum though. AppleScript really sucks as a laguage. I ended up doing the following for each file after opening it (where DB is the file itself, and multi is either TRUE or FALSE):

tell application "Finder" to set DBName to (name of DB)

tell application "FileMaker Pro"

set dbase to (database DBName of window DBName)

try

set multiuser of dbase to multi

on error

display dialog "ERROR: A problem occurred while trying to set the shared mode for '" & DBName & "'."

end try

end tell

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.